i18n(pages): add Korean (ko) locale - #857
Draft
amondnet wants to merge 1 commit into
Draft
Conversation
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 7 selected item(s). |
amondnet
force-pushed
the
i18n/pages-korean-locale
branch
3 times, most recently
from
August 12, 2026 06:19
245eee3 to
333011e
Compare
Collaborator
|
@amondnet nice work! Please rebase main |
Add a complete Korean translation of the docs site UI strings and wire ko
into the language switcher.
- pages/src/i18n/ko.ts: all 273 keys from en.ts, in the same order.
Terminology follows README.ko-KR.md (세션 뷰어, 텔레메트리, 위임 모드,
정밀도/재현율). Product names, protocol names, CLI flags and code
identifiers are left in their original form.
- Language union, translations record and SUPPORTED_LANGUAGES gain 'ko',
so browser language detection picks up ko-KR automatically.
- Navbar/Footer language menus list 한국어; the navbar badge glyph 한 gets
a Korean font stack instead of falling back to the Chinese one.
- docsMap gains an empty ko entry: doc pages fall back to English until
pages/src/content/docs/ko/ is contributed in a follow-up.
- styles/index.css: word-break: keep-all scoped to :lang(ko). Korean
separates 어절 with spaces, and the default breaking split headings
mid-word ("Agent 시스" / "템"). zh/ja depend on any-character breaking
and are verified unchanged; keep-all is a no-op for Latin text.
Verified with npm run typecheck, lint, test, build and size, plus headless
screenshots of the ko locale at 1440px across home, features, benchmark,
quickstart and docs.
Refs alibaba#471
amondnet
force-pushed
the
i18n/pages-korean-locale
branch
from
August 15, 2026 09:49
333011e to
00288bb
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.
Description
Adds Korean (
ko) as the fifth locale of the docs site, following the Russian locale (#596).pages/src/i18n/ko.tscarries all 283 keys fromen.tsin the same order, so it diffs cleanly as keys are added upstream. Terminology follows the existingREADME.ko-KR.md; product names, CLI flags and code identifiers are left as-is.Two changes beyond the three files named in #471 were required to typecheck and render:
Navbar.tsx/Footer.tsxlist한국어. The badge glyph한gets a Korean font stack — the existing one putPingFang SCfirst, which thejabranch already worked around.content/docs/index.ts—docsMapisRecord<Language, LocalizedDocs>, sokoneeds an entry. It is{}; doc pages fall back to English per-page.The new
kolabel and badge lines carryallow-non-english:markers matching the ones #876 added forzh/ja/ru;go run scripts/verify-english-only.gopasses.One fix that is not a translation
Headings and body copy broke mid-word under
ko(Agent 시스/템,교차 검/증). Korean separates 어절 with spaces, so the default line-breaking reads as broken text.word-break: keep-allis scoped to:lang(ko)via thelangattributei18n/context.tsxalready sets ondocumentElement.zh/jadepend on any-character breaking and are verified unchanged;keep-allis a no-op for Latin text, so English doc pages under thekolocale are unaffected.Before
After
Not in this PR:
pages/src/content/docs/ko/(16 pages, ~4,300 lines) is left for follow-up PRs, as #471 allows.DOCS_LOCALESincheck-translation-sync.jsstays["zh", "ja", "ru"]— addingkonow would warn on every English docs change with no Korean counterpart to update. It belongs with the first docs batch.Type of Change
How Has This Been Tested?
make testpasses locallyThe diff is confined to
pages/, so the Go suite is not exercised by it;make checkpasses. Locally, matchingpages-ci.yml:typecheck,lint,test(25/25),build,size(94.2 kB / 150 kB) all pass.Key completeness is enforced by the type system —
TranslationKeysisRecord<TranslationKey, string>, so one missing key failstypecheck.Rendering was checked with headless Chrome against the production build, driving the locale via
--accept-lang=ko-KRso it exercises the real browser-language-detection path. Navbar tabs, the five highlight stat labels, the eight benchmark table headers and the nineteen docs sidebar entries all fit without clipping. The same pages were captured underenandjato confirm the CSS change is scoped.Checklist
go fmt,go vet)No tests added — the locale is data, and its one invariant (key completeness) is enforced at compile time. Happy to add a key-parity test covering all locales if you'd like one.
Related Issues
Closes #471
Follow-up: Korean docs pages, which I plan to submit in batches mirroring #696 / #698 / #701 rather than one large PR.