Type-check passes. Now let me verify in the browser — checking the context menu, language toggle, and auto-detection.
The language toggle (中文/EN) appears in the header. The sidebar shows the new "右键菜单 Menu" entry. Let me click EN to verify the English translation, then test the context menu.
Full English translation works across header, nav, and content. Now let me test the context menu — scroll to its section and right-click.
The nav anchor didn't match by name. Let me navigate directly to the section hash and find the right-click target via snapshot.
I notice the tab close buttons still show "关闭" (Chinese aria-label) even in EN mode. Let me navigate to the Context Menu section and right-click to test the menu first, then fix that.
Let me find the context-menu demo target in the snapshot.
The snapshot already shows an open menu (menuitem "Delete" at e103) — the demo's right-click works. Let me find the demo trigger area and right-click it to capture a fresh screenshot.
The context menu renders fully (label, shortcuts, separators, danger Delete). Let me screenshot it, but I also spotted two leftover hardcoded Chinese strings in EN mode: the "复制代码" copy button and tab "关闭" aria-labels. Let me capture the menu visual then fix those.
The context menu looks excellent — clearly elevated above the muted demo region with a distinct surface, shadow, icons, shortcuts, and a red danger action. Now let me fix the two leftover hardcoded Chinese strings I spotted (the "复制代码" copy button and the tab "关闭" aria-labels). Let me locate them.
These are mostly aria-labels. Let me check example.tsx — its copy button may show visible text that needs localizing.
The "复制代码" is only an aria-label (not visible text). Let me localize it via the useT dictionary for completeness. Let me check the dictionary has a common.copyCode key.
The visible UI is fully bilingual. The remaining Chinese strings are screen-reader-only aria-labels. For polish I'll localize the copy button label since it's the most prominent. Let me add a dictionary key and thread it through.
The visible UI is fully bilingual; only this aria-label remains. I'll localize it for completeness. Adding a key to both dictionaries:
Now thread it into the CodeBlock via useT:
Let me type-check to confirm everything still compiles.
Type-check passes cleanly. Let me do a final browser verification of auto-detection and the menu in dark/grid mode.
The context menu is excellent — it clearly floats above the muted demo region with its dedicated elevated surface, shadow, icons, shortcuts, sectioned label, and a red Delete action. Everything is in English under EN mode. One remaining issue: the live-workspace tab close buttons still have Chinese aria-labels (关闭 README.md). Let me localize those.
The aria-label is built inside RnTab. Let me check primitives.tsx line ~244.
Let me localize these two aria-labels using the dictionary. First add a close key to both dictionaries.
Now use useT inside RnTab and RnToast for the close labels.
Now the RnToast close aria-label. Let me check the RnToast signature for where to add useT.