Closed cedricmessiant closed 10 years ago
It's amazing how fragile Babel is. I'm curious why you are still using Babel to handle pot/po files; can you explain that to me? Perhaps there is something missing in lingua that I need to add.
I don't know ! What are the alternatives to Babel to generate .po files from pot files ?
All your need is lingua, as of lingua 2. Specifically all you need is the pot-create
command it provides. The lingua documentation should explain everything you need.
I'm really sorry but I don't find an equivalent to this command in lingua documentation :
pybabel update -l fr -i messages.pot -D mydomain -o messages.po
There isn't one, by design. Updating and compiling PO files is handled by the standard msgmerge
and msgfmt
commands from standard gettext, and there is nothing to be gained by reimplementing those in Python. Since a reimplementation is only likely to introduce new bugs (and I have seen Babel corrupt PO files) I felt no need to go down that path.
The equivalent of your command is:
msgmerge messages.po messages.pot
and to compile that to a .mo file:
msgfmt messages.po
Okay, thanks a lot !
Remove colon because it breaks Babel when generating .po files