4

I need to create translations for a Flask application using Babel or Babelex.

Run:

pybabel extract -F babel.cfg -o messages.pot .

...succeeds, creating messages.pot.

In the file messages.pot there are changes:

#: service/menu/Menu.py:53
msgid "A new menu has been successfully saved!"
msgstr "Nové menu bylo úspěšně uloženo!"

Then I create a .po file.

pybabel init -i messages.pot -d translations -l cs

The *.po file content is:

#: service/menu/Menu.py:53
msgid "A new menu has been successfully saved!"
msgstr "Nové menu bylo úspěšně uloženo!"

The translated files are broken, all files are in UTF-8. When I compile *.po file as *.mo file, it's the same.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Jarda
  • 89
  • 5
  • I know it’s an old one, but please note that you shouldn’t add translations in your `.pot` file, but in the `.po` files generated with `pybabel update`. Also, did you find a solution to your problem? I’m facing a similar one, although not the same. – GergelyPolonkai Jun 07 '17 at 07:41

0 Answers0