gettext PO — fuzzy, obsolete and untranslated entries
A German catalog carrying every state a PO entry can be in but the happy one: two fuzzy entries (one of them a plural) with #| previous-msgid comments, an entry that is present but untranslated, three obsolete #~ entries including an obsolete plural and an obsolete msgctxt entry, and two complete entries as the control.
# German translation for the Novus example file manager.
# Sample Translator <translator@example.invalid>, 2026.
#
msgid ""
msgstr ""
"Project-Id-Version: novus-example 2.0\n"
"POT-Creation-Date: 2026-01-01 00:00+0000\n"
"PO-Revision-Date: 2026-01-02 12:00+0000\n"
"Last-Translator: Sample Translator <translator@example.invalid>\n"
"Language: de\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"
#. A normal, complete entry — this one compiles.
#: src/browser.c:42
msgid "Files"
msgstr "Dateien"
#. A FUZZY entry. msgfmt omits it from the .mo unless --use-fuzzy is passed, so the runtime
#. falls back to the untranslated msgid. The #| line records the msgid this translation was
#. originally written against, which is how a translator sees what changed.
#: src/browser.c:207
#, fuzzy
#| msgid "Move to bin"
msgid "Move to trash"
msgstr "In den Papierkorb verschieben"
#. A fuzzy PLURAL entry: both forms are present but the whole entry is still skipped.
#: src/browser.c:118
#, fuzzy, c-format
#| msgid "%d document"
#| msgid_plural "%d documents"
msgid "%d file"
msgid_plural "%d files"
msgstr[0] "%d Datei"
msgstr[1] "%d Dateien"
#. A complete, non-fuzzy plural entry — the control case that MUST reach the .mo.
#: src/trash.c:73
#, c-format
msgid "Deleted %d item"
msgid_plural "Deleted %d items"
msgstr[0] "%d Element gelöscht"
msgstr[1] "%d Elemente gelöscht"
#. An untranslated entry: present, empty, and NOT fuzzy.
#: src/browser.c:164
#, c-formatSpecifications
- Locale
- de
- Language
- German
- Fuzzy Entries
- 2
- Obsolete Entries
- 3
- Untranslated Entries
- 1
- Complete Entries
- 2
- Features
- #, fuzzy | #| previous msgid | #~ obsolete | empty msgstr
- Charset
- UTF-8
- Seed
- 20260807
- Wave
- p7
- Line Endings
- LF
Testing contract
Expected to pass- Scenario
- Run msgfmt without --use-fuzzy, then with it, and compare the resulting catalogs; separately, parse the file and classify every entry.
- Expected result
- Without --use-fuzzy the compiled catalog contains exactly the two complete entries; with it, four. The #~ entries never compile under either flag, and the untranslated entry must not be reported as translated-to-empty-string.
What is a .po file?
A PO file (.po, Portable Object) is a gettext translation catalog: a plain-text list of msgid (source string) and msgstr (translation) pairs, with a header defining the language and plural rules, source-location comments, and support for plural forms. It is the working file translators edit and is compiled to a binary .mo for runtime.
How to use this file
Use an example .po file to test gettext parsers, PO editors and CAT tools, translation-memory importers, and PO-to-JSON/XLIFF converters, or to exercise plural-form handling.
How to use this file for testing
“gettext PO — fuzzy, obsolete and untranslated entries” is a deterministic Novus Examples fixture for Internationalization, Localization catalogs, Error handling. Parallel text and accented, multi-script content — for testing translation pipelines, Unicode handling, and localization tooling.
Documented properties for this file: seed 20260807 · German · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Translation-catalog fixtures carry the same message set across formats, each with its native placeholder syntax. Test your i18n loader, catalog converter, or translation-memory tool, and use the RTL and CJK variants to check bidirectional text and Unicode handling.
Load the catalog with your i18n framework and verify placeholder interpolation and plural handling; the RTL and CJK variants exercise bidirectional text and font fallback.
Code examples
import polib # pip install polib
po = polib.pofile("fuzzy-obsolete-de.po")
print(len(po), "entries,", round(po.percent_translated()), "% translated")
for e in po[:3]:
print(e.msgid, "->", e.msgstr)Related files
- xmlAndroid strings.xml — escaping, xliff:g and markup rulesEvery escaping rule aapt2 enforces on a strings.xml, in one file: backslash-escaped apostrophes and quotes, quoted values that preserve leading whitespace, an escaped @ and ?, CDATA-wrapped inline HTML, <xliff:g> placeholder protection with examples, formatted="false", translatable="false" and a scoped tools:ignore.

- jsonICU MessageFormat — Apostrophe and brace quotingThe quoting rules that make ICU messages surprising: a single quote starts a literal section only when the next character is one ICU cares about, a doubled '' is always one apostrophe, and '#' inside a plural branch is a literal hash. Every message is paired with the exact string it must produce.

- pogettext Catalog — Spanish (.po)A translated gettext .po catalog (Spanish) with a full header, source-location and translator comments, c-format flags, and a plural-form entry — for testing PO parsers and translation-memory tools.

- pogettext PO — msgctxt disambiguation and multi-line stringsThe English word "Open" translated four different ways in one file — three msgctxt variants plus the context-free entry — alongside a multi-line msgid that must be concatenated with no separator, a no-c-format entry whose %% is literal text, and explicit tab and quote escapes with a significant trailing space.

- pogettext PO with Plural-Forms — Arabic (nplurals=6)A Arabic gettext catalog with a real Plural-Forms header and 6 msgstr[] forms per plural entry, source-location and extracted comments, and c-format flags. Pairs with the compiled .mo of the same content, so a loader can be tested end to end rather than on the text format alone.

- pogettext PO with Plural-Forms — Polish (nplurals=3)A Polish gettext catalog with a real Plural-Forms header and 3 msgstr[] forms per plural entry, source-location and extracted comments, and c-format flags. Pairs with the compiled .mo of the same content, so a loader can be tested end to end rather than on the text format alone.

Generated by generation/localization_p7.py. Free for any use, no attribution required — license.