Files
multica/apps/web/lib/use-cases-i18n.ts
Anderson Shindy Oki 1aa742053b i18n: add japanese locale (MUL-2893) (#3538)
* 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>
2026-06-02 14:29:29 +08:00

57 lines
2.0 KiB
TypeScript

import type { SupportedLocale } from "@multica/core/i18n";
export { docsHrefForLocale } from "@/lib/docs-href";
import { getRequestLocale } from "@/lib/request-locale";
export const getUseCaseLocale = getRequestLocale;
type UseCaseText = {
indexTitle: string;
indexSubtitle: string;
indexMetadataTitle: string;
indexMetadataDescription: string;
cardReadMore: string;
tableOfContents: string;
};
export const useCaseText: Record<SupportedLocale, UseCaseText> = {
en: {
indexTitle: "Use cases",
indexSubtitle:
"See how teams organize people and agents together with Multica.",
indexMetadataTitle: "Use cases",
indexMetadataDescription:
"See how teams put people and agents to work together with Multica.",
cardReadMore: "Read →",
tableOfContents: "On this page",
},
"zh-Hans": {
indexTitle: "案例",
indexSubtitle: "看看团队怎么用 Multica 把人和 agent 一起组织起来。",
indexMetadataTitle: "案例",
indexMetadataDescription:
"看看团队怎么用 Multica 把人和 agent 一起组织起来。",
cardReadMore: "阅读 →",
tableOfContents: "目录",
},
ko: {
indexTitle: "사용 사례",
indexSubtitle:
"팀이 Multica로 사람과 에이전트를 함께 구성하는 방법을 확인해 보세요.",
indexMetadataTitle: "사용 사례",
indexMetadataDescription:
"팀이 Multica로 사람과 에이전트를 함께 일하게 만드는 방법을 확인해 보세요.",
cardReadMore: "읽기 →",
tableOfContents: "이 페이지에서",
},
ja: {
indexTitle: "ユースケース",
indexSubtitle:
"チームが Multica で人とエージェントをどう組み合わせて動かしているかをご覧ください。",
indexMetadataTitle: "ユースケース",
indexMetadataDescription:
"チームが Multica で人とエージェントを一緒に働かせる方法をご覧ください。",
cardReadMore: "続きを読む →",
tableOfContents: "このページの内容",
},
};