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?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
paolini's avatar
11
paolini
asked 10 years ago

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
paolini's avatar
11
paolini
answered 10 years ago
link

Comments

see more comments