First time here? Check out the FAQ!

English .po file is incomplete

We're looking to customize some of the text on our site, and while looking at the .po file for the "en" language, it appears incomplete.

For example, the "es" translation has a "questions" translation (~2191) There is no such translation for "en".

Benoit's avatar
asked 2010-11-14 14:08:13 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


Hi Benoit, that is true for the previous versions but I think I've updated that in the master branch. Here is what you can do:

Upgrade the code if appropriate at this stage (it actually may be necessary, because I've added the jinja2 string extractor recently).

Go to your project directory with the and copy an existing english catalog from askbot locale to your project:

mkdir locale/en/LC_MESSAGES/
cp askbot/locale/en/LC_MESSAGES/django.po locale/en/LC_MESSAGES
python jinja2_makemessages -l en -e html,py,txt

This way you'll get your own copy of messages that you can edit without the need of merging with the canned messages. Maybe it's just me, but I find merging .po files very tedious. Since the project directory is outside of askbot's git repository, there won't be any conflicts.

If you have any problems, of course give some feedback. The jinja2_makemessages may not work if you have other django apps that use django templating engine, I have not tested that scenario yet.

Evgeny's avatar
updated 2010-11-14 14:20:35 -0500, answered 2010-11-14 14:19:27 -0500
edit flag offensive 0 remove flag delete link


Thanks for the feedback. Ran into problem: skins/default/templates/user_inbox.html That points me to the right direction.
Benoit's avatar Benoit (2010-11-14 14:31:52 -0500) edit
the newer code has some migrations too, it's best to back up the database, then migrate.
Evgeny's avatar Evgeny (2010-11-14 15:32:09 -0500) edit
I had messed up the .po file. However, the stock en file still has issues. For example, the "ask a question" entry. In the en file, it is a 2 locations, but the es file is at a different location. Using the es file, I can get a change, but the en file doesn't change the text. Strange.
Benoit's avatar Benoit (2010-11-17 17:42:16 -0500) edit
I think I've fixed this. Thanks there was actually a bug in the string extractor that I've set up, it was missing a variant of translation tag with a dash. You can have {% endtrans -%} if you want to "delete" the following empty space. Also, dashes can be put on either side of the tag, so I'm not 100% confident I've covered all possible cases.
Evgeny's avatar Evgeny (2010-11-18 20:45:20 -0500) edit
add a comment see more comments