First time here? Check out the FAQ!
1

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".

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)
Benoit's avatar
875
Benoit
asked 14 years ago

Comments

see more comments

1 Answer

0

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 settings.py 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 manage.py 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.

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)
Evgeny's avatar
13.2k
Evgeny
updated 14 years ago, answered 14 years ago
link

Comments

Thanks for the feedback. Ran into problem: skins/default/templates/user_inbox.html That points me to the right direction.
Benoit's avatar Benoit (14 years ago)
the newer code has some migrations too, it's best to back up the database, then migrate.
Evgeny's avatar Evgeny (14 years ago)
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 (14 years ago)
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 (14 years ago)
see more comments