Add gettext .po/.pot dictionary support#178
Merged
Merged
Conversation
Parse .po and .pot files as dictionaries for translation tracking. Source .pot templates emit all msgids as keys; locale .po files only emit entries with non-empty, non-fuzzy translations. Contexts map to nested dictionary keys.
ascorbic
added a commit
to emdash-cms/emdash
that referenced
this pull request
Apr 11, 2026
Configure Lunaria to track PO files directly using dictionary mode (via lunariajs/lunaria#178). Add Spanish as first translation locale. - Add lunaria.config.json with PO dictionary tracking - Add Spanish locale to Lingui config and extract empty catalog - Add locale:extract and locale:compile scripts to root
8 tasks
ascorbic
added a commit
to emdash-cms/emdash
that referenced
this pull request
Apr 11, 2026
* Add Lunaria translation tracking with PO dictionary support Configure Lunaria to track PO files directly using dictionary mode (via lunariajs/lunaria#178). Add Spanish as first translation locale. - Add lunaria.config.json with PO dictionary tracking - Add Spanish locale to Lingui config and extract empty catalog - Add locale:extract and locale:compile scripts to root * Switch Lunaria config to TypeScript with defineConfig * Fix Lunaria config: include only source file, not all PO files * Add translation status dashboard deployable to i18n.emdashcms.com Static HTML dashboard generated from Lunaria, deployed as Cloudflare Workers static assets. Shows per-locale completion with progress bars, missing keys, and GitHub edit links. * Move Lunaria build/deploy scripts into i18n/ package * Add Lunaria GitHub Action for PR translation impact comments * Add i18n workspace package, update lockfile * style: format * Replace Spanish with German as first translation locale * fix ts * style: format * Add wrangler --------- Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com>
fmhall
pushed a commit
to fmhall/emdash
that referenced
this pull request
Apr 13, 2026
* Add Lunaria translation tracking with PO dictionary support Configure Lunaria to track PO files directly using dictionary mode (via lunariajs/lunaria#178). Add Spanish as first translation locale. - Add lunaria.config.json with PO dictionary tracking - Add Spanish locale to Lingui config and extract empty catalog - Add locale:extract and locale:compile scripts to root * Switch Lunaria config to TypeScript with defineConfig * Fix Lunaria config: include only source file, not all PO files * Add translation status dashboard deployable to i18n.emdashcms.com Static HTML dashboard generated from Lunaria, deployed as Cloudflare Workers static assets. Shows per-locale completion with progress bars, missing keys, and GitHub edit links. * Move Lunaria build/deploy scripts into i18n/ package * Add Lunaria GitHub Action for PR translation impact comments * Add i18n workspace package, update lockfile * style: format * Replace Spanish with German as first translation locale * fix ts * style: format * Add wrangler --------- Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description (required)
Adds support for gettext
.poand.potfiles as a dictionary format, allowing Lunaria to track translation completeness for projects using the gettext toolchain.How it works:
.pot(template) files emit all msgids as keys, so they work as source dictionaries.po(locale) files only emit entries with non-empty, non-fuzzy translations — untranslated and fuzzy entries are correctly reported as missing keysmsgctxtmaps to nested dictionary keys; entries without context stay at the top levelmsgstr[n]forms to be non-empty to count as translatedUses the
gettext-parserpackage for parsing.Related issues & labels (optional)