Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
MUL-6850 fix(i18n): localize onboarding status label and lint the attribute/toast copy path (#7776)
Bohan Jiangc1e1f11e21cc
diff --git a/packages/views/agents/components/agent-avatar-stack.tsx b/packages/views/agents/components/agent-avatar-stack.tsxindex 948f6e667d..b9ce160131 100644--- a/packages/views/agents/components/agent-avatar-stack.tsx+++ b/packages/views/agents/components/agent-avatar-stack.tsx@@ -4,6 +4,7 @@ import { ActorAvatar as ActorAvatarBase } from "@multica/ui/components/common/acimport { AVATAR_SIZE_PX, type AvatarSize } from "@multica/ui/lib/avatar-size";import { useActorName } from "@multica/core/workspace/hooks";import { cn } from "@multica/ui/lib/utils";+import { useT } from "../../i18n";interface AgentAvatarStackProps {// Agent ids to render, in display order. The component does NOT dedupe —@@ -41,6 +42,7 @@ export function AgentAvatarStack({className,}: AgentAvatarStackProps) {const { getActorName, getActorInitials, getActorAvatarUrl } = useActorName();+ const { t } = useT("agents");if (agentIds.length === 0) return null;const visible = agentIds.slice(0, max);@@ -84,7 +86,9 @@ export function AgentAvatarStack({fontSize: Math.max(9, Math.round(px * 0.45)),}}className="ring-2 ring-background rounded-full bg-muted text-muted-foreground inline-flex items-center justify-center font-medium tabular-nums"- aria-label={`${overflow} more`}+ aria-label={t(($) => $.avatar_stack.overflow_aria, {+ count: overflow,+ })}>+{overflow}</span>diff --git a/packages/views/agents/components/tabs/mcp-server-dialog.tsx b/packages/views/agents/components/tabs/mcp-server-dialog.tsxindex 6199035a1c..4c8337edb5 100644--- a/packages/views/agents/components/tabs/mcp-server-dialog.tsx+++ b/packages/views/agents/components/tabs/mcp-server-dialog.tsx@@ -398,6 +398,8 @@ export function McpServerDialog({onChange={(event) =>setForm((current) => ({ ...current, command: event.target.value }))}+ // An example command the user types, not copy.+ // eslint-disable-next-line no-restricted-syntaxplaceholder="npx"aria-invalid={formError === "command" || undefined}/>@@ -564,13 +566,21 @@ function KeyValueEditor({rows: KeyValue[];onChange: (rows: KeyValue[]) => void;}) {+ // `label` / `addLabel` / `removeLabel` arrive translated from the caller, but+ // the per-row strings are this component's own — including the aria-labels,+ // which used to concatenate an English word onto a translated label and read+ // out half in each language.+ const { t } = useT("agents");return (<fieldset className="space-y-2"><legend className="text-body font-medium">{label}</legend>{rows.map((row, index) => (<div key={index} className="grid grid-cols-[1fr_1fr_auto] gap-2"><Input- aria-label={`${label} key ${index + 1}`}+ aria-label={t(($) => $.tab_body.mcp_config.dialog_pair_key_aria, {+ label,+ index: index + 1,+ })}name={`mcp-pair-key-${index}`}autoComplete="off"spellCheck={false}@@ -580,10 +590,15 @@ function KeyValueEditor({itemIndex === index ? { ...item, key: event.target.value } : item,))}- placeholder="Key"+ placeholder={t(+ ($) => $.tab_body.mcp_config.dialog_pair_key_placeholder,+ )}/><Input- aria-label={`${label} value ${index + 1}`}+ aria-label={t(($) => $.tab_body.mcp_config.dialog_pair_value_aria, {+ label,+ index: index + 1,+ })}name={`mcp-pair-value-${index}`}autoComplete="off"spellCheck={false}@@ -593,7 +608,9 @@ function KeyValueEditor({itemIndex === index ? { ...item, value: event.target.value } : item,))}- placeholder="Value"+ placeholder={t(+ ($) => $.tab_body.mcp_config.dialog_pair_value_placeholder,+ )}/><Buttontype="button"diff --git a/packages/views/chat/components/chat-message-list.tsx b/packages/views/chat/components/chat-message-list.tsxindex 5fb212f495..ce5aa92f04 100644--- a/packages/views/chat/components/chat-message-list.tsx+++ b/packages/views/chat/components/chat-message-list.tsx@@ -718,7 +718,10 @@ function QuickActions({return (<div className="mt-2 border-t border-border/40 pt-2 animate-in fade-in slide-in-from-bottom-1 duration-300">- <div className="flex flex-wrap items-center gap-2" aria-label="Suggested follow-ups">+ <div+ className="flex flex-wrap items-center gap-2"+ aria-label={t(($) => $.message_list.quick_actions_aria)}+ ><QuickActionsHeading />{actions.slice(0, 3).map((action, index) => (// The whole pill previews its hidden prompt on hover: clickingdiff --git a/packages/views/eslint-i18n-guard.d.mts b/packages/views/eslint-i18n-guard.d.mtsnew file mode 100644index 0000000000..35dbcbc738--- /dev/null+++ b/packages/views/eslint-i18n-guard.d.mts@@ -0,0 +1,11 @@+// `eslint-i18n-guard.mjs` stays plain JS so eslint.config.mjs can import it+// without a TS loader; this declares its shape for eslint-i18n-guard.test.ts.+// The shape is ESLint's `no-restricted-syntax` object form.+export declare const NO_UNTRANSLATED_ATTRIBUTES: {+ selector: string;+ message: string;+};+export declare const NO_UNTRANSLATED_TOAST: {+ selector: string;+ message: string;+};diff --git a/packages/views/eslint-i18n-guard.mjs b/packages/views/eslint-i18n-guard.mjsnew file mode 100644index 0000000000..ba1b8a3fd5--- /dev/null+++ b/packages/views/eslint-i18n-guard.mjs@@ -0,0 +1,60 @@+// The other half of the i18n surface (MUL-6850). User-visible copy reaches the+// screen through two doors `i18next/no-literal-string` never watches — a JSX+// attribute and a toast argument — which is why MUL-6838 had to hand-fix ~30+// such strings after they had already shipped. Widening the plugin to+// `mode: "jsx-only"` is not the answer: measured on this package it reports+// 2639 errors, because it validates every literal that appears anywhere inside+// JSX (`isColVisible("status")`, `{ month: "short" }`, enum keys) and only ~10+// of those are copy. So the two doors are pinned individually instead — the+// same technique apps/desktop uses to guard shell.openExternal and+// router.navigate.+//+// Selectors live here rather than inline in eslint.config.mjs so+// eslint-i18n-guard.test.ts can lint fixtures against the very same strings the+// build enforces. A guard that is only spot-checked by hand drifts back into a+// hole: the first iteration of this rule matched a bare `Literal` child only,+// so `toast.error(err instanceof Error ? err.message : "Failed to save")` and+// ``aria-label={`${overflow} more`}`` both sailed through it.++const COPY_ATTRIBUTE =+ "JSXAttribute[name.name=/^(placeholder|title|aria-label)$/]";++// A literal with a letter in it. `https?:`-prefixed values are URLs and example+// endpoints, never copy.+const BARE_COPY = "Literal[value=/[A-Za-z]/]:not([value=/^https?:/])";++// A template is copy only when one of its *static* chunks carries a letter:+// `` `${label} key ${index}` `` has the English word "key" baked in, while+// `` `${a}: ${b}` `` is pure interpolation of already-translated values and is+// left alone.+const BARE_COPY_TEMPLATE =+ "TemplateLiteral > TemplateElement[value.raw=/[A-Za-z]/]:not([value.raw=/^https?:/])";++// Both `toast("…")` and `toast.error("…")` / `.success` / `.warning`.+const TOAST =+ ":matches(CallExpression[callee.name='toast'], CallExpression[callee.object.name='toast'])";++// The copy is just as untranslated when it is the fallback half of a+// `err instanceof Error ? err.message : "Failed to save"` or a `msg || "…"`.+const FALLBACK = ":matches(ConditionalExpression, LogicalExpression)";++export const NO_UNTRANSLATED_ATTRIBUTES = {+ selector: [+ `${COPY_ATTRIBUTE} > ${BARE_COPY}`,+ `${COPY_ATTRIBUTE} > JSXExpressionContainer > ${BARE_COPY}`,+ `${COPY_ATTRIBUTE} > JSXExpressionContainer > ${BARE_COPY_TEMPLATE}`,+ ].join(", "),+ message:+ "User-visible text in placeholder/title/aria-label must come from useT() — a screen reader reads aria-label the way a sighted user reads a JSX child. Exempt technical values (a CLI command, a token prefix) with an inline eslint-disable and a reason.",+};++export const NO_UNTRANSLATED_TOAST = {+ selector: [+ `${TOAST} > ${BARE_COPY}`,+ `${TOAST} > ${BARE_COPY_TEMPLATE}`,+ `${TOAST} > ${FALLBACK} > ${BARE_COPY}`,+ `${TOAST} > ${FALLBACK} > ${BARE_COPY_TEMPLATE}`,+ ].join(", "),+ message:+ "Toast copy must come from useT(). Pass a translated string, not a literal — including the fallback half of a `err.message : \"…\"` ternary.",+};diff --git a/packages/views/eslint-i18n-guard.test.ts b/packages/views/eslint-i18n-guard.test.tsnew file mode 100644index 0000000000..5e84c5290c--- /dev/null+++ b/packages/views/eslint-i18n-guard.test.ts@@ -0,0 +1,113 @@+// @vitest-environment node+import { describe, expect, it } from "vitest";+import { Linter } from "eslint";+import tsParser from "@typescript-eslint/parser";+import {+ NO_UNTRANSLATED_ATTRIBUTES,+ NO_UNTRANSLATED_TOAST,+} from "./eslint-i18n-guard.mjs";++// These fixtures ARE the specification of the guard. The rule's first+// iteration matched only a bare `Literal` child, so every "indirect" case+// below reached production untranslated while `pnpm lint` stayed green — a+// hand-run probe of the direct cases had reported success. Asserting the+// indirect shapes here is what keeps that hole closed.++const linter = new Linter();++function lint(code: string): string[] {+ const messages = linter.verify(+ code,+ [+ {+ files: ["**/*.tsx"],+ languageOptions: {+ parser: tsParser,+ parserOptions: {+ ecmaVersion: "latest",+ sourceType: "module",+ ecmaFeatures: { jsx: true },+ },+ },+ rules: {+ "no-restricted-syntax": [+ "error",+ NO_UNTRANSLATED_ATTRIBUTES,+ NO_UNTRANSLATED_TOAST,+ ],+ },+ },+ ],+ "fixture.tsx",+ );+ // A fixture that stops parsing would silently "pass" every allow-case.+ const parseError = messages.find((m) => m.fatal);+ if (parseError) {+ throw new Error(`fixture failed to parse: ${parseError.message}`);+ }+ return messages.map((m) => m.message);+}++function flags(code: string): boolean {+ return lint(code).length > 0;+}++describe("no untranslated attribute copy", () => {+ it.each([+ ['direct literal', '<input placeholder="Search issues" />'],+ ['title', '<span title="Copy link" />'],+ ['aria-label', '<input aria-label="Select all sub-issues" />'],+ ['expression container', '<input title={"Expression copy"} />'],+ ['template literal', '<input aria-label={`Select ${id}`} />'],+ ['interpolated template', '<input aria-label={`${label} key ${i}`} />'],+ ])("flags %s", (_name, code) => {+ expect(flags(code)).toBe(true);+ });++ it.each([+ ['translated call', '<input placeholder={t(($) => $.search)} />'],+ ['URL literal', '<a title="https://example.com" />'],+ ['URL template', '<a title={`https://example.com/${id}`} />'],+ // Pure interpolation of already-translated values: no static English.+ ['no static letters', '<span aria-label={`${a}: ${b}`} />'],+ // Only the three copy-bearing attributes are guarded.+ ['unguarded attribute', '<div className="flex items-center" />'],+ ['numeric literal', '<input placeholder="0" />'],+ ])("allows %s", (_name, code) => {+ expect(flags(code)).toBe(false);+ });+});++describe("no untranslated toast copy", () => {+ it.each([+ ['bare toast', 'toast("Saved");'],+ ['toast.error', 'toast.error("Failed to save");'],+ ['toast.success', 'toast.success("Workspace created");'],+ ['template literal', 'toast.error(`Failed to save`);'],+ // The shape that shipped untranslated in source-backfill-modal.tsx.+ [+ 'ternary fallback',+ 'toast.error(err instanceof Error ? err.message : "Failed to save");',+ ],+ ['logical fallback', 'toast.error(msg || "Something went wrong");'],+ ['nullish fallback', 'toast.error(msg ?? "Something went wrong");'],+ ['guarded literal', 'toast.error(shouldWarn && "Check your input");'],+ ])("flags %s", (_name, code) => {+ expect(flags(code)).toBe(true);+ });++ it.each([+ ['translated call', 'toast.error(t(($) => $.save_failed));'],+ ['translated ternary', 'toast.error(a ? t(($) => $.x) : t(($) => $.y));'],+ // A comparison in the ternary test is not copy.+ ['comparison test', 'toast.error(code === "E_LIMIT" ? t(x) : t(y));'],+ ['non-toast callee', 'logger.error("Failed to save");'],+ ])("allows %s", (_name, code) => {+ expect(flags(code)).toBe(false);+ });+});++it("names the offending door in the message", () => {+ expect(lint('<input aria-label="Copy" />')[0]).toContain("useT()");+ expect(lint('toast.error("Copy");')[0]).toContain("useT()");+});diff --git a/packages/views/eslint.config.mjs b/packages/views/eslint.config.mjsindex bd13bd9d97..b390628342 100644--- a/packages/views/eslint.config.mjs+++ b/packages/views/eslint.config.mjs@@ -1,10 +1,15 @@import reactConfig from "@multica/eslint-config/react";import i18next from "eslint-plugin-i18next";+import {+ NO_UNTRANSLATED_ATTRIBUTES,+ NO_UNTRANSLATED_TOAST,+} from "./eslint-i18n-guard.mjs";// Global i18n protection. Every JSX text node in this package must pass// through useT() — raw strings become a build error. Scope of// `mode: "jsx-text-only"`: flags raw strings inside JSX children only;-// attribute values and plain TS literals are allowed through.+// attribute values and plain TS literals are allowed through — the two doors+// `eslint-i18n-guard.mjs` pins shut.export default [...reactConfig,@@ -19,4 +24,16 @@ export default [],},},+ {+ // Toasts are fired from hooks (`.ts`) as often as from components.+ files: ["**/*.{ts,tsx}"],+ ignores: ["**/*.test.{ts,tsx}", "test/**"],+ rules: {+ "no-restricted-syntax": [+ "error",+ NO_UNTRANSLATED_ATTRIBUTES,+ NO_UNTRANSLATED_TOAST,+ ],+ },+ },];diff --git a/packages/views/issues/components/issue-detail.tsx b/packages/views/issues/components/issue-detail.tsxindex 9c309cd4c6..d85ef512c5 100644--- a/packages/views/issues/components/issue-detail.tsx+++ b/packages/views/issues/components/issue-detail.tsx@@ -745,7 +745,9 @@ function SubIssueRow({type="checkbox"checked={selected}onChange={() => toggleSelected(child.id)}- aria-label={`Select ${child.identifier}`}+ aria-label={t(($) => $.detail.select_sub_issue_aria, {+ identifier: child.identifier,+ })}className={cn("absolute inset-0 cursor-pointer accent-primary transition-opacity",selected@@ -3213,7 +3215,7 @@ export function IssueDetail({ issueId, onDelete, onDone, defaultSidebarOpen = trif (el) el.indeterminate = someChildrenSelected && !allChildrenSelected;}}onChange={handleToggleSelectAllChildren}- aria-label="Select all sub-issues"+ aria-label={t(($) => $.detail.select_all_sub_issues_aria)}className={cn("ml-1 cursor-pointer accent-primary transition-opacity",someChildrenSelecteddiff --git a/packages/views/locales/en/agents.json b/packages/views/locales/en/agents.jsonindex f7be39b170..4d1c90df87 100644--- a/packages/views/locales/en/agents.json+++ b/packages/views/locales/en/agents.json@@ -35,6 +35,10 @@"idle": "Idle"},"presence_status_aria": "Status: {{status}}",+ "avatar_stack": {+ "overflow_aria_one": "{{count}} more agent",+ "overflow_aria_other": "{{count}} more agents"+ },"archived": {"active_link": "Active agents","title": "Archived agents"@@ -587,6 +591,10 @@"dialog_headers_label": "HTTP headers","dialog_add_header": "Add header","dialog_remove_header": "Remove header",+ "dialog_pair_key_placeholder": "Key",+ "dialog_pair_value_placeholder": "Value",+ "dialog_pair_key_aria": "{{label}} key {{index}}",+ "dialog_pair_value_aria": "{{label}} value {{index}}","dialog_native_json_hint": "This historical provider-native entry can be edited in JSON without changing its format.","dialog_json_label": "Server configuration","dialog_json_aria": "MCP server JSON configuration",diff --git a/packages/views/locales/en/chat.json b/packages/views/locales/en/chat.jsonindex f794772645..6d1a0c4df4 100644--- a/packages/views/locales/en/chat.json+++ b/packages/views/locales/en/chat.json@@ -82,6 +82,7 @@"copy_failed_toast": "Copy failed","loading_older": "Loading older messages…","quick_actions_heading": "Follow-up questions",+ "quick_actions_aria": "Suggested follow-ups","quick_actions_regenerate": "Regenerate suggestions","quick_actions_regenerate_failed": "Couldn't refresh suggestions. Please try again."},diff --git a/packages/views/locales/en/issues.json b/packages/views/locales/en/issues.jsonindex 560c886033..9452d81c08 100644--- a/packages/views/locales/en/issues.json+++ b/packages/views/locales/en/issues.json@@ -328,6 +328,8 @@"add_sub_issues": "Add sub-issues","add_sub_issue_tooltip": "Add sub-issue","add_sub_issue_aria": "Add sub-issue",+ "select_all_sub_issues_aria": "Select all sub-issues",+ "select_sub_issue_aria": "Select {{identifier}}","section_properties": "Properties","section_parent_issue": "Parent issue","section_pull_requests": "Pull requests",diff --git a/packages/views/locales/en/onboarding.json b/packages/views/locales/en/onboarding.jsonindex 2f75ecd77a..013e80646f 100644--- a/packages/views/locales/en/onboarding.json+++ b/packages/views/locales/en/onboarding.json@@ -61,7 +61,8 @@"eyebrow": "Quick question","lede": "One quick question — it helps us understand who finds Multica useful. Answer once and you're back to your work.","submit": "Submit",- "hint_ready": "Looks good. Hit Submit when you're ready."+ "hint_ready": "Looks good. Hit Submit when you're ready.",+ "save_failed_toast": "Failed to save"},"questions": {"about_you": {diff --git a/packages/views/locales/ja/agents.json b/packages/views/locales/ja/agents.jsonindex cb8d8db100..2a6e20c3c7 100644--- a/packages/views/locales/ja/agents.json+++ b/packages/views/locales/ja/agents.json@@ -35,6 +35,9 @@"idle": "アイドル"},"presence_status_aria": "ステータス: {{status}}",+ "avatar_stack": {+ "overflow_aria_other": "他 {{count}} 件のエージェント"+ },"archived": {"active_link": "アクティブなエージェント","title": "アーカイブ済みエージェント"@@ -469,6 +472,10 @@"dialog_headers_label": "HTTP ヘッダー","dialog_add_header": "ヘッダーを追加","dialog_remove_header": "ヘッダーを削除",+ "dialog_pair_key_placeholder": "キー",+ "dialog_pair_value_placeholder": "値",+ "dialog_pair_key_aria": "{{label}}:キー {{index}}",+ "dialog_pair_value_aria": "{{label}}:値 {{index}}","dialog_native_json_hint": "過去の Provider ネイティブ形式です。形式を変更せず JSON で編集できます。","dialog_json_label": "単一 Server 設定","dialog_json_aria": "MCP Server JSON 設定",diff --git a/packages/views/locales/ja/chat.json b/packages/views/locales/ja/chat.jsonindex af77c793c5..92bf90bcd1 100644--- a/packages/views/locales/ja/chat.json+++ b/packages/views/locales/ja/chat.json@@ -78,6 +78,7 @@"copy_failed_toast": "コピーに失敗しました","loading_older": "古いメッセージを読み込み中…","quick_actions_heading": "フォローアップ質問",+ "quick_actions_aria": "フォローアップの候補","quick_actions_regenerate": "候補を再生成","quick_actions_regenerate_failed": "候補を再生成できませんでした。もう一度お試しください。"},diff --git a/packages/views/locales/ja/issues.json b/packages/views/locales/ja/issues.jsonindex 1bcdcfa9b4..3344220d7c 100644--- a/packages/views/locales/ja/issues.json+++ b/packages/views/locales/ja/issues.json@@ -325,6 +325,8 @@"add_sub_issues": "サブタスクを追加","add_sub_issue_tooltip": "サブタスクを追加","add_sub_issue_aria": "サブタスクを追加",+ "select_all_sub_issues_aria": "すべてのサブタスクを選択",+ "select_sub_issue_aria": "{{identifier}} を選択","section_properties": "プロパティ","section_parent_issue": "親タスク","section_pull_requests": "Pull requests",diff --git a/packages/views/locales/ja/onboarding.json b/packages/views/locales/ja/onboarding.jsonindex cd167fd1b3..2f7ffffe54 100644--- a/packages/views/locales/ja/onboarding.json+++ b/packages/views/locales/ja/onboarding.json@@ -61,7 +61,8 @@"eyebrow": "ちょっと質問","lede": "ひとつだけ質問です。Multica がどんな方に役立っているかを把握するのに役立ちます。答えたらすぐ作業に戻れます。","submit": "送信",- "hint_ready": "OK です。準備ができたら送信を押してください。"+ "hint_ready": "OK です。準備ができたら送信を押してください。",+ "save_failed_toast": "保存できませんでした"},"questions": {"about_you": {diff --git a/packages/views/locales/ko/agents.json b/packages/views/locales/ko/agents.jsonindex eb847d02a6..80f07523fd 100644--- a/packages/views/locales/ko/agents.json+++ b/packages/views/locales/ko/agents.json@@ -35,6 +35,9 @@"idle": "유휴"},"presence_status_aria": "상태: {{status}}",+ "avatar_stack": {+ "overflow_aria_other": "에이전트 {{count}}개 더"+ },"archived": {"active_link": "활성 에이전트","title": "보관된 에이전트"@@ -477,6 +480,10 @@"dialog_headers_label": "HTTP 헤더","dialog_add_header": "헤더 추가","dialog_remove_header": "헤더 제거",+ "dialog_pair_key_placeholder": "키",+ "dialog_pair_value_placeholder": "값",+ "dialog_pair_key_aria": "{{label}} 키 {{index}}",+ "dialog_pair_value_aria": "{{label}} 값 {{index}}","dialog_native_json_hint": "기존 Provider 네이티브 형식입니다. 형식을 변경하지 않고 JSON으로 편집할 수 있습니다.","dialog_json_label": "단일 Server 설정","dialog_json_aria": "MCP Server JSON 설정",diff --git a/packages/views/locales/ko/chat.json b/packages/views/locales/ko/chat.jsonindex fa51393d92..211aff846b 100644--- a/packages/views/locales/ko/chat.json+++ b/packages/views/locales/ko/chat.json@@ -78,6 +78,7 @@"copy_failed_toast": "복사 실패","loading_older": "이전 메시지를 불러오는 중…","quick_actions_heading": "후속 질문",+ "quick_actions_aria": "추천 후속 질문","quick_actions_regenerate": "제안 다시 생성","quick_actions_regenerate_failed": "제안을 다시 생성하지 못했습니다. 다시 시도해 주세요."},diff --git a/packages/views/locales/ko/issues.json b/packages/views/locales/ko/issues.jsonindex 325e1ab13e..01f3eea02e 100644--- a/packages/views/locales/ko/issues.json+++ b/packages/views/locales/ko/issues.json@@ -325,6 +325,8 @@"add_sub_issues": "하위 태스크 추가","add_sub_issue_tooltip": "하위 태스크 추가","add_sub_issue_aria": "하위 태스크 추가",+ "select_all_sub_issues_aria": "모든 하위 태스크 선택",+ "select_sub_issue_aria": "{{identifier}} 선택","section_properties": "속성","section_parent_issue": "상위 태스크","section_pull_requests": "Pull requests",diff --git a/packages/views/locales/ko/onboarding.json b/packages/views/locales/ko/onboarding.jsonindex 1deb5d381a..8f6c1e33a2 100644--- a/packages/views/locales/ko/onboarding.json+++ b/packages/views/locales/ko/onboarding.json@@ -61,7 +61,8 @@"eyebrow": "간단한 질문 하나","lede": "간단한 질문 하나예요. 어떤 사용자에게 Multica가 유용한지 파악하는 데 도움이 됩니다. 답하시면 바로 작업으로 돌아가실 수 있어요.","submit": "제출",- "hint_ready": "좋습니다. 준비되면 제출을 눌러주세요."+ "hint_ready": "좋습니다. 준비되면 제출을 눌러주세요.",+ "save_failed_toast": "저장하지 못했습니다"},"questions": {"about_you": {diff --git a/packages/views/locales/zh-Hans/agents.json b/packages/views/locales/zh-Hans/agents.jsonindex f5d76e6a82..b53ff153f5 100644--- a/packages/views/locales/zh-Hans/agents.json+++ b/packages/views/locales/zh-Hans/agents.json@@ -35,6 +35,9 @@"idle": "空闲"},"presence_status_aria": "状态:{{status}}",+ "avatar_stack": {+ "overflow_aria_other": "还有 {{count}} 个智能体"+ },"archived": {"active_link": "活跃智能体","title": "已归档智能体"@@ -576,6 +579,10 @@"dialog_headers_label": "HTTP Headers","dialog_add_header": "添加 Header","dialog_remove_header": "移除 Header",+ "dialog_pair_key_placeholder": "键",+ "dialog_pair_value_placeholder": "值",+ "dialog_pair_key_aria": "{{label}}:键 {{index}}",+ "dialog_pair_value_aria": "{{label}}:值 {{index}}","dialog_native_json_hint": "这是历史 Provider 原生格式,将继续以 JSON 原样编辑,不会自动转换。","dialog_json_label": "单个 Server 配置","dialog_json_aria": "MCP Server JSON 配置",diff --git a/packages/views/locales/zh-Hans/chat.json b/packages/views/locales/zh-Hans/chat.jsonindex ee55978c85..5bc64aea86 100644--- a/packages/views/locales/zh-Hans/chat.json+++ b/packages/views/locales/zh-Hans/chat.json@@ -78,6 +78,7 @@"copy_failed_toast": "复制失败","loading_older": "正在加载更早的消息…","quick_actions_heading": "后续提问",+ "quick_actions_aria": "后续提问建议","quick_actions_regenerate": "重新生成建议","quick_actions_regenerate_failed": "无法重新生成建议,请重试。"},diff --git a/packages/views/locales/zh-Hans/issues.json b/packages/views/locales/zh-Hans/issues.jsonindex 4adf624dd2..41e7a05a4c 100644--- a/packages/views/locales/zh-Hans/issues.json+++ b/packages/views/locales/zh-Hans/issues.json@@ -325,6 +325,8 @@"add_sub_issues": "添加子任务","add_sub_issue_tooltip": "添加子任务","add_sub_issue_aria": "添加子任务",+ "select_all_sub_issues_aria": "全选子任务",+ "select_sub_issue_aria": "选择 {{identifier}}","section_properties": "属性","section_parent_issue": "父任务","section_pull_requests": "Pull Request",diff --git a/packages/views/locales/zh-Hans/onboarding.json b/packages/views/locales/zh-Hans/onboarding.jsonindex b32a7d093f..6b601fbe33 100644--- a/packages/views/locales/zh-Hans/onboarding.json+++ b/packages/views/locales/zh-Hans/onboarding.json@@ -61,7 +61,8 @@"eyebrow": "顺便问一句","lede": "就一个小问题——帮我们了解都是哪些人在用 Multica。回答一次,马上回到手上的事。","submit": "提交",- "hint_ready": "看起来不错,准备好就点提交。"+ "hint_ready": "看起来不错,准备好就点提交。",+ "save_failed_toast": "保存失败"},"questions": {"about_you": {diff --git a/packages/views/onboarding/source-backfill-modal.tsx b/packages/views/onboarding/source-backfill-modal.tsxindex 3a504b89b8..9a562f6219 100644--- a/packages/views/onboarding/source-backfill-modal.tsx+++ b/packages/views/onboarding/source-backfill-modal.tsx@@ -273,9 +273,13 @@ function SourceBackfillDialogBody({onComplete();} catch (err) {setBusy(false);- toast.error(err instanceof Error ? err.message : "Failed to save");+ toast.error(+ err instanceof Error+ ? err.message+ : t(($) => $.source_backfill.save_failed_toast),+ );}- }, [canSubmit, answers.source, answers.source_other, onComplete]);+ }, [canSubmit, answers.source, answers.source_other, onComplete, t]);const skip = useCallback(async () => {if (busy) return;@@ -293,9 +297,13 @@ function SourceBackfillDialogBody({onComplete();} catch (err) {setBusy(false);- toast.error(err instanceof Error ? err.message : "Failed to save");+ toast.error(+ err instanceof Error+ ? err.message+ : t(($) => $.source_backfill.save_failed_toast),+ );}- }, [busy, onComplete]);+ }, [busy, onComplete, t]);return (<DialogContent className="sm:max-w-2xl p-0 gap-0 overflow-hidden">diff --git a/packages/views/onboarding/steps/step-welcome.test.tsx b/packages/views/onboarding/steps/step-welcome.test.tsxnew file mode 100644index 0000000000..7418317b55--- /dev/null+++ b/packages/views/onboarding/steps/step-welcome.test.tsx@@ -0,0 +1,29 @@+import { describe, expect, it, vi } from "vitest";+import { screen } from "@testing-library/react";+import { renderWithI18n } from "../../test/i18n";+import { StepWelcome } from "./step-welcome";++// The welcome illustration's mock cards carry issue statuses, and the status+// label used to come from `STATUS_CONFIG.label` — the server's English seed —+// while every other string on the screen went through `useT` (MUL-6850). A+// non-English member met the product on a line that read half in each+// language. These assert against the REAL locale bundles, so a regression that+// re-introduces the English seed fails here rather than in a screenshot.+describe("StepWelcome status labels", () => {+ it("renders the built-in status labels in English", () => {+ renderWithI18n(<StepWelcome onNext={vi.fn()} />);++ expect(screen.getByText("In Progress")).toBeInTheDocument();+ expect(screen.getByText("In Review")).toBeInTheDocument();+ expect(screen.getAllByText("Done")).toHaveLength(2);+ });++ it("localizes them rather than rendering the English seed", () => {+ renderWithI18n(<StepWelcome onNext={vi.fn()} />, { locale: "zh-Hans" });++ expect(screen.getByText("进行中")).toBeInTheDocument();+ expect(screen.getByText("审核中")).toBeInTheDocument();+ expect(screen.getAllByText("已完成")).toHaveLength(2);+ expect(screen.queryByText("In Progress")).not.toBeInTheDocument();+ });+});diff --git a/packages/views/onboarding/steps/step-welcome.tsx b/packages/views/onboarding/steps/step-welcome.tsxindex 24b96bc2a1..5e68a4b916 100644--- a/packages/views/onboarding/steps/step-welcome.tsx+++ b/packages/views/onboarding/steps/step-welcome.tsx@@ -365,7 +365,13 @@ function StatusFooter({status: IssueStatus;timestamp?: string;}) {- const cfg = STATUS_CONFIG[statusCategoryOfKey(status)];+ // The illustration's statuses are hard-coded BUILT-IN keys, so the label+ // resolves from i18n exactly the way `useStatusLabel` does for real issues+ // (MUL-6243) — `STATUS_CONFIG` still owns the icon color, but its `.label`+ // is the server's English seed and must never reach the screen.+ const { t } = useT("issues");+ const category = statusCategoryOfKey(status);+ const cfg = STATUS_CONFIG[category];return (<div className="mt-3 flex items-center gap-2 text-caption"><span@@ -378,7 +384,7 @@ function StatusFooter({status === "in_progress" && "animate-pulse",)}/>- {cfg.label}+ {t(($) => $.status[category])}</span>{timestamp && (<>diff --git a/packages/views/package.json b/packages/views/package.jsonindex c881a4ded3..198e99d6de 100644--- a/packages/views/package.json+++ b/packages/views/package.json@@ -132,7 +132,9 @@"@types/mdast": "^4.0.4","@types/react": "catalog:","@types/react-dom": "catalog:",+ "@typescript-eslint/parser": "^8.35.0","@vitejs/plugin-react": "catalog:",+ "eslint": "^9.0.0","eslint-plugin-i18next": "catalog:","jsdom": "catalog:","typescript": "catalog:",diff --git a/packages/views/settings/components/slack-tab.tsx b/packages/views/settings/components/slack-tab.tsxindex ae5670bee8..399aa888a0 100644--- a/packages/views/settings/components/slack-tab.tsx+++ b/packages/views/settings/components/slack-tab.tsx@@ -412,6 +412,8 @@ export function SlackAgentBindButton({data-testid="slack-byo-bot-token"value={botToken}onChange={(e) => setBotToken(e.target.value)}+ // Slack token prefix: a format hint, not copy.+ // eslint-disable-next-line no-restricted-syntaxplaceholder="xoxb-…"autoComplete="off"spellCheck={false}@@ -428,6 +430,8 @@ export function SlackAgentBindButton({data-testid="slack-byo-app-token"value={appToken}onChange={(e) => setAppToken(e.target.value)}+ // Slack token prefix: a format hint, not copy.+ // eslint-disable-next-line no-restricted-syntaxplaceholder="xapp-…"autoComplete="off"spellCheck={false}diff --git a/packages/views/settings/components/telegram-tab.tsx b/packages/views/settings/components/telegram-tab.tsxindex 74acdb7018..ccca8e89ed 100644--- a/packages/views/settings/components/telegram-tab.tsx+++ b/packages/views/settings/components/telegram-tab.tsx@@ -388,6 +388,8 @@ export function TelegramAgentBindButton({type="password"value={botToken}onChange={(e) => setBotToken(e.target.value)}+ // Telegram token shape: a format hint, not copy.+ // eslint-disable-next-line no-restricted-syntaxplaceholder="123456789:AA…"autoComplete="off"spellCheck={false}diff --git a/packages/views/tsconfig.json b/packages/views/tsconfig.jsonindex 5aa3f57f74..56945de0d0 100644--- a/packages/views/tsconfig.json+++ b/packages/views/tsconfig.json@@ -4,6 +4,6 @@"outDir": "dist","rootDir": "."},- "include": ["**/*.ts", "**/*.tsx"],+ "include": ["**/*.ts", "**/*.tsx", "**/*.d.mts"],"exclude": ["node_modules", "dist"]}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 77aaa74d7c..4e71f0cd4a 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -1047,9 +1047,15 @@ importers:'@types/react-dom':specifier: ^19.2.0version: 19.2.3(@types/[email protected])+ '@typescript-eslint/parser':+ specifier: ^8.35.0'@vitejs/plugin-react':specifier: 'catalog:'version: 6.0.1([email protected])([email protected](@emnapi/[email protected])(@emnapi/[email protected])(@types/[email protected])([email protected])([email protected])([email protected]))+ eslint:+ specifier: ^9.0.0+ version: 9.39.4([email protected])eslint-plugin-i18next:specifier: 'catalog:'version: 6.1.4