Changing case of language metadata causes errors

Bug #101782 reported by Samuel Schluep
8
Affects Status Importance Assigned to Milestone
Silva
Fix Released
Medium
Unassigned

Bug Description

The language metadata of the silva-meta set uses uppercase two-letter codes.
However, in general lowercase letters are used for the language. For example,
the Zope 3 i18n translator will not recognize uppercase language codes.

Revision history for this message
Kit Blake (kitblake) wrote :

I think the case of languages can be solved by the suggestion in this issue:
https://infrae.com/issue/silva/issue1475

I've added 'Silva-1.6,metadata' topics to that issue, and am
superceding/resolving this one. Could be that this is a bad idea, in which case
you can reply to this to reactivate it.

Revision history for this message
Kit Blake (kitblake) wrote :

This is tricky. In the process of changing Issue 1566 i wanted to get rid of the
lower() in the attribute, so I manually changed the case of the abbreviations in
the metadata set. And I got an error in the metadata screen.

Fortunately I could use the back button, set the language to none, (i.e. "Select
a Language") and then set it again. Thus, for the release documentation:

NOTE: If the language in your properties screen has been already set (probably
in your site root) you will get an error in that screen, after importing the
metadata set.
Error Type: KeyError
Error Value: 'Wrong item value [[EN]]'
You MUST first change the setting to none (i.e. "Select a Language") and save.
Then when you import the metadata set and reload the properties screen you can
set the language appropriately.

This will also be a problem with this issue's superceder. I'll duplicate this text.

Setting to testing for the time being so this issue is easier to find.

Revision history for this message
Kit Blake (kitblake) wrote :

Whoops, the superceder is 1475 (you can click it).

Revision history for this message
Eric Casteleijn (thisfred) wrote :

fixed in 1.5, 16 already has this

Revision history for this message
Kit Blake (kitblake) wrote :

Tested out ok in 1.5. This language setting will be a very useful feature.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.