Ask Your Question

changes to django.po have no effect

asked 2014-09-24 02:05:54 -0600

paolini's avatar

I have run jinja2_makemessages -l it and modified the file askbot/locale/it/LC_MESSAGES/django.po so that it now contains the lines:

#: templates/widgets/user_navigation.html:11
msgid "sign out" 
msgstr "logout"

then I run compilemessages and I see that the corresponding file has been modified. However I see no effect on the rendered pages (but I see other message strings are being translated into italian).

I can reproduce the problem in the shell:

>>> from django.utils import translation
>>> translation.activate('it')
>>> translation.ugettext('users') 
>>> translation.ugettext('sign out') 
u'sign out'

I expect the translation of 'sign out' to be 'logout' not 'sign out'. Am I missing something?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2014-09-26 23:55:59 -0600

paolini's avatar

The locale 'it' is an abbreviation for 'it_IT'. So the file to be modified is in locale/it_IT/LC_MESSAGES not locale/it/LC_MESSAGES.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-09-24 02:05:54 -0600

Seen: 190 times

Last updated: Sep 26 '14