Localize dashboard workflow, task, setup, and pull request UI copy through the shared i18n resources. - Replace hardcoded dashboard strings in workflow, task detail/chat/comment, setup wizard, PR, and related modal components with translation lookups. - Add app/common namespace keys across English and secondary locale catalogs, plus regenerated i18n resource types. - Add the published package changeset and clear the now-localized component files from the i18n lint deferral list. Files changed: .changeset/fn-6770-localize-workflow-task-pr.md | 5 + i18next.config.ts | 17 +- packages/dashboard/app/components/Board.tsx | 10 +- .../dashboard/app/components/PrCreateModal.tsx | 38 +-- packages/dashboard/app/components/PrPanel.tsx | 2 +- .../dashboard/app/components/PullRequestView.tsx | 51 ++-- .../dashboard/app/components/SettingsModal.tsx | 92 +++---- .../dashboard/app/components/SetupWizardModal.tsx | 8 +- packages/dashboard/app/components/TaskChatTab.tsx | 107 ++++---- packages/dashboard/app/components/TaskComments.tsx | 2 +- .../dashboard/app/components/TaskDetailModal.tsx | 54 ++-- .../app/components/WorkflowNodeEditor.tsx | 109 +++++---- .../app/components/WorkflowResultsTab.tsx | 190 +++++++------- .../dashboard/app/components/WorkflowSelector.tsx | 20 +- packages/i18n/locales/en/app.json | 268 ++++++++++++++++++-- packages/i18n/locales/en/common.json | 28 +-- packages/i18n/locales/es/app.json | 268 ++++++++++++++++++-- packages/i18n/locales/es/common.json | 28 +-- packages/i18n/locales/fr/app.json | 268 ++++++++++++++++++-- packages/i18n/locales/fr/common.json | 28 +-- packages/i18n/locales/ko/app.json | 268 ++++++++++++++++++-- packages/i18n/locales/ko/common.json | 28 +-- packages/i18n/locales/zh-CN/app.json | 268 ++++++++++++++++++-- packages/i18n/locales/zh-CN/common.json | 28 +-- packages/i18n/locales/zh-TW/app.json | 268 ++++++++++++++++++-- packages/i18n/locales/zh-TW/common.json | 28 +-- packages/i18n/src/resources.d.ts | 272 ++++++++++++++++++--- 27 files changed, 2144 insertions(+), 609 deletions(-) Fusion-Task-Id: FN-6770 Fusion-Task-Lineage: 393b6b8a-1902-4e46-a53e-b4a0793022ca
66 lines
2.8 KiB
TypeScript
66 lines
2.8 KiB
TypeScript
import {
|
|
defineConfig,
|
|
recommendedAcceptedAttributes,
|
|
recommendedAcceptedTags,
|
|
} from "i18next-cli";
|
|
|
|
|
|
const DEFERRED_I18N_LINT_FILES = [
|
|
// FNXC:i18n-LintBaseline 2026-06-20-00:00:
|
|
// FN-6770 and FN-6771 localized the remaining workflow/task/setup/PR and settings/sections clusters, so no dashboard component files remain deferred from hardcoded-string lint.
|
|
] as const;
|
|
|
|
/**
|
|
* i18next-cli workflow config for the whole monorepo.
|
|
*
|
|
* - `extract` pulls t()/<Trans> keys from the dashboard and CLI source into the
|
|
* authored `en` catalogs under @fusion/i18n.
|
|
* - `sync` propagates the `en` key structure to the secondary locales.
|
|
* - `types` regenerates key types from the `en` catalogs.
|
|
* - `status` runs the project key-parity gate: structure only, empty values allowed.
|
|
* - `status:report` preserves the upstream translation-completeness report.
|
|
* - `lint` flags hardcoded user-facing strings (primary guardrail).
|
|
*
|
|
* FNXC:i18n-ParityGate 2026-06-20-00:00:
|
|
* `pnpm i18n:status` points at packages/i18n/scripts/check-i18n-parity.mjs because empty secondary-locale values are intentional fallback placeholders, not gate failures.
|
|
* Use `pnpm i18n:status:report` when a human wants the upstream completeness report that still counts empty placeholders as untranslated.
|
|
*
|
|
* Namespaces are routed by the `ns:` prefix in keys / `useTranslation(ns)` in
|
|
* source, not by file path. `common` is the default namespace.
|
|
*/
|
|
export default defineConfig({
|
|
locales: ["en", "zh-CN", "zh-TW", "fr", "es", "ko"],
|
|
extract: {
|
|
input: [
|
|
"packages/dashboard/app/**/*.{ts,tsx}",
|
|
"packages/cli/src/**/*.{ts,tsx}",
|
|
"!**/__tests__/**",
|
|
"!**/*.test.*",
|
|
],
|
|
output: "packages/i18n/locales/{{language}}/{{namespace}}.json",
|
|
primaryLanguage: "en",
|
|
defaultNS: "common",
|
|
keySeparator: ".",
|
|
nsSeparator: ":",
|
|
// FNXC:i18n-ParityGate 2026-06-20-00:00:
|
|
// Untranslated secondary-locale keys stay empty for runtime fallback to `en`; `status` now gates structural key parity only, while `status:report` measures real completion.
|
|
defaultValue: "",
|
|
},
|
|
types: {
|
|
input: ["packages/i18n/locales/en/*.json"],
|
|
output: "packages/i18n/src/i18next-resources.d.ts",
|
|
},
|
|
lint: {
|
|
/*
|
|
* FNXC:i18n-LintBaseline 2026-06-19-00:00:
|
|
* i18n lint must scan the same shipping surfaces as extract so it remains a trusted user-facing-copy guardrail.
|
|
* Tests and stories are excluded because they are non-shipping fixtures and extract already excludes test files.
|
|
* Keyboard-key glyphs inside <kbd> are technical tokens, not translated prose.
|
|
*/
|
|
ignore: ["**/__tests__/**", "**/*.test.*", "**/*.stories.*", ...DEFERRED_I18N_LINT_FILES],
|
|
ignoredTags: ["kbd"],
|
|
acceptedTags: recommendedAcceptedTags,
|
|
acceptedAttributes: recommendedAcceptedAttributes,
|
|
},
|
|
});
|