Ask Your Question
0

changes to django.po have no effect

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

paolini gravatar image

I have run manage.py 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 manage.py compilemessages and I see that the corresponding file django.mo 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') 
u'utenti'
>>> 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
0

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

paolini gravatar image

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

Stats

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

Seen: 79 times

Last updated: Sep 26 '14