Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gettext .po file support #3313

Closed
lxg opened this issue Jan 29, 2022 · 0 comments · Fixed by #3369
Closed

Gettext .po file support #3313

lxg opened this issue Jan 29, 2022 · 0 comments · Fixed by #3369

Comments

@lxg
Copy link

lxg commented Jan 29, 2022

Language
PO files (Gettext)
These are files from the Gettext translation system ending with a .po extension.

Additional resources
https://en.wikipedia.org/wiki/Gettext
https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html

Implementations of highlighting exist for different IDEs, e.g. https://github.com/textmate/gettext.tmbundle/blob/master/Syntaxes/Gettext.tmLanguage

Here’s an example showing different features of the language, though there’s a few more for a full coverage. Github also seems to support it (see below) though I think it’s not optimal.

msgid ""
msgstr ""
"Language: de_DE\n"
"Content-Type: text/plain; charset=utf-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: src/demo.js:78
msgid "Hello World"
msgstr "Hallo Welt"

#: src/demo.js:91
#: src/demo.js:92
msgid "1 child"
msgid_plural "%s children"
msgstr[0] "1 Kind"
msgstr[1] "%s Kinder"

#: src/demo.js:83
msgctxt "money"
msgid "Amount"
msgstr "Betrag"

#: src/demo.js:84
msgctxt "count"
msgid "Amount"
msgstr "Menge"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant