The GNU gettext toolset helps programmers and translators at producing, updating and using translation files, mainly through POT files which are textual, editable files.
Gettext POT files are used by GNU gettext.
This format behaves a little different than most other formats in order to make it compatible with GL Strings.
Id's
When importing an Pot file Id's will be automatically generated. This follows the following Pattern
contextName$@MsgidHash[pluralisationType]
Note:
1.1 pluralistaionType is only given for plural messages.
1.2 $@ is the delimiter for the id's do not use this delimiter lightly in your msgid
1.3 If you change the Source message in your application and import the pot file again, you will end up with a legacy id since the Hash has changed. So you should try to avoid this.
Pluralisation
All pluralisation types that GL Strings supports are supported with the Gettext Pot export, but they might not be contained in your export file, since Pot files have a special pluralisation styles for many languages
Example:
For arabic (ar) export, all pluralisations would be present in the exported file [zero,one,two,few,many,other]
.
For japanese (ja) export, only one pluralisation type would be present [other]
.
Gettext Pot uses 17 of those pluralisation styles. They are conform with those from Qt TS files, most of them are documented here.
Meta attributes
After you imported a Pot file, your Project will have meta attributes called ApplangaIDContext and ApplangaIDSource and ApplangaIDPluralSource.
All those attributes should not be edited manually
Additional metadata
Metadata fields for attributes present in the Po file will also be created:
Importing & Exporting
Since this format is a template of an Gettext Po file, it can only be exported and imported in the projects source language
You can either import and export your .pot files manually on the dashboard or you can automate your pot file translation process with the GL Strings Localization CLI.
Website: https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
msgid ""
msgstr ""
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Applanga (applanga.com)\n"
msgid "empty_string_key"
msgstr ""
# Here is the description of the key
msgid "with_description_key"
msgstr "This key has a description in some file-formats."
msgid "with_line_break_key"
msgstr ""
"This key has a line break\n"
"in it."
msgid "nested_key.level_one_a.level_two"
msgstr "A deeply nested key."
msgid "nested_key.level_one_b"
msgstr "A nested key."
msgid "array_key[0]"
msgstr "first entry"
msgid "array_key[1]"
msgstr "second entry"
msgid "array_key[2]"
msgstr "third entry"
msgid "simple_key"
msgstr "Most basic translation."
msgid "plural_key"
msgid_plural ""
msgstr[0] "Plural key one"
msgstr[1] "Plural key other"