Skip to content

fix(i18n): strict EN / 中文 across play.ledring.dev - #99

Merged
FelixFangX merged 1 commit into
mainfrom
fix/i18n-strict-bilingual
Oct 17, 2026
Merged

FelixFangX merged 1 commit into
mainfrom
fix/i18n-strict-bilingual

Conversation

@FelixFangX

Copy link
Copy Markdown
Owner

Makes play.ledring.dev (GitHub Pages from docs/) strictly bilingual.

  • docs/index.html: EN / 中文 toggle; language from ?lang, the stored explicit choice (shared ledring-lang keys), 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.
  • New docs/404.html (bilingual, same language logic).
  • Reports: build-pages.mjs also generates otel-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 marked data-user-content. English output is unchanged apart from those attributes.
  • Concept demo: the toggle has 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.mjs checks that every key is used.
  • Play: the toggle is keyboard-accessible, has lang and a language-matched aria label, and keeps its labels (中文 / 英文). The remaining hard-coded labels go through DICT, commands are translate="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 ?src channel, then a legacy stored value). A new last fallback is the browser language.
  • api.ledring.dev (play-strands) is unchanged. Its error strings are English.

Verified: pnpm test (273 passed, including the Chromium scaffold-visual suite), lint, docs/demo/test-i18n.mjs, and a Playwright audit of the locally served docs/ in EN and ZH at 1440 and 390 px (landing, Play menu, how-to, start and settings, demo, reports, 404): 0 findings.

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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1461d5ba-62ef-421a-9f5a-1a95343e99e4
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@FelixFangX
FelixFangX merged commit 97a7829 into main Oct 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant