Skip to content

docs(translations): document the command-line catalog workflow - #630

Merged
andris9 merged 1 commit into
masterfrom
docs/translations-cli-workflow
Aug 4, 2026
Merged

docs(translations): document the command-line catalog workflow#630
andris9 merged 1 commit into
masterfrom
docs/translations-cli-workflow

Conversation

@andris9

@andris9 andris9 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #629.

translations/README.md only described the POEdit path. That suits an outside contributor sending in one language, but not a maintainer refreshing all of them, and it left three things unsaid:

  • where messages.pot comes from (npm run gettext was not mentioned at all)
  • that the .mo is what EmailEngine actually loads, so a .po edit does nothing until it is recompiled and committed
  • that a locale has to be listed in locales.json before it is served, so a correctly translated new .po could still never render

Adds the GNU gettext equivalent of the whole loop, plus the parts that are easy to get wrong:

  • en.po is untranslated on purpose (source language, empty msgstr falls back to the msgid), so msgfmt reporting it as almost entirely untranslated is expected rather than a bug to fix
  • --no-fuzzy-matching is deliberate: it stops gettext guessing a translation for a new string from a similar old one and marking it fuzzy, which is easy to wave through in review
  • msgmerge reorders entries to match the template, so diffs are large without content changing - compare msgid lines, not line counts
  • each catalog has its own register to match rather than one house style
  • strings carry no message context, so a bare word like "Expected" cannot be disambiguated by a translator

Catalogs settled

Running the documented commands turned out to produce a diff, which would have made the README wrong on its first use. The catalogs had been committed with .po headers older than the template and with entries not yet in template order. This commit settles them.

Content is unchanged, verified rather than assumed:

  • no translation added, lost or altered in any locale (0/0/0 across all seven)
  • no .mo file is part of this commit, so nothing EmailEngine loads at runtime differs
  • a second run of the documented commands is now a no-op, so the next person gets a clean diff

Gettext coverage test passing.

The README only described the POEdit path, which suits an outside
contributor sending in one language but not a maintainer refreshing all of
them. It also never said where messages.pot comes from, that the .mo is
what actually gets loaded, or that a locale has to be listed in
locales.json before it is served at all - so a new .po could be added
correctly and still never render.

Adds the GNU gettext equivalent, plus the things that are easy to get
wrong: en.po is untranslated deliberately, --no-fuzzy-matching keeps a
guessed translation from slipping through review, the reordering makes
diffs large without changing content, and each catalog has its own
register to match.

Running the documented commands also settled the catalogs, which had been
committed with .po headers older than the template and with entries not yet
in template order. Content is unchanged - no translation added, lost or
altered, and the .mo files are byte-identical - and a second run is now a
no-op, so the next person gets a clean diff.
@andris9
andris9 merged commit b32f291 into master Aug 4, 2026
15 checks passed
@andris9
andris9 deleted the docs/translations-cli-workflow branch August 4, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant