First time here? Check out the FAQ!
0

changes to django.po have no effect

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?

paolini's avatar
11
paolini
asked 2014-09-24 02:05:54 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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.

paolini's avatar
11
paolini
answered 2014-09-26 23:55:59 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments