Gettext .po Parser
Parse a gettext .po file and list its entries.
Overview
Upload or paste a gettext .po file and the parser lists each translation entry - msgid, msgstr, context, references, flags, and comments - in a sortable, filterable table. Useful for inspecting a localization file without firing up Poedit or grepping by hand.
It's for developers and translators working with gettext-based i18n in Python, PHP, Rails, or any framework that ingests .po files. Reach for it when auditing translation coverage, hunting for an entry that won't render correctly, or spot-checking a .po produced by an automated extractor like xgettext.
How it works
The PO file format is defined in the GNU gettext manual: each entry is a multi-line block with optional # comment lines (translator, extracted, reference, flags) followed by required msgid and msgstr lines, with optional msgctxt for disambiguation and msgid_plural / msgstr[N] for plural forms. String literals are C-style with \n and \" escapes.
The parser tokenises the file into entries, decodes the string literals, and exposes the header entry (the one with empty msgid) separately so you can inspect the language and plural-forms metadata.
Examples
- Simple entry:
#: src/app.js:42 msgid "Welcome back" msgstr "Bon retour" - Plural form:
msgid "%d file" msgid_plural "%d files" msgstr[0] "%d fichier" msgstr[1] "%d fichiers" - With context for disambiguation:
msgctxt "menu" msgid "Open" msgstr "Ouvrir" - Fuzzy / needs review flag:
#, fuzzy msgid "Settings" msgstr "Paramètres"
FAQ
What is the empty msgid "" header entry?
The first entry's msgstr holds metadata: Language:, Plural-Forms:, Content-Type:, etc. Most tools render or update it specially.
Does it support .pot template files?
Yes - .pot and .po share the same grammar. In .pot files the msgstr is empty (the template hasn't been translated yet).
What's the difference between fuzzy and untranslated?
A fuzzy entry has a translation that was auto-merged from a similar source string and needs review. Untranslated entries have an empty msgstr.
How are plural rules expressed?
The header's Plural-Forms field contains a C-like expression (e.g. nplurals=2; plural=(n != 1);). The runtime picks msgstr[N] based on the result.