Skip to content

feat(i18n): Traditional Chinese localization for Studio and ontology - #89

Merged
mroops0111 merged 3 commits into
masterfrom
feat/studio-i18n
Aug 6, 2026
Merged

feat(i18n): Traditional Chinese localization for Studio and ontology#89
mroops0111 merged 3 commits into
masterfrom
feat/studio-i18n

Conversation

@mroops0111

@mroops0111 mroops0111 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

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 against typeof en.
  • Shared core in @braidhq/schema: Locale, LocalizedText, localize(), so every package translates from one place. Ontology labels (NodeType / EdgeType / SourceRole) are now LocalizedText.
  • Language picker lives in Settings > Appearance as a dropdown (room for more locales). CJK bundles Noto Sans TC with glyph preload, so there is no font swap.
  • Studio chrome stays ontology-agnostic: no hardcoded DDD vocabulary. Source-role wording is driven by the active ontology, keeping everystory / newledge ontologies first-class.
  • Ontology DDD keeps structural terms (Bounded Context, Aggregate) in English as its ubiquitous language; only source roles translate (意圖 / 程式碼).

Terminology cleanup (separate commit)

  • ClarifyTicket was renamed to Clarification earlier, but the word "ticket" lingered in the schema event field, domain code, routes, studio params, and UI copy. Finished the rename end to end. Notably WorkspaceEvent.ticketId became clarificationId, matching History.tsx which already read clarificationId.

Verification

  • typecheck 15/15 packages, lint clean
  • tests: schema 297, core 273, studio 109, server 301

mroops0111 and others added 3 commits August 6, 2026 17:14
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>
@mroops0111
mroops0111 merged commit 895272a into master Aug 6, 2026
6 checks passed
@mroops0111
mroops0111 deleted the feat/studio-i18n branch August 6, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant