gettext 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.
# Polish translation for the Novus example file manager.
# Copyright (C) 2026 Novus Examples (sample fixture).
# This file is distributed under the same license as the novus-example package.
# Sample Translator <translator@example.invalid>, 2026.
#
msgid ""
msgstr ""
"Project-Id-Version: novus-example 2.0\n"
"Report-Msgid-Bugs-To: i18n@example.invalid\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-Team: Polish <team@example.invalid>\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"X-Generator: novus-examples localization_p7\n"
#. Window title for the file browser
#: src/browser.c:42
msgid "Files"
msgstr "Pliki"
#. Context-menu item
#: src/browser.c:207
msgid "Move to trash"
msgstr "Przenieś do kosza"
#. Item count in the status bar
#: src/browser.c:118
#, c-format
msgid "%d file"
msgid_plural "%d files"
msgstr[0] "%d plik"
msgstr[1] "%d pliki"
msgstr[2] "%d plików"
#. Selection summary
#: src/browser.c:164
#, c-format
msgid "%d folder selected"
msgid_plural "%d folders selected"
msgstr[0] "Wybrano %d folder"
msgstr[1] "Wybrano %d foldery"
msgstr[2] "Wybrano %d folderów"
#. Undo toast after a delete
#: src/trash.c:73Specifications
- Locale
- pl
- Language
- Polish
- Nplurals
- 3
- Plural Forms
- nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);
- Plural Entries
- 4
- Singular Entries
- 2
- Cldr Categories
- one, few, many, other (4) — gettext folds the last two into form 2
- Charset
- UTF-8
- Seed
- 20260807
- Wave
- p7
- Line Endings
- LF
Testing contract
Expected to pass- Scenario
- Compile with msgfmt (or parse directly) and call ngettext for a value from each of the 3 plural forms.
- Expected result
- The Plural-Forms expression selects form 0 through 2 for the counts documented in the matching CLDR fixture, and the compiled output is byte-identical to the .mo twin shipped beside it.
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 with Plural-Forms — Polish (nplurals=3)” is a deterministic Novus Examples fixture for Internationalization, Localization catalogs. Parallel text and accented, multi-script content — for testing translation pipelines, Unicode handling, and localization tooling.
Documented properties for this file: seed 20260807 · Polish · 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("app-pl.po")
print(len(po), "entries,", round(po.percent_translated()), "% translated")
for e in po[:3]:
print(e.msgid, "->", e.msgstr)Related files
- 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 — fuzzy, obsolete and untranslated entriesA 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.

- 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.

- potgettext Template (messages.pot)A gettext .pot template extracted from source — msgid entries with empty msgstr values, source-location comments, and a plural form — the starting point for a new language translation.

- resx.NET RESX — composite format strings (Arabic (Egypt))A Arabic (Egypt) resource file built around composite format strings — {0:N2}, {2:P1}, {0:C}, {0:d} and {0:t} — whose rendered output depends entirely on CultureInfo. Includes a whitespace-significant resource guarded by xml:space, and documents the suffixed-key convention .NET falls back on because String.Format has no plural selector.

- resx.NET RESX — composite format strings (English (United States))A English (United States) resource file built around composite format strings — {0:N2}, {2:P1}, {0:C}, {0:d} and {0:t} — whose rendered output depends entirely on CultureInfo. Includes a whitespace-significant resource guarded by xml:space, and documents the suffixed-key convention .NET falls back on because String.Format has no plural selector.

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