How do you guys update your .po files?

0 views
Skip to first unread message

hsk

unread,
Aug 14, 2009, 1:47:39 AM8/14/09
to CNProg open discussion
How do you update your .po files? (After making changes in the code)
I am not talking about (.po -> .mo) fyi, since that's been documented
on the wiki. :D
Do you use xgettext and msgmerge? Is anybody working on Windows by
any chance?

thanks!

Evgeny

unread,
Aug 14, 2009, 1:52:17 AM8/14/09
to CNProg open discussion
python manage.py makemessages -l <lang_code> -e html,py,txt

where lang_code is something like en, pl, etc.
that updates .po file
some translations will be guessed and if the program is not sure it
will label them with comment like

#, fuzzy

those you'll have to double-check.

Evgeny.

Evgeny

unread,
Aug 14, 2009, 12:27:04 PM8/14/09
to CNProg open discussion
I should have added to first copy some existing file that you
understand into your new directory

cp locale/en/LC_MESSAGES/django.po locale/<lang_code>/LC_MESSAGES/

and then run makemessages

This will help you translate as you will be working on msgstr strings,
which are more informative.

The xgettext is smart not to overwrite existing translations - it just
updates them based on current code.
That's where #, fuzzy commented strings will come from - when xgettext
could not guess well enough.

Evgeny.

hsk

unread,
Aug 14, 2009, 5:37:14 PM8/14/09
to CNProg open discussion
I have worked it out thanks to your help!
It seems like my post few hours ago wasn't posted. (I think I may
have pressed reply to author... I am not used to using Google Groups.)

Thank you, it seems like it was o/s directory issue. I use windows
due to some reasons and I use vmware / ubuntu 8.04 when necessary.

I basically archived my directory and moved it to ubuntu and ran with
your suggestion. It worked perfectly. (It would have worked on
windows as well except there's problem with the way directory
structure is represented.)

So, if you are using Windows... you either have to write a little
script to convert forward slashes to backslashes (In retrospect, you
can just use 'find and replace' function with any editor... d'oh!)

thanks again!

HS
Reply all
Reply to author
Forward
0 new messages