4teamwork / ftw.inflator

Plone site setup wizard with content creation and bundle system for predefined configurations.
3 stars 6 forks source link

Support UTF-8 encoded strings as value for :translate() #3

Closed treinhard closed 11 years ago

treinhard commented 11 years ago

Without the patch the following JSON snippet results in a UnicodeDecodeError:

{
    "_id:translate(onegov.policy.contentcreation)": "bruckenangebote",
    "_type": "ftw.topics.Topic",
    "title:translate(onegov.policy.contentcreation)": "Brückenangebote"
}

Assumption is that the JSON file is encoded as UTF-8 (which seems a little better than ASCII).

treinhard commented 11 years ago

This seems to be a problem for the "update-i18n-contentcreation.py" in onegov.policy too.

treinhard commented 11 years ago

Solution for purists in dfbf9eb ;-)

jone commented 11 years ago

Thanks :)