Repository navigation
fix(i18n): strict EN / 中文 across play.ledring.dev - #99
Merged
Merged
Conversation
Make the docs landing page bilingual with a toggle and browser-language default, add a bilingual 404 page, generate a Chinese OTel sample report, translate the remaining report chrome in the zh renderer and mark trace data as user content, wire every concept-demo translation (including inline-HTML strings), and route Play's remaining hard-coded labels through DICT. Play now falls back to the browser language only when no ?lang, stored choice or ?src channel decides.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Makes play.ledring.dev (GitHub Pages from
docs/) strictly bilingual.docs/index.html: EN / 中文 toggle; language from?lang, the stored explicit choice (sharedledring-langkeys), then the browser language. Every string is translated, and the sample-report links point to the zh reports in Chinese mode. Links to Play and the demo carry?lang.docs/404.html(bilingual, same language logic).build-pages.mjsalso generatesotel-genai-zh.html. The zh renderer translates node captions, error badges, tooltips, outcome words and the aria label. Trace data (the instruction, node signatures, run ids) is markeddata-user-content. English output is unchanged apart from those attributes.lang="zh-CN"and an English aria label. Inline-HTML translations (trust.never,wall.p,map.p, the guardrail line) are now applied, the ring-art labels are translated, config values are tagged as code.test-i18n.mjschecks that every key is used.langand a language-matched aria label, and keeps its labels (中文 / 英文). The remaining hard-coded labels go through DICT, commands aretranslate="no", live trend items are marked as user content, and the Chinese feed localization is unchanged. Language precedence is unchanged (?lang, then the explicit choice, then the?srcchannel, then a legacy stored value). A new last fallback is the browser language.Verified:
pnpm test(273 passed, including the Chromium scaffold-visual suite), lint,docs/demo/test-i18n.mjs, and a Playwright audit of the locally serveddocs/in EN and ZH at 1440 and 390 px (landing, Play menu, how-to, start and settings, demo, reports, 404): 0 findings.