This problem is related somehow with the previous one.
When trying to save and having non ascii charactters in the user name it
raises ''ascii' codec can't encode character python' at line 79 in
rosetta/views.py
Root cause is that it raises an UnicodeEncodeError and the try: clause go
for UnicodeDecodeError
OS: Win XP 32
Python 2.5
The monkey patch I did was to insert an additional try clause for
UnicodeEncodeError and then simply to store 'See Email <email@x.y>' in the
mo file.
if file_change and rosetta_i18n_write:
try:
rosetta_i18n_pofile.metadata['Last-Translator'] =
str("%s %s <%s>"
%(request.user.first_name,request.user.last_name,request.user.email))
except UnicodeEncodeError:
rosetta_i18n_pofile.metadata['Last-Translator'] =
str("See Email <%s>" %(request.user.email))
try:
rosetta_i18n_pofile.metadata['X-Translated-Using'] =
str("django-rosetta %s" % rosetta.get_version(False))
rosetta_i18n_pofile.metadata['PO-Revision-Date'] =
datetime.datetime.now().strftime('%Y-%m-%d %H:%M%z')
except UnicodeDecodeError:
pass
Original issue reported on code.google.com by guenter....@wanagu.at on 12 Dec 2008 at 9:10
Original issue reported on code.google.com by
guenter....@wanagu.at
on 12 Dec 2008 at 9:10