From 7ee36f26e5f1227da9388b88ed5fbe457d34944c Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Mon, 22 Jun 2026 19:35:26 -0700 Subject: [PATCH] FN-6913: localize right dock labels Route right-dock accessibility labels through the app i18n namespace.\n\n- Replace hard-coded right dock and pop-out aria/title copy with translated keys and English fallbacks.\n- Add rightDock locale entries across app locale catalogs and typed resources.\n- Extend RightDock tests to cover localized dock and expanded modal affordance labels.\n\nFiles changed:\n packages/dashboard/app/components/RightDock.tsx | 16 +++++++++++-----\n .../dashboard/app/components/RightDockExpandModal.tsx | 12 +++++++++---\n .../app/components/__tests__/RightDock.test.tsx | 15 ++++++++++++++-\n packages/i18n/locales/en/app.json | 11 +++++++++++\n packages/i18n/locales/es/app.json | 11 +++++++++++\n packages/i18n/locales/fr/app.json | 11 +++++++++++\n packages/i18n/locales/ko/app.json | 11 +++++++++++\n packages/i18n/locales/zh-CN/app.json | 11 +++++++++++\n packages/i18n/locales/zh-TW/app.json | 11 +++++++++++\n packages/i18n/src/resources.d.ts | 11 +++++++++++\n 10 files changed, 111 insertions(+), 9 deletions(-) Fusion-Task-Id: FN-6913 Fusion-Task-Lineage: 1c07da14-d8a3-42ba-8c93-843c3fe1fa63 --- packages/dashboard/app/components/RightDock.tsx | 16 +++++++++++----- .../app/components/RightDockExpandModal.tsx | 12 +++++++++--- .../app/components/__tests__/RightDock.test.tsx | 15 ++++++++++++++- packages/i18n/locales/en/app.json | 11 +++++++++++ packages/i18n/locales/es/app.json | 11 +++++++++++ packages/i18n/locales/fr/app.json | 11 +++++++++++ packages/i18n/locales/ko/app.json | 11 +++++++++++ packages/i18n/locales/zh-CN/app.json | 11 +++++++++++ packages/i18n/locales/zh-TW/app.json | 11 +++++++++++ packages/i18n/src/resources.d.ts | 11 +++++++++++ 10 files changed, 111 insertions(+), 9 deletions(-) diff --git a/packages/dashboard/app/components/RightDock.tsx b/packages/dashboard/app/components/RightDock.tsx index 5a076639b6..b0e44324cc 100644 --- a/packages/dashboard/app/components/RightDock.tsx +++ b/packages/dashboard/app/components/RightDock.tsx @@ -1,5 +1,6 @@ import { useCallback, useEffect, useMemo, useRef, useState, type KeyboardEvent as ReactKeyboardEvent } from "react"; import { Maximize2 } from "lucide-react"; +import { useTranslation } from "react-i18next"; import { findOverflowViewEntry, getVisibleOverflowViewEntries, @@ -89,6 +90,9 @@ FN-6882 splits right-dock entries into launcher actions and inline views. Action FNXC:Navigation 2026-06-22-09:00: The right dock is visible by default on tablet/desktop project screens. Show/hide is owned solely by the canonical Header right-sidebar toggle (the in-dock collapse toggle was removed); the dock takes only `open` and renders null when closed so the main content reclaims the space. + +FNXC:i18n 2026-06-22-00:00: +Right-dock affordance labels are user-facing accessibility copy, so route them through the app namespace and keep English defaults colocated with the component for tests and fallback rendering. */ export function RightDock({ open, @@ -97,6 +101,7 @@ export function RightDock({ onExpand, footerVisible = false, }: RightDockProps) { + const { t } = useTranslation("app"); const entries = useMemo(() => getVisibleOverflowViewEntries(visibilityOptions), [visibilityOptions]); const [selectedKey, setSelectedKey] = useState(() => readStoredRightDockView(visibilityOptions)); const [width, setWidth] = useState(readStoredRightDockWidth); @@ -198,12 +203,13 @@ export function RightDock({ const SelectedIcon = selectedEntry.icon; const dockWidth = `${width}px`; + const expandSelectedViewLabel = t("rightDock.expandView", "Expand {{label}}", { label: selectedEntry.label }); return (