3 The .po structure
Bandie edited this page 2018-10-04 23:14:28 +02:00

Header

The .po file has a header which contains information about the project, of you as a new translator and some character set information. Except for you complementing your name into the "Last-Translator" field, you don't need to do anything about it.

Translation structure

The .po file will contain a structure like

msgid "Key? "
msgstr ""

Your task will be to put your translation in the quotes of msgstr including all spaces and special characters:

msgid "Key? "
msgstr "Schlüssel? "

c-format

There are also c-Strings which look like

#, c-format
msgid "Please run this program under root. Write access to %s is mandatory.\n"

which you'd have to translate including %s (which is a place holder) and \n (which is a control character).

Big messages

Sometimes there are big messages like

msgid ""
"ERROR: Arguments invalid. Note that \"allow\" and \"reject\" must have a "
"valid GPT UUID."

Just do it the same:

msgstr ""
"ERROR: Foo foo blablabla \"allow\" und \"reject\" foo awoo woo yip "
"ararara yip yap GPT UUID."