The gettext PO and POT file format, with AI translation

GNU gettext .po and .pot catalogs with msgctxt, plurals and translator comments.

.po.potformat: gettext-poone file per locale

What it is

Gettext is the standard for C, Python (Django, Babel), PHP (WordPress), Ruby and many Linux projects. A .pot template holds the source; one .po per locale holds translations.

Example

locale/es/LC_MESSAGES/messages.po
#. Shown after a successful upload#: app/views.py:42msgctxt "upload"msgid "Saved %(count)d file"msgid_plural "Saved %(count)d files"msgstr[0] ""msgstr[1] ""

How Glossa handles it

Plurals
msgid_plural entries become plural entries: each msgstr[n] is read as the CLDR plural category it stands for in that locale (msgstr[1] is few in Russian, other in German).
Comments and context
Extracted comments (#.) become the string's context in every translation prompt; translator comments (#), references (#:) and flags (#,) are kept in the file.
Placeholders
Python %(name)s, printf %d and brace {name} placeholders are protected.
Round trip
msgctxt is part of the key, so the same msgid with different contexts stays separate and never dedupes by accident.

Translate it from the command line

Push the source-language file; strings are deduplicated against the rest of your workspace and queued for translation. Pull writes locale/es/LC_MESSAGES/messages.po back in the same format.

npx @meterapp/glossa loginnpx @meterapp/glossa push locale/es/LC_MESSAGES/messages.po --project appnpx @meterapp/glossa pull --project app --locale es,de,ja

Or ask an agent over MCP: “Push locale/es/LC_MESSAGES/messages.po to Glossa and pull Spanish.” It calls push_file and pull_file. See the CLI and MCP guides.

Questions

What is a PO file?
A PO (Portable Object) file is GNU gettext's plain-text catalog for one language. A header entry (msgid "") holds metadata such as Language, Content-Type and Plural-Forms. Each entry pairs a msgid (the source string) with a msgstr (its translation), optionally with a msgctxt context or a msgid_plural and msgstr[0], msgstr[1]… plural forms. Comments above an entry carry translator notes (#), notes extracted from the code (#.), source references (#:) and flags such as fuzzy (#,).
What is the difference between a .pot and a .po file?
A .pot (Portable Object Template) is what xgettext extracts from your source code: every msgid with an empty msgstr. Each language gets its own .po, created from the template with msginit (msginit -i messages.pot -l de -o de.po) and brought up to date with msgmerge (msgmerge --update de.po messages.pot) whenever the template changes. To go from .po back to .pot, run xgettext on the code again.
How does Glossa turn a .pot template into a .po per language?
Push the .pot as the source. Pulling a language writes a .po beside the template, named the way msginit names it (po/messages.pot → po/de.po, po/pt_BR.po): every msgid with its translation in msgstr, plural forms in msgstr[0], msgstr[1]… in that language's order, and its own Language and Plural-Forms headers. The template itself is never overwritten, and pushing an existing po/de.po imports its translations onto the template's strings.
Will AI translation break %(name)s placeholders or msgctxt?
Python %(name)s, printf %d and {name} placeholders are protected: a draft that drops or renames one is marked needs review and filed as a review task. msgctxt is part of the key, so the same msgid in two contexts is translated separately, and extracted comments (#.) are sent to the model as context.

Other formats

Moving from Crowdin? Read the comparison.

Bring every translation you have

Glossa hosts every app free, for good. Import your files, connect your chatbot to audit them, and export the fixes back into your codebase.