You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7595a7d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: packages/locales/SPEC.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,9 @@ tags: [i18n]
12
12
13
13
The single owner of ThinkRail's UI strings and of the rules every locale source obeys
14
14
([[architecture]] Decision 23). It ships the bundled catalogs — `en.json` is the English source of truth
15
-
and the file translators start from, and each `<tag>.json` beside it is a translation — and the pure
16
-
functions that validate a catalog, name a file's language, and pick the language to render. Its `./react`
15
+
and the file translators start from, and each `<tag>.json` beside it is a translation (currently
16
+
Spanish, Japanese, Russian, and Simplified Chinese) — and the pure functions that validate a catalog,
17
+
name a file's language, and pick the language to render. Its `./react`
17
18
entry holds the **one** i18next instance every browser surface (`apps/web`, `packages/ui`, extension web
18
19
halves) renders through, so they cannot drift onto separate instances.
19
20
@@ -94,8 +95,9 @@ so the files diff cleanly.
94
95
- English output is the contract tests pin: a catalog edit that changes English wording is a product
95
96
change, reviewed like one. Plural pairs carry real English singulars (`"1 group"`, never `"1 groups"`).
96
97
-**A bundled translation is partial by design and guarded by a test, not at runtime.** A string it lacks
97
-
renders English through the chain, so it can ship incomplete and fill in later; a new key lands in
98
-
`en.json` first. `applyLocale` loads bundled catalogs as-is (`validateCatalog` and `completePlurals` run
98
+
renders English through the chain, so it can ship incomplete and fill in later. The Russian catalog
99
+
currently covers every key in `en.json` and all four CLDR categories for its plural families; a new
100
+
key still lands in `en.json` first and should be translated in Russian in the same change. `applyLocale` loads bundled catalogs as-is (`validateCatalog` and `completePlurals` run
99
101
only on local files), so a catalog test requires every bundled translation to pass `validateCatalog`
100
102
with nothing dropped, to hold only sorted `en.json` keys — plus a plural form for a category English
101
103
lacks when the language needs one — and to carry every plural form its language needs. Changing an
0 commit comments