feat(i18n): Traditional Chinese localization for Studio and ontology - #89
Merged
Conversation
End-to-end internationalization with English and Traditional Chinese.
Shared core: Locale, SUPPORTED_LOCALES, LocalizedText, and localize live in
@braidhq/schema, so every package draws locales from one list.
Studio UI: react-i18next with i18next-icu, per-area catalogs under
locales/{en,zh-Hant}/, ICU plurals, a locale-aware date and relative-time
formatter, and a language dropdown in Appearance settings. Browser-locale
auto-detect and dynamic html lang.
Ontology labels: the descriptor label becomes LocalizedText, and the DDD
plugin declares its zh-Hant labels in a locales/ folder. Structural DDD
jargon stays English (Bounded Context, Aggregate, Command, Domain Event),
generic terms and source roles translate (Actor, Business Rule, Intent,
Code). Studio resolves labels by the active locale, and node-type badges,
the filter, and the legend now render the label instead of the raw id.
CJK font: bundle Noto Sans TC and preload the catalog glyphs before first
paint, so Chinese chrome never swaps font.
Also normalize i18n key names to one i18next-standard convention, with
Title, Description, Button, and Tooltip suffixes and no abbreviations.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ClarifyTicket was renamed to Clarification earlier, but the word "ticket" lingered in the schema event field, domain code, routes, studio params, and UI copy. Unify to one term end to end. - schema: WorkspaceEvent.ticketId -> clarificationId, matching History.tsx which already read clarificationId - core, server: local names, error messages, OpenAPI descriptions - studio: api/query params, en/zh review copy (Tickets -> Clarifications, 工單 -> 釐清) - workspace MCP example keeps its external-tracker sense (issues, 議題) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Follow-up consistency pass over the zh-Hant catalog and the English copy it mirrors. - Remove the deleted "decision log" concept: reject, answer, and skip reasons land in the history log (決策記錄 becomes 歷史紀錄, "decision log" becomes "history log"); restore copy no longer lists "decisions"; the account dialog says HITL reviews, not HITL decisions - One zh word per concept: answer 回答 (was 回覆), turn 回合 (was 輪), workspace 工作區 (was 工作空間), resolve 解決 (was 解析), bootstrap 啟動建置 (was bare 啟動) - dismiss 忽略, kept distinct from skip 略過 - Translate leftover Latin surface names in review.batch (動作, 釐清, 歷史, 活動, 工作區設定, 技能權限) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Full English + Traditional Chinese localization for
@braidhq/studio, switchable at runtime, plus two cleanup passes that surfaced while translating.What changed
i18n foundation
react-i18next+i18next-icu(ICU MessageFormat for plurals and interpolation), catalogs bundled as typed TS modules so every key is compile-time checked againsttypeof en.@braidhq/schema:Locale,LocalizedText,localize(), so every package translates from one place. Ontology labels (NodeType/EdgeType/SourceRole) are nowLocalizedText.Terminology cleanup (separate commit)
ClarifyTicketwas renamed toClarificationearlier, but the word "ticket" lingered in the schema event field, domain code, routes, studio params, and UI copy. Finished the rename end to end. NotablyWorkspaceEvent.ticketIdbecameclarificationId, matchingHistory.tsxwhich already readclarificationId.Verification