GNU gettext#
Najpopularniejszy format do tłumaczenia wolnego oprogramowania.
Contextual info stored in the file is supported by adjusting its headers or linking to corresponding source files.
Zobacz także
Tłumaczenie oprogramowania za pomocą GNU gettext, Tłumaczenie dokumentacji za pomocą Sphinx, Gettext on Wikipedia, PO Files, Komentarz współautora, Zaktualizuj zmienną ALL_LINGUAS w pliku „konfiguracyjnym”, Dostosuj wyjście gettext, Aktualizuj plik LINGUAS, Generuj pliki MO, Zaktualizuj pliki PO, aby dopasować POT (msgmerge)
PO file header#
The header of the PO file is automatically maintained by Weblate. Optionally it can include Adres do zgłaszania błędów łańcucha źródłowego and Ustaw nagłówek „Zespół Tłumaczy”.
Jednojęzyczny gettext#
Some projects decide to use gettext as monolingual formats—they code just the IDs in their source code and the string then needs to be translated to all languages, including English. This is supported, though you have to choose this file format explicitly when importing components into Weblate.
Example files#
The bilingual gettext PO file typically looks like this:
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "Monday"
msgstr "Pondělí"
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "Tuesday"
msgstr "Úterý"
#: weblate/accounts/avatar.py:163
msgctxt "No known user"
msgid "None"
msgstr "Žádný"
The monolingual gettext PO file typically looks like this:
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-monday"
msgstr "Pondělí"
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-tuesday"
msgstr "Úterý"
#: weblate/accounts/avatar.py:163
msgid "none-user"
msgstr "Žádný"
While the base language file will be:
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-monday"
msgstr "Monday"
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-tuesday"
msgstr "Tuesday"
#: weblate/accounts/avatar.py:163
msgid "none-user"
msgstr "None"
Konfiguracja Weblate#
Typical Weblate Konfiguracja komponentu for bilingual gettext |
|
---|---|
Maska pliku |
|
Jednojęzyczny bazowy plik języka |
Puste |
Szablon dla nowych tłumaczeń |
|
Format pliku |
Plik PO Gettext |
Typical Weblate Konfiguracja komponentu for monolingual gettext |
|
---|---|
Maska pliku |
|
Jednojęzyczny bazowy plik języka |
|
Szablon dla nowych tłumaczeń |
|
Format pliku |
Plik gettext PO (jednojęzyczny) |