From d7b817376278e9ca7d8faf023f8a307f6004b6e6 Mon Sep 17 00:00:00 2001 From: Bandie Date: Thu, 4 Oct 2018 23:13:23 +0200 Subject: [PATCH] Created New to translation? The .po file structure (markdown) --- New-to-translation?-The-.po-file-structure.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 New-to-translation?-The-.po-file-structure.md diff --git a/New-to-translation?-The-.po-file-structure.md b/New-to-translation?-The-.po-file-structure.md new file mode 100644 index 0000000..3be416e --- /dev/null +++ b/New-to-translation?-The-.po-file-structure.md @@ -0,0 +1,41 @@ +# .po structure + +## 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." +``` +