mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 11:48:42 +02:00
* i18n: add japanese locale * fix: spacing issues * refactor * fix(desktop): set <html lang> before paint to avoid JA Kanji font flash Switch the documentElement.lang sync from useEffect to useLayoutEffect so lang is committed before the first paint. Otherwise Japanese desktop users saw one frame of Kanji rendered with the Chinese-first fallback stack before the html[lang|="ja"] CJK override applied. Also fix the stale selector in the HTML_LANG comment (html[lang^="ja"] -> html[lang|="ja"]). Addresses review nits on MUL-2893. Co-authored-by: multica-agent <github@multica.ai> * fix(docs): tokenize the ideographic iteration mark in JA search Add U+3005 (々) to the Japanese search tokenizer character class. It sits just below the kana blocks, so words like 様々 / 日々 / 個々 previously dropped the mark and split awkwardly, hurting recall. Addresses a review nit on MUL-2893. Co-authored-by: multica-agent <github@multica.ai> * fix(i18n): restore ja locale parity after merging main Merging main brought new EN strings into agents/chat/onboarding/settings/ squads that the ja bundle (authored against an older snapshot) lacked, breaking the locales parity test. Add the Japanese translations for the new keys (workspace logo upload, agents runtime filter, chat session-history stop dialog, onboarding social_github, squad archived status) and drop the two renamed chat window keys (active_group / archived_group) that EN removed in favour of history_group. Fixes the failing @multica/views parity.test.ts on the FE CI for MUL-2893. Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: J <j@multica.ai> Co-authored-by: multica-agent <github@multica.ai>
81 lines
2.5 KiB
TypeScript
81 lines
2.5 KiB
TypeScript
import type { Translations } from "fumadocs-ui/i18n";
|
|
import type { Lang } from "./i18n";
|
|
|
|
// Fumadocs built-in UI strings (search, TOC, last-updated, etc.) per locale.
|
|
// English uses Fumadocs defaults so we only override Chinese.
|
|
export const uiTranslations: Partial<Record<Lang, Partial<Translations>>> = {
|
|
zh: {
|
|
search: "搜索",
|
|
searchNoResult: "没有找到结果",
|
|
toc: "本页目录",
|
|
tocNoHeadings: "无章节",
|
|
lastUpdate: "最后更新于",
|
|
chooseLanguage: "选择语言",
|
|
nextPage: "下一页",
|
|
previousPage: "上一页",
|
|
chooseTheme: "切换主题",
|
|
editOnGithub: "在 GitHub 上编辑",
|
|
},
|
|
ko: {
|
|
search: "검색",
|
|
searchNoResult: "결과가 없습니다",
|
|
toc: "이 페이지에서",
|
|
tocNoHeadings: "제목 없음",
|
|
lastUpdate: "마지막 업데이트",
|
|
chooseLanguage: "언어 선택",
|
|
nextPage: "다음 페이지",
|
|
previousPage: "이전 페이지",
|
|
chooseTheme: "테마 변경",
|
|
editOnGithub: "GitHub에서 편집",
|
|
},
|
|
ja: {
|
|
search: "検索",
|
|
searchNoResult: "結果が見つかりません",
|
|
toc: "このページの内容",
|
|
tocNoHeadings: "見出しなし",
|
|
lastUpdate: "最終更新",
|
|
chooseLanguage: "言語を選択",
|
|
nextPage: "次のページ",
|
|
previousPage: "前のページ",
|
|
chooseTheme: "テーマを変更",
|
|
editOnGithub: "GitHub で編集",
|
|
},
|
|
};
|
|
|
|
// Display name shown in the LanguageToggle dropdown.
|
|
export const localeLabels: Record<Lang, string> = {
|
|
en: "English",
|
|
zh: "简体中文",
|
|
ko: "한국어",
|
|
ja: "日本語",
|
|
};
|
|
|
|
// Copy for the welcome page (Hero + Byline). Pages are translated as MDX;
|
|
// this dict only carries TSX-rendered chrome above the MDX body.
|
|
export const homeCopy = {
|
|
en: {
|
|
eyebrow: "Multica Docs",
|
|
titleLead: "Humans and agents,",
|
|
titleAccent: "in one place.",
|
|
byline: ["Getting started", "Updated April 2026", "6 min read"],
|
|
},
|
|
zh: {
|
|
eyebrow: "Multica 文档",
|
|
titleLead: "人与智能体,",
|
|
titleAccent: "共处一方。",
|
|
byline: ["开始使用", "2026 年 4 月更新", "阅读约 6 分钟"],
|
|
},
|
|
ko: {
|
|
eyebrow: "Multica 문서",
|
|
titleLead: "사람과 에이전트,",
|
|
titleAccent: "한곳에서.",
|
|
byline: ["시작하기", "2026년 4월 업데이트", "약 6분 읽기"],
|
|
},
|
|
ja: {
|
|
eyebrow: "Multica ドキュメント",
|
|
titleLead: "人とエージェントが、",
|
|
titleAccent: "一つの場所に。",
|
|
byline: ["はじめに", "2026年4月更新", "約6分で読めます"],
|
|
},
|
|
} as const satisfies Record<Lang, unknown>;
|