feat(docs): add the Japanese locale with an English fallback for API reference - #434
Merged
Conversation
|
Contributor
|
Size Change: 0 B Total Size: 98.7 kB ℹ️ View Unchanged
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #434 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 58 58
Lines 1652 1652
Branches 499 499
=========================================
Hits 1652 1652 🚀 New features to boost your workflow:
|
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.
Summary
Adds Japanese (
ja) as the third documentation locale.Adding the locale required one registry entry (
localeDefinitions.ja) and one strings file (.vitepress/locales/ja.mts) — the rewrites, sidebar, navigation, language picker, search translations, and fallback generation are all derived from the registry.What changed in the verifier
verifyDocsI18n.tsnow assertsjais registered, its rewrites and generated rewrites resolve, and that it ships search translations (without them the search UI silently renders in English — the field is optional in the type).jatozh-Hansso it keeps covering the "buildLocaleConfig works for a locale not in the registry" case now thatjais real.Translation provenance
The Japanese prose was drafted from the English sources and reviewed by a
translation-revieweragent (added in this PR at.claude/agents/agent-translation-reviewer.md) against a category-based rubric: meaning, glossary, fluency, register, code, link, structure. Every file went through two draft → review → revise rounds; all findings from both rounds were applied.This has not been reviewed by a human native speaker. Corrections are welcome as follow-up PRs. The reviewer agent's glossary and do-not-translate list are in the repo so they can be corrected the same way.
Search verification
Run against
yarn docs:previewon the/ja/locale, VitePress local search (MiniSearch, default tokenizer):useDebounceuseDebounceranked firstuseToggleuseToggleranked firstmergeRefsmergeRefsranked firstuseSafeAreaInsetuseSafeAreaInsetranked firstImpressionAreaImpressionArearanked firstインストールインストールpage ranked first設計原則設計原則page ranked first依存関係設計原則 > 依存関係ゼロによる軽量さと高速さ8/8. No tokenizer customisation needed for this pilot.
Regression check
Sidebar and navigation link inventories for
/core/intro(46 links) and/ko/core/intro(48 links) are byte-identical before and after this change./jabuilds to 66 HTML pages (11 translated + 55 fallback).Gates
yarn test(lint, format, type) ✅yarn test:spec✅yarn test:docs(real VitePress build + fallback/banner/sidebar assertions) ✅Known issues
None.
Follow-up
yarn docs:gencurrently translates to Korean only (generateDocs/translate.tshard-codes the target language); parameterising it is a prerequisite.CONTRIBUTING.mdonce the reviewer agent has been used by someone other than the author.