PO files are plain text files that contain your translation. You can safely edit them by hand.
po minimalistic example (en_US/LC_MESSAGES/mydomain.po
):
msgid ""
msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Simple test"
msgstr "A small sentence in english"
Once edited, each PO file must be indexed using:
msgfmt mydomain.po -o mydomain.mo
This command won't work if you don't have gettext tools installed on your system.
This will produce a MO file (machine object) indexing your translation for quick access.
Then you have to translate this file in other languages.
po minimalistic example (fr_FR/LC_MESSAGES/mydomain.po
):
msgid ""
msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Simple test"
msgstr "Une petite phrase en français"
The translation file must also be indexed:
msgfmt mydomain.po -o mydomain.mo