🙌 OpenHands: AI-Driven Development
chore: enforce i18next/no-literal-string on JSX attributes (#1442)
Hiep Le973ff4b71348
diff --git a/__tests__/components/conversation-events/chat/event-message-acp-tool-call.test.tsx b/__tests__/components/conversation-events/chat/event-message-acp-tool-call.test.tsxindex 59c5bd7d6f..0163892acd 100644--- a/__tests__/components/conversation-events/chat/event-message-acp-tool-call.test.tsx+++ b/__tests__/components/conversation-events/chat/event-message-acp-tool-call.test.tsx@@ -99,7 +99,7 @@ describe("EventMessage - ACPToolCallEvent dispatch", () => {/>,);- await user.click(screen.getByRole("button", { name: "Expand" }));+ await user.click(screen.getByRole("button", { name: "BUTTON$EXPAND" }));// Markdown renderer wraps code blocks but the plain text survives.expect(screen.getByText(/gh pr diff 490/)).toBeInTheDocument();diff --git a/__tests__/components/conversation-events/chat/event-message-components/critic-result-display.test.tsx b/__tests__/components/conversation-events/chat/event-message-components/critic-result-display.test.tsxindex 5fae4d7085..5fcc2f6812 100644--- a/__tests__/components/conversation-events/chat/event-message-components/critic-result-display.test.tsx+++ b/__tests__/components/conversation-events/chat/event-message-components/critic-result-display.test.tsx@@ -128,7 +128,9 @@ describe("CriticResultDisplay", () => {<CriticResultDisplay criticResult={makeCriticResult()} />,);- expect(screen.queryByLabelText("Expand details")).not.toBeInTheDocument();+ expect(+ screen.queryByLabelText("BUTTON$EXPAND_DETAILS"),+ ).not.toBeInTheDocument();});it("prompts users to enable iterative refinement when it is disabled", () => {@@ -178,7 +180,7 @@ describe("CriticResultDisplay", () => {renderWithProviders(<CriticResultDisplay criticResult={result} />);- expect(screen.getByLabelText("Expand details")).toBeInTheDocument();+ expect(screen.getByLabelText("BUTTON$EXPAND_DETAILS")).toBeInTheDocument();});it("expands features on click", async () => {@@ -201,7 +203,7 @@ describe("CriticResultDisplay", () => {expect(screen.queryByText("Insufficient Testing")).not.toBeInTheDocument();- await user.click(screen.getByLabelText("Expand details"));+ await user.click(screen.getByLabelText("BUTTON$EXPAND_DETAILS"));expect(screen.getByText("Insufficient Testing")).toBeInTheDocument();expect(screen.getByText("(75%)")).toBeInTheDocument();@@ -226,10 +228,10 @@ describe("CriticResultDisplay", () => {renderWithProviders(<CriticResultDisplay criticResult={result} />);- await user.click(screen.getByLabelText("Expand details"));+ await user.click(screen.getByLabelText("BUTTON$EXPAND_DETAILS"));expect(screen.getByText("Loop Behavior")).toBeInTheDocument();- await user.click(screen.getByLabelText("Collapse details"));+ await user.click(screen.getByLabelText("BUTTON$COLLAPSE_DETAILS"));expect(screen.queryByText("Loop Behavior")).not.toBeInTheDocument();});@@ -265,7 +267,7 @@ describe("CriticResultDisplay", () => {renderWithProviders(<CriticResultDisplay criticResult={result} />);- await user.click(screen.getByLabelText("Expand details"));+ await user.click(screen.getByLabelText("BUTTON$EXPAND_DETAILS"));expect(screen.getByText("CRITIC$POTENTIAL_ISSUES")).toBeInTheDocument();expect(screen.getByText("Incomplete Changes")).toBeInTheDocument();diff --git a/__tests__/components/features/chat/model-messages.test.tsx b/__tests__/components/features/chat/model-messages.test.tsxindex 221d8c9bf4..21f608ec07 100644--- a/__tests__/components/features/chat/model-messages.test.tsx+++ b/__tests__/components/features/chat/model-messages.test.tsx@@ -53,7 +53,7 @@ describe("ModelMessages", () => {expect(screen.getByTestId("model-messages")).toBeInTheDocument();expect(screen.getByText("Available profiles (1)")).toBeInTheDocument();- await user.click(screen.getByRole("button", { name: "Expand" }));+ await user.click(screen.getByRole("button", { name: "BUTTON$EXPAND" }));const profileToggle = screen.getByRole("button", {name: "Toggle details for haiku",diff --git a/__tests__/i18n/library-namespace.test.ts b/__tests__/i18n/library-namespace.test.tsindex 3536ce18ef..f804c1980b 100644--- a/__tests__/i18n/library-namespace.test.ts+++ b/__tests__/i18n/library-namespace.test.ts@@ -54,6 +54,11 @@ describe("library i18n namespace scoping", () => {expect(globalI18n.hasResourceBundle("en", "openhands")).toBe(false);expect(globalI18n.t("HOST_ONLY")).toBe("Host only");},- 15_000,+ // No per-test timeout override here: importing the full `../../src/index`+ // module graph is the heaviest import in the suite and can exceed a short+ // budget under parallel load. Inherit the global 30s `testTimeout`+ // (vite.config.ts) that was introduced specifically to keep the i18n+ // namespace tests deterministic; a local 15s cap undercut that and made+ // this test flaky.);});diff --git a/eslint.config.js b/eslint.config.jsindex 125c64bf47..0469eabf81 100644--- a/eslint.config.js+++ b/eslint.config.js@@ -140,7 +140,57 @@ export default ["prettier/prettier": "error",// Project conventions previously enforced via airbnb / custom rules.- "i18next/no-literal-string": "error",+ // Lint JSX *attributes* (not just text between tags) for hard-coded+ // user-facing strings. The plugin default (`mode: 'jsx-text-only'`)+ // never checks attribute values, which let untranslated strings like+ // `aria-label="Close"` / `placeholder="..."` slip past lint (cf. #1306).+ //+ // `jsx-only` checks every literal inside a JSX subtree, so we scope it:+ // - jsx-attributes.include: only attributes that carry translatable+ // text. Everything else (testId, name, color, to, href, className,+ // data-*, …) is ignored automatically — no brittle deny-list.+ // - callees/object-properties: re-list the plugin defaults (the option+ // merge is shallow, so providing a key replaces it) and add+ // `cn`/`className` so Tailwind class strings built via `cn(...)` or+ // `{ className: "..." }` aren't flagged.+ "i18next/no-literal-string": [+ "error",+ {+ mode: "jsx-only",+ "jsx-attributes": {+ include: [+ "placeholder",+ "alt",+ "aria-label",+ "title",+ "label",+ "heading",+ "text",+ ],+ },+ callees: {+ exclude: [+ "i18n(ext)?",+ "t",+ "require",+ "addEventListener",+ "removeEventListener",+ "postMessage",+ "getElementById",+ "dispatch",+ "commit",+ "includes",+ "indexOf",+ "endsWith",+ "startsWith",+ "cn",+ ],+ },+ "object-properties": {+ exclude: ["[A-Z_-]+", "className"],+ },+ },+ ],"unused-imports/no-unused-imports": "error","@typescript-eslint/prefer-optional-chain": "error","no-restricted-imports": [diff --git a/src/components/conversation-events/chat/event-message-components/critic-result-display.tsx b/src/components/conversation-events/chat/event-message-components/critic-result-display.tsxindex 70fff59861..709f16f509 100644--- a/src/components/conversation-events/chat/event-message-components/critic-result-display.tsx+++ b/src/components/conversation-events/chat/event-message-components/critic-result-display.tsx@@ -215,7 +215,11 @@ export function CriticResultDisplay({type="button"onClick={() => setExpanded((prev) => !prev)}className="cursor-pointer ml-1"- aria-label={expanded ? "Collapse details" : "Expand details"}+ aria-label={+ expanded+ ? t(I18nKey.BUTTON$COLLAPSE_DETAILS)+ : t(I18nKey.BUTTON$EXPAND_DETAILS)+ }>{expanded ? (<ArrowUp className="h-3 w-3 inline fill-neutral-400" />diff --git a/src/components/features/automations/delete-confirmation-modal.tsx b/src/components/features/automations/delete-confirmation-modal.tsxindex 6d2ea1d102..eb642ea2b4 100644--- a/src/components/features/automations/delete-confirmation-modal.tsx+++ b/src/components/features/automations/delete-confirmation-modal.tsx@@ -35,7 +35,7 @@ export function DeleteConfirmationModal({type="button"onClick={onCancel}className="absolute right-4 top-4 text-muted hover:text-foreground"- aria-label="Close"+ aria-label={t(I18nKey.BUTTON$CLOSE)}><XMarkIcon className="size-5" /></button>diff --git a/src/components/features/automations/detail/configuration-section.tsx b/src/components/features/automations/detail/configuration-section.tsxindex e526e6f392..3d651e9a6c 100644--- a/src/components/features/automations/detail/configuration-section.tsx+++ b/src/components/features/automations/detail/configuration-section.tsx@@ -132,7 +132,7 @@ export function ConfigurationSection({icon={<SparkleIcon className="size-3.5" />}label={t(I18nKey.AUTOMATIONS$DETAIL$MODEL)}>- {automation.model ?? "Active profile"}+ {automation.model ?? t(I18nKey.COMMON$ACTIVE_PROFILE)}</ConfigField>{automation.notification && (diff --git a/src/components/features/automations/detail/detail-header.tsx b/src/components/features/automations/detail/detail-header.tsxindex e2a13abe46..5d4c359e26 100644--- a/src/components/features/automations/detail/detail-header.tsx+++ b/src/components/features/automations/detail/detail-header.tsx@@ -85,7 +85,9 @@ export function DetailHeader({onClick={onRunNow}><PlayIcon className="size-3.5 shrink-0" aria-hidden />- {isRunningNow ? "Starting…" : t(I18nKey.AUTOMATIONS$RUN_NOW)}+ {isRunningNow+ ? t(I18nKey.AUTOMATIONS$STARTING)+ : t(I18nKey.AUTOMATIONS$RUN_NOW)}</button>)}{canManage && (diff --git a/src/components/features/backends/backend-form-modal.tsx b/src/components/features/backends/backend-form-modal.tsxindex 9564ccf848..10166284dc 100644--- a/src/components/features/backends/backend-form-modal.tsx+++ b/src/components/features/backends/backend-form-modal.tsx@@ -556,6 +556,7 @@ export function BackendForm({setConnectionError(null);}}onBlur={() => setNameTouched(true)}+ // eslint-disable-next-line i18next/no-literal-string -- example placeholder, not user-facing copyplaceholder="Production"className="w-full"showRequiredTag@@ -796,6 +797,7 @@ function ManualConnectionColumn({setName(value);setConnectionError(null);}}+ // eslint-disable-next-line i18next/no-literal-string -- example placeholder, not user-facing copyplaceholder="e.g. My Server"className="w-full"/>@@ -815,6 +817,7 @@ function ManualConnectionColumn({setHost(value);setConnectionError(null);}}+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatableplaceholder="http://localhost:8000"className="w-full"/>@@ -836,6 +839,7 @@ function ManualConnectionColumn({setApiKey(value);setConnectionError(null);}}+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatableplaceholder="sk-••••••••••"className="w-full"/>diff --git a/src/components/features/chat/chat-messages-skeleton.tsx b/src/components/features/chat/chat-messages-skeleton.tsxindex 4012d68fc1..dc23f8b432 100644--- a/src/components/features/chat/chat-messages-skeleton.tsx+++ b/src/components/features/chat/chat-messages-skeleton.tsx@@ -1,5 +1,7 @@import React from "react";+import { useTranslation } from "react-i18next";import { cn } from "#/utils/utils";+import { I18nKey } from "#/i18n/declaration";const SKELETON_PATTERN = [{ width: "w-[25%]", height: "h-4", align: "justify-end" },@@ -22,11 +24,13 @@ function SkeletonBlock({ width, height }: { width: string; height: string }) {}export function ChatMessagesSkeleton() {+ const { t } = useTranslation("openhands");+return (<divclassName="flex flex-col gap-6 p-4 w-full h-full overflow-hidden"data-testid="chat-messages-skeleton"- aria-label="Loading conversation"+ aria-label={t(I18nKey.CHAT_INTERFACE$LOADING_CONVERSATION)}>{SKELETON_PATTERN.map((item, i) => (<div key={i} className={cn("flex w-full", item.align)}>diff --git a/src/components/features/chat/components/chat-input-actions.tsx b/src/components/features/chat/components/chat-input-actions.tsxindex 50392f603d..4ba20ea290 100644--- a/src/components/features/chat/components/chat-input-actions.tsx+++ b/src/components/features/chat/components/chat-input-actions.tsx@@ -345,7 +345,7 @@ export function ChatInputActions({><ToolsContextMenuIconTexticon={<Cpu width={16} height={16} strokeWidth={2} aria-hidden />}- text="Model"+ text={t(I18nKey.SETTINGS$AGENT_MODEL)}rightIcon={<CarretRightFillIcon width={10} height={10} />}/></ContextMenuListItem>@@ -419,7 +419,7 @@ export function ChatInputActions({ref={overflowTriggerRef}type="button"className={cn(chatInputIconButtonClassName, "size-6")}- aria-label="More input actions"+ aria-label={t(I18nKey.CHAT_INTERFACE$MORE_INPUT_ACTIONS)}aria-expanded={isOverflowOpen}aria-haspopup="menu"onClick={(event) => {diff --git a/src/components/features/chat/generic-event-message.tsx b/src/components/features/chat/generic-event-message.tsxindex 26bba392b7..f3a9f98347 100644--- a/src/components/features/chat/generic-event-message.tsx+++ b/src/components/features/chat/generic-event-message.tsx@@ -1,10 +1,12 @@import React from "react";+import { useTranslation } from "react-i18next";import ArrowDown from "#/icons/angle-down-solid.svg?react";import ArrowUp from "#/icons/angle-up-solid.svg?react";import { SuccessIndicator } from "./success-indicator";import { ObservationResultStatus } from "#/components/conversation-events/chat/event-content-helpers/get-observation-result";import { MarkdownRenderer } from "../markdown/markdown-renderer";import { cn } from "#/utils/utils";+import { I18nKey } from "#/i18n/declaration";interface GenericEventMessageProps {title: React.ReactNode;@@ -28,6 +30,7 @@ export function GenericEventMessage({titleTrailing,titleIcon,}: GenericEventMessageProps) {+ const { t } = useTranslation("openhands");const [showDetails, setShowDetails] = React.useState(initiallyExpanded);const chevron = details ? (@@ -35,7 +38,9 @@ export function GenericEventMessage({type="button"onClick={() => setShowDetails((prev) => !prev)}className="cursor-pointer text-left"- aria-label={showDetails ? "Collapse" : "Expand"}+ aria-label={+ showDetails ? t(I18nKey.BUTTON$COLLAPSE) : t(I18nKey.BUTTON$EXPAND)+ }>{showDetails ? (<ArrowUpdiff --git a/src/components/features/chat/model-messages.tsx b/src/components/features/chat/model-messages.tsxindex 92b690cc62..85991cc2d4 100644--- a/src/components/features/chat/model-messages.tsx+++ b/src/components/features/chat/model-messages.tsx@@ -36,6 +36,7 @@ function ProfileRow({ profile }: ProfileRowProps) {<div className="px-3 py-2 text-xs text-neutral-300 font-mono whitespace-pre-wrap">{`model: ${profile.model ?? "—"}\n` +`base_url: ${profile.base_url ?? "—"}\n` ++ // eslint-disable-next-line i18next/no-literal-string -- diagnostic readout; field labels are intentionally untranslated`api_key: ${profile.api_key_set ? "set" : "not set"}`}</div></>diff --git a/src/components/features/conversation-panel/compact-conversation-row.tsx b/src/components/features/conversation-panel/compact-conversation-row.tsxindex aaf2b498c1..a97adab3e2 100644--- a/src/components/features/conversation-panel/compact-conversation-row.tsx+++ b/src/components/features/conversation-panel/compact-conversation-row.tsx@@ -1,5 +1,6 @@import React from "react";import { Tooltip } from "@heroui/react";+import { useTranslation } from "react-i18next";import { NavigationLink } from "#/components/shared/navigation-link";import { ExecutionStatus } from "#/types/agent-server/core/base/common";import { SandboxStatus } from "#/api/conversation-service/agent-server-conversation-service.types";@@ -7,6 +8,7 @@ import { RepositorySelection } from "#/api/open-hands.types";import { cn } from "#/utils/utils";import { ConversationStatusDot } from "./conversation-status-dot";import { ConversationCardFooter } from "./conversation-card/conversation-card-footer";+import { I18nKey } from "#/i18n/declaration";interface CompactConversationRowProps {conversationId: string;@@ -48,6 +50,7 @@ export function CompactConversationRow({agentKind = null,acpServer = null,}: CompactConversationRowProps) {+ const { t } = useTranslation("openhands");const disableAnimation = import.meta.env.MODE === "test";const preview = (@@ -59,7 +62,7 @@ export function CompactConversationRow({showTooltip={false}/><span className="text-sm font-medium text-white truncate" title={title}>- {title || "(untitled)"}+ {title || t(I18nKey.CONVERSATION$UNTITLED)}</span></div><ConversationCardFooterdiff --git a/src/components/features/conversation-panel/conversation-card/conversation-card-context-menu.tsx b/src/components/features/conversation-panel/conversation-card/conversation-card-context-menu.tsxindex fd871ab890..ff6babf641 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-card-context-menu.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-card-context-menu.tsx@@ -111,6 +111,7 @@ export function ConversationCardContextMenu({</ContextMenuListItem>),],+ // eslint-disable-next-line i18next/no-literal-string -- internal section id, not user-facing"edit-section",)}{generateSection(@@ -147,6 +148,7 @@ export function ConversationCardContextMenu({</ContextMenuListItem>),],+ // eslint-disable-next-line i18next/no-literal-string -- internal section id, not user-facing"tools-section",)}{generateSection(@@ -188,6 +190,7 @@ export function ConversationCardContextMenu({</ContextMenuListItem>),],+ // eslint-disable-next-line i18next/no-literal-string -- internal section id, not user-facing"control-section",)}{generateSection(@@ -217,6 +220,7 @@ export function ConversationCardContextMenu({</ContextMenuListItem>),],+ // eslint-disable-next-line i18next/no-literal-string -- internal section id, not user-facing"info-section",true,)}diff --git a/src/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.tsx b/src/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.tsxindex c614fc2c83..5e03495c21 100644--- a/src/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.tsx+++ b/src/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.tsx@@ -211,7 +211,11 @@ export function ConversationTabsContextMenu({: "cursor-pointer hover:bg-white/10",)}aria-pressed={pinned}- aria-label={pinned ? "Unpin tab from bar" : "Pin tab to bar"}+ aria-label={+ pinned+ ? t(I18nKey.CONVERSATION$UNPIN_TAB)+ : t(I18nKey.CONVERSATION$PIN_TAB)+ }onClick={(e) => handlePinToggle(tab, e)}>{pinned ? (diff --git a/src/components/features/diff-viewer/loading-spinner.tsx b/src/components/features/diff-viewer/loading-spinner.tsxindex 4b251bce41..f20e170f24 100644--- a/src/components/features/diff-viewer/loading-spinner.tsx+++ b/src/components/features/diff-viewer/loading-spinner.tsx@@ -1,10 +1,14 @@+import { useTranslation } from "react-i18next";import { cn } from "#/utils/utils";+import { I18nKey } from "#/i18n/declaration";export interface LoadingSpinnerProps {className?: string;}export function LoadingSpinner({ className }: LoadingSpinnerProps) {+ const { t } = useTranslation("openhands");+return (<div className="flex items-center justify-center"><div@@ -13,7 +17,7 @@ export function LoadingSpinner({ className }: LoadingSpinnerProps) {className,)}role="status"- aria-label="Loading"+ aria-label={t(I18nKey.HOME$LOADING)}/></div>);diff --git a/src/components/features/home/repo-selection-form.tsx b/src/components/features/home/repo-selection-form.tsxindex a119cb5f1a..98196a9846 100644--- a/src/components/features/home/repo-selection-form.tsx+++ b/src/components/features/home/repo-selection-form.tsx@@ -147,6 +147,7 @@ export function RepositorySelectionForm({provider={selectedProvider || providers[0]}value={selectedRepository?.id || null}repositoryName={selectedRepository?.full_name || null}+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatableplaceholder="user/repo"disabled={!selectedProvider || isLoadingSettings}onChange={handleRepoSelection}diff --git a/src/components/features/home/shared/clear-button.tsx b/src/components/features/home/shared/clear-button.tsxindex 56575925e7..ae9e44b0a1 100644--- a/src/components/features/home/shared/clear-button.tsx+++ b/src/components/features/home/shared/clear-button.tsx@@ -1,5 +1,7 @@import React from "react";+import { useTranslation } from "react-i18next";import { cn } from "#/utils/utils";+import { I18nKey } from "#/i18n/declaration";interface ClearButtonProps {disabled: boolean;@@ -12,6 +14,8 @@ export function ClearButton({onClear,testId = "dropdown-clear",}: ClearButtonProps) {+ const { t } = useTranslation("openhands");+return (<buttononClick={(e) => {@@ -24,7 +28,7 @@ export function ClearButton({"cursor-pointer disabled:cursor-not-allowed disabled:opacity-60",)}type="button"- aria-label="Clear selection"+ aria-label={t(I18nKey.COMMON$CLEAR_SELECTION)}data-testid={testId}><svgdiff --git a/src/components/features/home/shared/toggle-button.tsx b/src/components/features/home/shared/toggle-button.tsxindex e38af6e600..353b638792 100644--- a/src/components/features/home/shared/toggle-button.tsx+++ b/src/components/features/home/shared/toggle-button.tsx@@ -1,8 +1,10 @@+import { useTranslation } from "react-i18next";import {ComboboxCaretIcon,comboboxCaretButtonClassName,} from "#/ui/combobox-caret";import { cn } from "#/utils/utils";+import { I18nKey } from "#/i18n/declaration";interface ToggleButtonProps {isOpen: boolean;@@ -19,6 +21,8 @@ export function ToggleButton({getToggleButtonProps,iconClassName,}: ToggleButtonProps) {+ const { t } = useTranslation("openhands");+return (<button{...getToggleButtonProps({@@ -31,7 +35,7 @@ export function ToggleButton({),})}type="button"- aria-label="Toggle menu"+ aria-label={t(I18nKey.COMMON$TOGGLE_MENU)}><ComboboxCaretIcon className={iconClassName} /></button>diff --git a/src/components/features/home/workspace-dropdown/folder-browser-modal.tsx b/src/components/features/home/workspace-dropdown/folder-browser-modal.tsxindex 0c0933c6e9..b8c1acd6d4 100644--- a/src/components/features/home/workspace-dropdown/folder-browser-modal.tsx+++ b/src/components/features/home/workspace-dropdown/folder-browser-modal.tsx@@ -276,7 +276,7 @@ export function FolderBrowserModal({data-testid="folder-browser-up"onClick={() => parent && setCurrentPath(parent)}disabled={!parent}- aria-label="Up"+ aria-label={t(I18nKey.COMMON$UP)}className="p-1 rounded hover:bg-[var(--oh-interactive-hover)] text-white disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer"><ChevronLeft width={16} height={16} />@@ -310,7 +310,8 @@ export function FolderBrowserModal({className="px-4 py-2 text-sm text-red-400"data-testid="folder-browser-error">- {(error as Error | undefined)?.message ?? "Failed to load"}+ {(error as Error | undefined)?.message ??+ t(I18nKey.COMMON$FAILED_TO_LOAD)}</li>)}{!isLoading && !isError && subdirs.length === 0 && (diff --git a/src/components/features/settings/mcp-settings/mcp-server-form.tsx b/src/components/features/settings/mcp-settings/mcp-server-form.tsxindex 1fec7f22b8..1773bfd278 100644--- a/src/components/features/settings/mcp-settings/mcp-server-form.tsx+++ b/src/components/features/settings/mcp-settings/mcp-server-form.tsx@@ -341,6 +341,7 @@ export function MCPServerForm({className="w-full min-w-0"showOptionalTagdefaultValue={server?.name || ""}+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatableplaceholder="my-search-server"/>@@ -352,6 +353,7 @@ export function MCPServerForm({className="w-full min-w-0"requireddefaultValue={server?.url || ""}+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatableplaceholder="https://api.example.com"/>@@ -393,6 +395,7 @@ export function MCPServerForm({className="w-full min-w-0"requireddefaultValue={server?.name || ""}+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatableplaceholder="my-mcp-server"pattern="^[a-zA-Z0-9_-]+$"/>@@ -405,6 +408,7 @@ export function MCPServerForm({className="w-full min-w-0"requireddefaultValue={server?.command || ""}+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatableplaceholder="npx"/>@@ -420,6 +424,7 @@ export function MCPServerForm({name="args"rows={3}defaultValue={server?.args?.join("\n") || ""}+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatableplaceholder="arg1 arg2 arg3"className={cn(formControlMultilineFieldClassName,@@ -444,6 +449,7 @@ export function MCPServerForm({name="env"rows={4}defaultValue={formatEnvironmentVariables(server?.env)}+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatableplaceholder="KEY1=value1 KEY2=value2"className={cn(formControlMultilineFieldClassName,diff --git a/src/components/features/settings/mobile-header.tsx b/src/components/features/settings/mobile-header.tsxindex d696d23441..e8cacfc11f 100644--- a/src/components/features/settings/mobile-header.tsx+++ b/src/components/features/settings/mobile-header.tsx@@ -24,7 +24,7 @@ export function MobileHeader({type="button"onClick={onToggleMenu}className="p-2 rounded-md bg-tertiary hover:bg-tertiary transition-colors"- aria-label="Toggle settings menu"+ aria-label={t(I18nKey.SETTINGS$TOGGLE_SETTINGS_MENU)}><svgwidth={20}diff --git a/src/components/features/settings/secrets-settings/secret-form.tsx b/src/components/features/settings/secrets-settings/secret-form.tsxindex f546651efe..8ab5352f27 100644--- a/src/components/features/settings/secrets-settings/secret-form.tsx+++ b/src/components/features/settings/secrets-settings/secret-form.tsx@@ -123,13 +123,13 @@ export function SecretForm({testId="name-input"name="secret-name"type="text"- label="Name"+ label={t(I18nKey.SETTINGS$NAME)}className="w-full min-w-0"requireddefaultValue={mode === "edit" && selectedSecret ? selectedSecret : ""}placeholder={t(I18nKey.SECRETS$API_KEY_EXAMPLE)}pattern="^[a-zA-Z][a-zA-Z0-9_]{0,63}$"- title="Must start with a letter, contain only letters/numbers/underscores, and be 1-64 characters"+ title={t(I18nKey.SETTINGS$SECRET_NAME_PATTERN_TITLE)}/>{error && <p className="text-red-500 text-sm">{error}</p>}diff --git a/src/components/features/sidebar/sidebar-rail-body.tsx b/src/components/features/sidebar/sidebar-rail-body.tsxindex c2f60b71eb..e742486d99 100644--- a/src/components/features/sidebar/sidebar-rail-body.tsx+++ b/src/components/features/sidebar/sidebar-rail-body.tsx@@ -159,7 +159,7 @@ export function SidebarRailBody({<SidebarNavLinkto="/conversations"end- label="New Chat"+ label={t(I18nKey.SIDEBAR$NEW_CHAT)}testId="sidebar-conversations-link"disabled={linkDisabled}collapsed={collapsed}@@ -167,7 +167,7 @@ export function SidebarRailBody({/><SidebarNavLinkto="/customize"- label="Customize"+ label={t(I18nKey.NAV$CUSTOMIZE)}testId="sidebar-skills-link"disabled={linkDisabled}collapsed={collapsed}diff --git a/src/components/features/skills/skills-toolbar.tsx b/src/components/features/skills/skills-toolbar.tsxindex 7deab82581..d560810f54 100644--- a/src/components/features/skills/skills-toolbar.tsx+++ b/src/components/features/skills/skills-toolbar.tsx@@ -51,7 +51,7 @@ export function SkillsToolbar({<buttontype="button"onClick={() => onSearchChange("")}- aria-label="Clear search"+ aria-label={t(I18nKey.MCP$SEARCH_CLEAR)}className="mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer"><X className="h-4 w-4" aria-hidden />diff --git a/src/components/shared/modals/settings/settings-form.tsx b/src/components/shared/modals/settings/settings-form.tsxindex ca3b854095..0970706daf 100644--- a/src/components/shared/modals/settings/settings-form.tsx+++ b/src/components/shared/modals/settings/settings-form.tsx@@ -94,6 +94,7 @@ export function SettingsForm({ settings, onClose }: SettingsFormProps) {label={t(I18nKey.SETTINGS_FORM$API_KEY)}type="password"className="w-full"+ // eslint-disable-next-line i18next/no-literal-string -- masked-key sentinel, not translatableplaceholder={isLLMKeySet ? "<hidden>" : ""}labelClassName={SETTINGS_FORM.LABEL_CLASSNAME}/>diff --git a/src/i18n/translation.json b/src/i18n/translation.jsonindex e4b11991a2..fb1549e12e 100644--- a/src/i18n/translation.json+++ b/src/i18n/translation.json@@ -31261,5 +31261,311 @@"de": "Beim Abrufen der Einstellungen ist ein Fehler aufgetreten. Bitte laden Sie die Seite neu.","uk": "Під час отримання налаштувань сталася помилка. Будь ласка, перезавантажте сторінку.","ca": "S'ha produït un error en obtenir la configuració. Torneu a carregar la pàgina."+ },+ "BUTTON$COLLAPSE_DETAILS": {+ "en": "Collapse details",+ "zh-CN": "收起详情",+ "zh-TW": "收合詳細資料",+ "de": "Details einklappen",+ "ko-KR": "세부 정보 접기",+ "no": "Skjul detaljer",+ "it": "Comprimi dettagli",+ "pt": "Recolher detalhes",+ "es": "Contraer detalles",+ "ar": "طي التفاصيل",+ "fr": "Réduire les détails",+ "tr": "Ayrıntıları daralt",+ "ja": "詳細を折りたたむ",+ "uk": "Згорнути деталі",+ "ca": "Replega els detalls"+ },+ "BUTTON$EXPAND_DETAILS": {+ "en": "Expand details",+ "zh-CN": "展开详情",+ "zh-TW": "展開詳細資料",+ "de": "Details ausklappen",+ "ko-KR": "세부 정보 펼치기",+ "no": "Vis detaljer",+ "it": "Espandi dettagli",+ "pt": "Expandir detalhes",+ "es": "Expandir detalles",+ "ar": "توسيع التفاصيل",+ "fr": "Développer les détails",+ "tr": "Ayrıntıları genişlet",+ "ja": "詳細を展開する",+ "uk": "Розгорнути деталі",+ "ca": "Desplega els detalls"+ },+ "BUTTON$COLLAPSE": {+ "en": "Collapse",+ "zh-CN": "收起",+ "zh-TW": "收合",+ "de": "Einklappen",+ "ko-KR": "접기",+ "no": "Skjul",+ "it": "Comprimi",+ "pt": "Recolher",+ "es": "Contraer",+ "ar": "طي",+ "fr": "Réduire",+ "tr": "Daralt",+ "ja": "折りたたむ",+ "uk": "Згорнути",+ "ca": "Replega"+ },+ "BUTTON$EXPAND": {+ "en": "Expand",+ "zh-CN": "展开",+ "zh-TW": "展開",+ "de": "Ausklappen",+ "ko-KR": "펼치기",+ "no": "Vis",+ "it": "Espandi",+ "pt": "Expandir",+ "es": "Expandir",+ "ar": "توسيع",+ "fr": "Développer",+ "tr": "Genişlet",+ "ja": "展開する",+ "uk": "Розгорнути",+ "ca": "Desplega"+ },+ "COMMON$ACTIVE_PROFILE": {+ "en": "Active profile",+ "zh-CN": "活动配置文件",+ "zh-TW": "使用中的設定檔",+ "de": "Aktives Profil",+ "ko-KR": "활성 프로필",+ "no": "Aktiv profil",+ "it": "Profilo attivo",+ "pt": "Perfil ativo",+ "es": "Perfil activo",+ "ar": "الملف النشط",+ "fr": "Profil actif",+ "tr": "Etkin profil",+ "ja": "アクティブなプロファイル",+ "uk": "Активний профіль",+ "ca": "Perfil actiu"+ },+ "AUTOMATIONS$STARTING": {+ "en": "Starting…",+ "zh-CN": "正在启动…",+ "zh-TW": "正在啟動…",+ "de": "Wird gestartet…",+ "ko-KR": "시작 중…",+ "no": "Starter…",+ "it": "Avvio in corso…",+ "pt": "Iniciando…",+ "es": "Iniciando…",+ "ar": "جارٍ البدء…",+ "fr": "Démarrage…",+ "tr": "Başlatılıyor…",+ "ja": "開始しています…",+ "uk": "Запуск…",+ "ca": "S'està iniciant…"+ },+ "CHAT_INTERFACE$LOADING_CONVERSATION": {+ "en": "Loading conversation",+ "zh-CN": "正在加载会话",+ "zh-TW": "正在載入對話",+ "de": "Unterhaltung wird geladen",+ "ko-KR": "대화를 불러오는 중",+ "no": "Laster samtale",+ "it": "Caricamento conversazione",+ "pt": "Carregando conversa",+ "es": "Cargando conversación",+ "ar": "جارٍ تحميل المحادثة",+ "fr": "Chargement de la conversation",+ "tr": "Konuşma yükleniyor",+ "ja": "会話を読み込んでいます",+ "uk": "Завантаження розмови",+ "ca": "S'està carregant la conversa"+ },+ "CHAT_INTERFACE$MORE_INPUT_ACTIONS": {+ "en": "More input actions",+ "zh-CN": "更多输入操作",+ "zh-TW": "更多輸入動作",+ "de": "Weitere Eingabeaktionen",+ "ko-KR": "추가 입력 작업",+ "no": "Flere inndatahandlinger",+ "it": "Altre azioni di input",+ "pt": "Mais ações de entrada",+ "es": "Más acciones de entrada",+ "ar": "المزيد من إجراءات الإدخال",+ "fr": "Plus d'actions de saisie",+ "tr": "Diğer giriş işlemleri",+ "ja": "その他の入力操作",+ "uk": "Більше дій введення",+ "ca": "Més accions d'entrada"+ },+ "CONVERSATION$UNTITLED": {+ "en": "(untitled)",+ "zh-CN": "(无标题)",+ "zh-TW": "(無標題)",+ "de": "(ohne Titel)",+ "ko-KR": "(제목 없음)",+ "no": "(uten tittel)",+ "it": "(senza titolo)",+ "pt": "(sem título)",+ "es": "(sin título)",+ "ar": "(بدون عنوان)",+ "fr": "(sans titre)",+ "tr": "(başlıksız)",+ "ja": "(無題)",+ "uk": "(без назви)",+ "ca": "(sense títol)"+ },+ "CONVERSATION$UNPIN_TAB": {+ "en": "Unpin tab from bar",+ "zh-CN": "从栏中取消固定标签页",+ "zh-TW": "從列中取消釘選分頁",+ "de": "Tab aus der Leiste lösen",+ "ko-KR": "막대에서 탭 고정 해제",+ "no": "Løsne fanen fra linjen",+ "it": "Rimuovi la scheda dalla barra",+ "pt": "Desafixar aba da barra",+ "es": "Desfijar pestaña de la barra",+ "ar": "إلغاء تثبيت علامة التبويب من الشريط",+ "fr": "Détacher l'onglet de la barre",+ "tr": "Sekmeyi çubuktan ayır",+ "ja": "タブをバーから固定解除",+ "uk": "Відкріпити вкладку від панелі",+ "ca": "Deixa de fixar la pestanya de la barra"+ },+ "CONVERSATION$PIN_TAB": {+ "en": "Pin tab to bar",+ "zh-CN": "将标签页固定到栏",+ "zh-TW": "將分頁釘選到列",+ "de": "Tab an Leiste anheften",+ "ko-KR": "막대에 탭 고정",+ "no": "Fest fanen til linjen",+ "it": "Fissa la scheda alla barra",+ "pt": "Fixar aba na barra",+ "es": "Fijar pestaña en la barra",+ "ar": "تثبيت علامة التبويب في الشريط",+ "fr": "Épingler l'onglet à la barre",+ "tr": "Sekmeyi çubuğa sabitle",+ "ja": "タブをバーに固定",+ "uk": "Закріпити вкладку на панелі",+ "ca": "Fixa la pestanya a la barra"+ },+ "COMMON$CLEAR_SELECTION": {+ "en": "Clear selection",+ "zh-CN": "清除选择",+ "zh-TW": "清除選取",+ "de": "Auswahl löschen",+ "ko-KR": "선택 해제",+ "no": "Tøm valg",+ "it": "Cancella selezione",+ "pt": "Limpar seleção",+ "es": "Borrar selección",+ "ar": "مسح التحديد",+ "fr": "Effacer la sélection",+ "tr": "Seçimi temizle",+ "ja": "選択をクリア",+ "uk": "Очистити вибір",+ "ca": "Esborra la selecció"+ },+ "COMMON$TOGGLE_MENU": {+ "en": "Toggle menu",+ "zh-CN": "切换菜单",+ "zh-TW": "切換選單",+ "de": "Menü umschalten",+ "ko-KR": "메뉴 전환",+ "no": "Veksle meny",+ "it": "Attiva/disattiva menu",+ "pt": "Alternar menu",+ "es": "Alternar menú",+ "ar": "تبديل القائمة",+ "fr": "Basculer le menu",+ "tr": "Menüyü aç/kapat",+ "ja": "メニューを切り替え",+ "uk": "Перемкнути меню",+ "ca": "Commuta el menú"+ },+ "COMMON$UP": {+ "en": "Up",+ "zh-CN": "向上",+ "zh-TW": "向上",+ "de": "Nach oben",+ "ko-KR": "위로",+ "no": "Opp",+ "it": "Su",+ "pt": "Acima",+ "es": "Arriba",+ "ar": "أعلى",+ "fr": "Haut",+ "tr": "Yukarı",+ "ja": "上へ",+ "uk": "Вгору",+ "ca": "Amunt"+ },+ "COMMON$FAILED_TO_LOAD": {+ "en": "Failed to load",+ "zh-CN": "加载失败",+ "zh-TW": "載入失敗",+ "de": "Laden fehlgeschlagen",+ "ko-KR": "불러오지 못했습니다",+ "no": "Kunne ikke laste",+ "it": "Caricamento non riuscito",+ "pt": "Falha ao carregar",+ "es": "No se pudo cargar",+ "ar": "فشل التحميل",+ "fr": "Échec du chargement",+ "tr": "Yüklenemedi",+ "ja": "読み込みに失敗しました",+ "uk": "Не вдалося завантажити",+ "ca": "No s'ha pogut carregar"+ },+ "SETTINGS$TOGGLE_SETTINGS_MENU": {+ "en": "Toggle settings menu",+ "zh-CN": "切换设置菜单",+ "zh-TW": "切換設定選單",+ "de": "Einstellungsmenü umschalten",+ "ko-KR": "설정 메뉴 전환",+ "no": "Veksle innstillingsmeny",+ "it": "Attiva/disattiva menu impostazioni",+ "pt": "Alternar menu de configurações",+ "es": "Alternar menú de ajustes",+ "ar": "تبديل قائمة الإعدادات",+ "fr": "Basculer le menu des paramètres",+ "tr": "Ayarlar menüsünü aç/kapat",+ "ja": "設定メニューを切り替え",+ "uk": "Перемкнути меню налаштувань",+ "ca": "Commuta el menú de configuració"+ },+ "SIDEBAR$NEW_CHAT": {+ "en": "New Chat",+ "zh-CN": "新建对话",+ "zh-TW": "新增對話",+ "de": "Neuer Chat",+ "ko-KR": "새 채팅",+ "no": "Ny chat",+ "it": "Nuova chat",+ "pt": "Nova conversa",+ "es": "Nuevo chat",+ "ar": "محادثة جديدة",+ "fr": "Nouvelle discussion",+ "tr": "Yeni sohbet",+ "ja": "新規チャット",+ "uk": "Новий чат",+ "ca": "Xat nou"+ },+ "SETTINGS$SECRET_NAME_PATTERN_TITLE": {+ "en": "Must start with a letter, contain only letters/numbers/underscores, and be 1-64 characters",+ "zh-CN": "必须以字母开头,只能包含字母/数字/下划线,且长度为 1-64 个字符",+ "zh-TW": "必須以字母開頭,只能包含字母/數字/底線,且長度為 1-64 個字元",+ "de": "Muss mit einem Buchstaben beginnen, darf nur Buchstaben/Zahlen/Unterstriche enthalten und 1–64 Zeichen lang sein",+ "ko-KR": "문자로 시작하고 영문자/숫자/밑줄만 포함하며 1~64자여야 합니다",+ "no": "Må begynne med en bokstav, kan bare inneholde bokstaver/tall/understreker og være 1–64 tegn",+ "it": "Deve iniziare con una lettera, contenere solo lettere/numeri/trattini bassi ed essere lungo da 1 a 64 caratteri",+ "pt": "Deve começar com uma letra, conter apenas letras/números/sublinhados e ter de 1 a 64 caracteres",+ "es": "Debe empezar por una letra, contener solo letras/números/guiones bajos y tener entre 1 y 64 caracteres",+ "ar": "يجب أن يبدأ بحرف، وأن يحتوي على أحرف/أرقام/شرطات سفلية فقط، وأن يتراوح طوله بين 1 و64 حرفًا",+ "fr": "Doit commencer par une lettre, ne contenir que des lettres/chiffres/traits de soulignement et comporter entre 1 et 64 caractères",+ "tr": "Bir harfle başlamalı, yalnızca harf/rakam/alt çizgi içermeli ve 1-64 karakter olmalıdır",+ "ja": "先頭は英字で、英数字とアンダースコアのみを使用し、1〜64文字にしてください",+ "uk": "Має починатися з літери, містити лише літери/цифри/підкреслення та мати від 1 до 64 символів",+ "ca": "Ha de començar amb una lletra, contenir només lletres/números/guions baixos i tenir entre 1 i 64 caràcters"}}diff --git a/src/routes/llm-settings.tsx b/src/routes/llm-settings.tsxindex eefacf2df0..8b9bf3fb96 100644--- a/src/routes/llm-settings.tsx+++ b/src/routes/llm-settings.tsx@@ -220,6 +220,7 @@ export function LlmSettingsScreen({type="password"className="w-full"value={apiKeyValue}+ // eslint-disable-next-line i18next/no-literal-string -- masked-key sentinel, not translatableplaceholder={apiKeyIsSet ? "<hidden>" : ""}onChange={(value) => onChange("llm.api_key", value)}isDisabled={isDisabled}@@ -356,7 +357,9 @@ export function LlmSettingsScreen({) : null}{renderApiKeyInput(+ // eslint-disable-next-line i18next/no-literal-string -- DOM id, not user-facing"llm-api-key-input",+ // eslint-disable-next-line i18next/no-literal-string -- DOM id, not user-facing"llm-api-key-help-anchor",)}</>@@ -394,13 +397,16 @@ export function LlmSettingsScreen({type="text"className="w-full"value={baseUrlValue}+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatableplaceholder="https://api.openai.com"onChange={(value) => onChange("llm.base_url", value)}isDisabled={isDisabled}/>{renderApiKeyInput(+ // eslint-disable-next-line i18next/no-literal-string -- DOM id, not user-facing"llm-api-key-input",+ // eslint-disable-next-line i18next/no-literal-string -- DOM id, not user-facing"llm-api-key-help-anchor-advanced",)}</>diff --git a/src/ui/dropdown/clear-button.tsx b/src/ui/dropdown/clear-button.tsxindex 98b62c05a8..bada92f91d 100644--- a/src/ui/dropdown/clear-button.tsx+++ b/src/ui/dropdown/clear-button.tsx@@ -10,6 +10,7 @@ export function ClearButton({ onClear }: ClearButtonProps) {type="button"data-testid="dropdown-clear"onClick={onClear}+ // eslint-disable-next-line i18next/no-literal-string -- i18n-free UI primitive; callers supply translated labelsaria-label="Clear selection"className="text-white hover:text-[var(--oh-text-tertiary)]">diff --git a/src/ui/dropdown/dropdown.tsx b/src/ui/dropdown/dropdown.tsxindex c6e77fe40e..348eba5624 100644--- a/src/ui/dropdown/dropdown.tsx+++ b/src/ui/dropdown/dropdown.tsx@@ -221,6 +221,7 @@ export function Dropdown({<><input{...getInputPropsWithCursorFix({+ // eslint-disable-next-line i18next/no-literal-string -- i18n-free UI primitive; callers supply translated labels"aria-label": placeholder ?? "Filter options",tabIndex: -1,})}