Own the English translation files in-repo - #593
Merged
Conversation
sandhose
force-pushed
the
quenting/i18n-english
branch
from
August 24, 2026 08:08
6072049 to
13352f5
Compare
Deploying admin-beta-element-dev with
|
| Latest commit: |
5c7ec31
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://35cf2b87.admin-beta-element-dev.pages.dev |
| Branch Preview URL: | https://quenting-i18n-english.admin-beta-element-dev.pages.dev |
sandhose
force-pushed
the
quenting/i18n-english
branch
2 times, most recently
from
August 25, 2026 10:26
83fa8be to
0c4d580
Compare
sandhose
marked this pull request as ready for review
August 25, 2026 11:00
Production builds strip defaultMessage, so a new or reworded English string only renders once translations/compiled/en.json contains it — and until now that file was only ever written by the Localazy download workflow. A PR changing English copy therefore shipped raw message IDs until the next translations download landed, and the Playwright suite (which runs against a production build) could not assert on the new copy in the same PR. English never needed the roundtrip: translations/translated/en.json as downloaded from Localazy is byte-for-byte the extracted file minus the descriptions. Derive it locally instead (scripts/i18n-sync-en.mjs), chain i18n:compile onto pnpm i18n:extract so one command regenerates all three English files, and stop downloading the source language from Localazy. The other locales are untouched: they still come from Localazy through the download workflow's automated PRs. CI now checks that the committed translation files match the source, so they can no longer drift from the code. That also re-syncs the extracted file here: the dependency bump in bbe747b changed the field order @formatjs/cli emits within each entry (message and description swapped), and the file had not been regenerated since.
/users, /rooms, /federation/known-domains and /registration-tokens wrote
their zero-item plural arm as `zero {No users}`, which never fires: `zero`
is a CLDR plural category and English has no zero category, so
Intl.PluralRules picks `other` and the heading read "0 users". The other
four list pages already used the exact-match `=0` form.
Fixed in the four route sources, with the English translation files
regenerated. The other locales carry the same dead `zero` arm; that is
harmless (the arm is never selected in any of them) and Localazy owns
those files, so it gets fixed there and arrives with a future
translations download.
sandhose
force-pushed
the
quenting/i18n-english
branch
from
September 2, 2026 08:25
0c4d580 to
5c7ec31
Compare
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.
Production builds strip
defaultMessage, so new or reworded English copy only renders oncetranslations/compiled/en.jsoncontains it — and that file was only ever written by the Localazy download workflow, meaning English changes shipped as raw message IDs until the next translations download.English never needed that roundtrip:
translated/en.jsonis derivable from the extracted file. This derives it locally (scripts/i18n-sync-en.mjs), chainspnpm i18n:extractso one command regenerates all three English files, stops downloading the source language from Localazy, and adds a CI check that fails when the committed files drift from the source.The second commit is the first beneficiary: four list pages wrote their zero-count heading as
zero {No users}, a CLDR plural category English doesn't have, so empty lists read "0 users". Other locales get the fix through Localazy.