feat(cli): add Japanese and Korean - #34
Merged
Merged
Conversation
Four languages now: en, zh, ja, ko. Picked from the locale, overridable with --lang or ORCACODE_LANG. Adding a language used to be more places than it looked. It is now three: - append the code to LANGUAGES - add its locale prefixes to LOCALE_PREFIX - add the table The language picker was a hardcoded two-element array, so a new table would have shipped with no way to select it. It is generated from LANGUAGES now, and every table must carry a `lang.<code>` label for every language so each one can name the others — a test enforces that. Traditional Chinese locales (zh-TW, zh-HK) resolve to English on purpose. The vocabulary diverges enough from Simplified that serving zh reads worse than not translating, and a test pins that so nobody "fixes" it later. The parity tests only compared Chinese against English, so this change could have shipped half-translated with a green suite. They now run over every non-English table: missing keys, extra keys, function/string mismatches, and differing argument counts. The literals check — flags, gh commands, workflow input names, which must never be translated because the reader still has to type them — also runs per language now. 411 tests.
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.
Four languages:
en,zh,ja,ko. From the locale, or--lang/ORCACODE_LANG.Adding a language was more places than it looked
Now three: append to
LANGUAGES, add locale prefixes toLOCALE_PREFIX, add the table.The language picker was a hardcoded two-element array — a new table would have shipped with no way to select it. It is generated from
LANGUAGESnow, and every table must carry alang.<code>label for every language so each can name the others. A test enforces that; without it the picker renders a blank row.Traditional Chinese → English, deliberately
zh-TWandzh-HKresolve to English, not Simplified. The vocabulary diverges enough that serving zh reads worse than not translating. Pinned by a test so it doesn't get "fixed" later.The tests only checked Chinese
That's the part worth flagging. The parity suite compared
zhagainstenand nothing else, so this change could have shipped half-translated with a green suite. It now loops every non-English table:The literals check runs per language too — flags,
ghcommands, workflow input names. Those are never translated, because the reader still has to type them.356 new strings. 411 tests passing.
1.4.0 — merging publishes it.