The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.
TypeScript code-editorcross-platformdapdatabase-clientdebuggerdesktop-appdeveloper-toolsgithttp-clientideintellijlsprusttauriterminal
fix(i18n): Translate the remaining UI text (Git, hierarchy, pull requests, dialogs, aria labels) (#114)
Jaw70f10e741c9b
diff --git a/NOTICE b/NOTICEindex 0d6c0299a..b6c2fe73a 100644--- a/NOTICE+++ b/NOTICE@@ -6,6 +6,10 @@ contributors as part of the IntelliJ Platform (https://github.com/JetBrains/intehttps://github.com/JetBrains/intellij-plugins), licensed under the Apache License 2.0.Copyright 2000-2026 JetBrains s.r.o. and contributors.+Some Simplified Chinese UI terms follow the Visual Studio Code Simplified Chinese+language pack (https://github.com/microsoft/vscode-loc), Copyright (c) Microsoft+Corporation, licensed under the MIT License.+OpenIDEA is not affiliated with, endorsed by or sponsored by JetBrains s.r.o.IntelliJ and IntelliJ IDEA are trademarks of JetBrains s.r.o.diff --git a/THIRD_PARTY_LICENSES.md b/THIRD_PARTY_LICENSES.mdindex 8b25ee297..202e475bc 100644--- a/THIRD_PARTY_LICENSES.md+++ b/THIRD_PARTY_LICENSES.md@@ -250,3 +250,42 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTIONOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTIONWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.```+++## Chinese UI terminology from Visual Studio Code++Some Simplified Chinese terms in `src/platform/locales/text/zh.json` follow the+wording of the Visual Studio Code Simplified Chinese language pack+([microsoft/vscode-loc](https://github.com/microsoft/vscode-loc), MIT), e.g.+"未跟踪" (untracked), "合并冲突" (merge conflicts), "当前" (current), "已修改"+(modified), "已过时" (outdated), "中止" (abort), "正在卸载" (uninstalling),+"深色" / "浅色" (dark / light) and "只读" (read-only). The remaining translations+are written for this project.++```+Visual Studio Code Localization Packs++Copyright (c) Microsoft Corporation++All rights reserved.++MIT License++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE+```diff --git a/src/editor/core/view/Banner.tsx b/src/editor/core/view/Banner.tsxindex daa147df3..c88911316 100644--- a/src/editor/core/view/Banner.tsx+++ b/src/editor/core/view/Banner.tsx@@ -3,6 +3,7 @@ import { Icon, T } from "@/ui";import { useEditorBanners, type EditorBannerContribution } from "@/workbench/contributions";import { useDocMeta } from "../model/document";import styles from "./EditorArea.module.css";+import { tx } from "@/platform/i18n";const TEXT = {binary: "This file appears to be binary and is shown read-only.",@@ -30,7 +31,7 @@ export function VirtualBanner({ decompiled, description }: { decompiled: boolean<div className={`${styles.banner} ${styles.libraryBanner}`} role="status"><Icon name={decompiled ? "info" : "lock"} size={14} className={styles.bannerIcon} /><span className={styles.bannerText}>- {decompiled ? "Decompiled .class file: sources are not available." : "Library source (read-only)."}+ {decompiled ? tx("Decompiled .class file: sources are not available.") : tx("Library source (read-only).")}</span>{description && (<span className={styles.bannerDetail} title={description}>diff --git a/src/editor/core/view/EditorArea.tsx b/src/editor/core/view/EditorArea.tsxindex ba47dd505..2dd7b4990 100644--- a/src/editor/core/view/EditorArea.tsx+++ b/src/editor/core/view/EditorArea.tsx@@ -283,7 +283,7 @@ function PaneView({ paneId }: { paneId: string }) {tabPrefs.placement === "right" && styles.tabsRight,)}data-pane-id={paneId}- aria-label="Editor"+ aria-label={tx("Editor")}onFocus={onFocus}onBlur={onBlur}>diff --git a/src/editor/core/view/GotoLineDialog.tsx b/src/editor/core/view/GotoLineDialog.tsxindex 12d444920..0f8bbb42f 100644--- a/src/editor/core/view/GotoLineDialog.tsx+++ b/src/editor/core/view/GotoLineDialog.tsx@@ -3,6 +3,7 @@ import { useState, type FormEvent } from "react";import { Dialog, Input } from "@/ui";import { editorController, useEditorStatus, useGotoLine } from "../controller";import styles from "./EditorArea.module.css";+import { tx } from "@/platform/i18n";export function parseLineCol(text: string): { line: number; col: number } | null {const m = /^\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(text);@@ -53,7 +54,7 @@ function GotoLineInner() {placeholder="line[:column]"/><span className={styles.gotoHint}>- {status ? `Current position ${status.line + 1}:${status.col + 1}` : "No active editor"}+ {status ? tx`Current position ${status.line + 1}:${status.col + 1}` : tx("No active editor")}</span></form></Dialog>diff --git a/src/editor/core/view/NavBarPopup.tsx b/src/editor/core/view/NavBarPopup.tsxindex 363ba62df..c3bc81e0c 100644--- a/src/editor/core/view/NavBarPopup.tsx+++ b/src/editor/core/view/NavBarPopup.tsx@@ -23,6 +23,7 @@ import {type NavSegment,} from "./navBar";import styles from "./NavBarPopup.module.css";+import { tx } from "@/platform/i18n";export const useNavBarPopup = create<{ open: boolean; seq: number }>(() => ({ open: false, seq: 0 }));@@ -155,7 +156,7 @@ function NavBar({ path, line, col }: { path: string; line: number; col: number }data-autofocusonKeyDown={onKeyDown}role="toolbar"- aria-label="Navigation bar"+ aria-label={tx("Navigation bar")}><div className={styles.bar}>{segments.map((s, i) => (@@ -184,7 +185,7 @@ function NavBar({ path, line, col }: { path: string; line: number; col: number }className={styles.list}style={{ marginLeft: list.left }}role="listbox"- aria-label="Children"+ aria-label={tx("Children")}>{list.items.length === 0 && (<div className={styles.empty}>diff --git a/src/editor/core/view/StatusItems.tsx b/src/editor/core/view/StatusItems.tsxindex 853829ba8..73443efa1 100644--- a/src/editor/core/view/StatusItems.tsx+++ b/src/editor/core/view/StatusItems.tsx@@ -15,6 +15,7 @@ import { symbolChain } from "./outline";import { NavChildrenPopup } from "./NavBarPopup";import type { NavSegment } from "./navBar";import styles from "./EditorArea.module.css";+import { tx } from "@/platform/i18n";function useActiveMeta() {const path = useEditorStatus((s) => s.status?.path ?? null);@@ -95,7 +96,7 @@ export function Breadcrumbs() {nav: { kind: "symbol", path, label: item.name, item },});return (- <nav className={styles.status} aria-label="Breadcrumbs">+ <nav className={styles.status} aria-label={tx("Breadcrumbs")}>{segments.map((s, i) => (<Fragment key={i}>{i > 0 && <Icon name="chevron-right" size={12} className={styles.statusSep} />}@@ -152,7 +153,7 @@ export function CodeBreadcrumbs({return (<navclassName={clsx(styles.codeCrumbs, position === "top" ? styles.codeCrumbsTop : styles.codeCrumbsBottom)}- aria-label="Code breadcrumbs"+ aria-label={tx("Code breadcrumbs")}>{chain.map((item, i) => (<Fragment key={i}>diff --git a/src/editor/lsp/Popups.tsx b/src/editor/lsp/Popups.tsxindex d302dbada..25986f0db 100644--- a/src/editor/lsp/Popups.tsx+++ b/src/editor/lsp/Popups.tsx@@ -42,6 +42,7 @@ import { renderCode, renderMarkup } from "./markdown";import { describeSummary } from "./workspaceEdit";import { useUsagesStatus } from "./navigation";import styles from "./Popups.module.css";+import { tx } from "@/platform/i18n";export function BulbIcon({ fix }: { fix?: boolean }) {return <Icon name={fix ? "bulb-fix" : "bulb"} size={16} className={styles.bulb} />;@@ -58,7 +59,7 @@ function ListPreviewPanel({ preview }: { preview: ListPreview | null | "loading"if (preview === "loading") return <div className={styles.previewPanel} aria-busy="true" />;if (!preview) return null;return (- <div className={styles.previewPanel} aria-label="Preview">+ <div className={styles.previewPanel} aria-label={tx("Preview")}>{preview.kind === "text" ? (<div className={styles.previewText}>{preview.text}</div>) : (@@ -316,7 +317,7 @@ function RenamePopup({ popup }: { popup: Extract<LspPopup, { kind: "rename" }> }aria-label="New name"/>{suggestions.length > 1 && (- <ul className={styles.renameSuggestions} aria-label="Suggested names">+ <ul className={styles.renameSuggestions} aria-label={tx("Suggested names")}>{suggestions.map((s) => (<li key={s}><button@@ -556,7 +557,7 @@ function PreviewDialog({ popup }: { popup: Extract<LspPopup, { kind: "preview" }))}<div className={styles.previewSummary}>{describeSummary(summary)}</div>{popup.occurrences ? (- <ul className={styles.previewList} aria-label="Occurrences">+ <ul className={styles.previewList} aria-label={tx("Occurrences")}>{popup.occurrences.map((o, i) => {const lead = o.text.length - o.text.trimStart().length;const text = o.text.trim();@@ -575,7 +576,7 @@ function PreviewDialog({ popup }: { popup: Extract<LspPopup, { kind: "preview" }})}</ul>) : (- <ul className={styles.previewList} aria-label="Changes">+ <ul className={styles.previewList} aria-label={tx("Changes")}>{summary.entries.map((e) => (<li key={e.path} className={styles.previewRow}><Icon name={fileIconName(basename(e.path))} size={14} className={styles.itemIcon} />diff --git a/src/features/agents/SessionEditor.tsx b/src/features/agents/SessionEditor.tsxindex 2fb2e5276..e670a3172 100644--- a/src/features/agents/SessionEditor.tsx+++ b/src/features/agents/SessionEditor.tsx@@ -21,7 +21,7 @@ import {selectableText,showContextMenu,} from "@/ui";-import { useTx } from "@/platform/i18n";+import { useTx, tx } from "@/platform/i18n";import { TaskStatusIcon } from "./AgentsView";import { Composer } from "./Composer";import { canSend, emptyDraft, usageLabel, workTime } from "./composerModel";@@ -669,7 +669,7 @@ function SessionComposer({ task, entries }: { task: AgentTask; entries: AgentEntfunction Queue({ task }: { task: AgentTask }) {const fail = (e: unknown) => notifications().notify({ level: "error", title: "Couldn't update the queue", body: String(e) });return (- <div className={styles.queue} aria-label="Queued messages">+ <div className={styles.queue} aria-label={tx("Queued messages")}>{task.queue.map((q) => (<div key={q.id} className={styles.queued}><Icon name="pause" size={12} className={styles.muted} />@@ -701,7 +701,7 @@ function ChangesPane({ task, changes, head }: { task: AgentTask; changes: AgentCconst added = changes?.reduce((n, c) => n + c.added, 0) ?? 0;const removed = changes?.reduce((n, c) => n + c.removed, 0) ?? 0;return (- <aside className={styles.changes} aria-label="Changes">+ <aside className={styles.changes} aria-label={tx("Changes")}><div className={styles.changesHeader}><span className={styles.changesTitle}><T>Changes</T>diff --git a/src/features/analysis/AnalysisDialogs.tsx b/src/features/analysis/AnalysisDialogs.tsxindex b5a481140..55cffd851 100644--- a/src/features/analysis/AnalysisDialogs.tsx+++ b/src/features/analysis/AnalysisDialogs.tsx@@ -171,7 +171,9 @@ function DuplicatesDialog({ onClose }: { onClose: () => void }) {onChange={(e) => setMinText(e.target.value)}aria-label="Minimum duplicate size in tokens"/>- <span className={styles.hint}>tokens</span>+ <span className={styles.hint}>+ <T>tokens</T>+ </span></label><Checkboxchecked={options.anonymizeIdentifiers}@@ -355,7 +357,7 @@ function ReplacePreviewDialog({ files, onClose }: { files: StructuralFile[]; onC{ label: "Cancel", role: "cancel" },]}>- <ul className={styles.previewList} aria-label="Replacements">+ <ul className={styles.previewList} aria-label={tx("Replacements")}>{files.flatMap((f) =>f.matches.map((m, i) => {const key = matchKey(f.path, i);diff --git a/src/features/analysis/DuplicatesView.tsx b/src/features/analysis/DuplicatesView.tsxindex 832b4ef1e..82e90dc1a 100644--- a/src/features/analysis/DuplicatesView.tsx+++ b/src/features/analysis/DuplicatesView.tsx@@ -6,6 +6,7 @@ import { editorService } from "@/workbench/contributions";import { EmptyState, Icon, IconButton, Spinner, Tree, fileIconName } from "@/ui";import { cancelDuplicates, fragmentLines, rerunDuplicates, useDuplicates } from "./duplicates";import styles from "./Analysis.module.css";+import { tx } from "@/platform/i18n";type Node =| { kind: "group"; key: string; index: number; group: DuplicateGroup }@@ -38,7 +39,7 @@ function FragmentPane({ fragment }: { fragment: Fragment }) {type="button"className={styles.fragmentHeader}onClick={() => openFragment(fragment)}- title="Open in editor"+ title={tx("Open in editor")}><Icon name={fileIconName(basename(fragment.path))} size={16} className={styles.fileIcon} /><span className={styles.strong}>{basename(fragment.path)}</span>@@ -104,9 +105,9 @@ export function DuplicatesView() {n.kind === "group" ? (<span className={styles.row}><span className={styles.strong}>- {n.group.fragments.length} occurrences · {n.group.lines} lines+ {tx`${n.group.fragments.length} occurrences · ${n.group.lines} lines`}</span>- <span className={styles.count}>{n.group.tokens} tokens</span>+ <span className={styles.count}>{tx`${n.group.tokens} tokens`}</span></span>) : (<span className={styles.row}>diff --git a/src/features/build-tools/DependencyAnalyzer.tsx b/src/features/build-tools/DependencyAnalyzer.tsxindex ac769f0ba..89c7b91ca 100644--- a/src/features/build-tools/DependencyAnalyzer.tsx+++ b/src/features/build-tools/DependencyAnalyzer.tsx@@ -6,7 +6,7 @@import { useMemo, useState, type MouseEvent } from "react";import clsx from "clsx";import { call, commands, type MavenDependency, type MavenProject } from "@/platform/ipc";-import { useTx, useTxTemplate } from "@/platform/i18n";+import { useTx, useTxTemplate, tx } from "@/platform/i18n";import { editorService, notifications, type EditorInput } from "@/workbench/contributions";import {Button,@@ -207,7 +207,7 @@ function UsagesPane({</span></div>)}- <div className={styles.usageList} aria-label="Usages">+ <div className={styles.usageList} aria-label={tx("Usages")}>{usages.map((u, i) => (<UsageBlock key={i} usage={u} module={module} pom={pom} />))}@@ -302,7 +302,7 @@ export function DependencyAnalyzer(_props: { input: EditorInput }) {return (<div className={styles.view}>- <div className={styles.toolbar} role="toolbar" aria-label="Dependency Analyzer">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Dependency Analyzer")}><Selectaria-label="Module"className={styles.module}diff --git a/src/features/build/BuildView.tsx b/src/features/build/BuildView.tsxindex 61f27239c..cec14c620 100644--- a/src/features/build/BuildView.tsx+++ b/src/features/build/BuildView.tsx@@ -36,6 +36,7 @@ import {} from "./model";import { navigateToMessage, rerunBuild, selectBuildNode, useBuildRun } from "./store";import styles from "./Build.module.css";+import { tx } from "@/platform/i18n";const SEVERITY_ICON: Record<Severity, string> = { error: "error", warning: "warning", info: "info", hint: "info" };@@ -218,7 +219,7 @@ function BuildConsole() {className={styles.console}tabIndex={0}role="log"- aria-label="Build output"+ aria-label={tx("Build output")}onScroll={(e) => {const el = e.currentTarget;stick.current = el.scrollHeight - el.scrollTop - el.clientHeight < LINE_HEIGHT * 2;@@ -252,7 +253,7 @@ function MessageDetail({ message }: { message: BuildMessage }) {}`: null;return (- <div className={styles.detail} tabIndex={0} role="document" aria-label="Build message">+ <div className={styles.detail} tabIndex={0} role="document" aria-label={tx("Build message")}>{location && (<button type="button" className={styles.detailLocation} onClick={() => navigateToMessage(message, true)}>{location}diff --git a/src/features/code-insight/HierarchyView.tsx b/src/features/code-insight/HierarchyView.tsxindex 9323cfc3e..f6776de4d 100644--- a/src/features/code-insight/HierarchyView.tsx+++ b/src/features/code-insight/HierarchyView.tsx@@ -19,9 +19,11 @@ import { openLocation } from "./ipc";import {ROOT_ID,directionLabel,+ hierarchyTitle,hierarchyTarget,loadChildren,refreshHierarchy,+ noneFoundLabel,setDirection,useHierarchy,type HierarchyNode,@@ -56,7 +58,7 @@ export function HierarchyTabs() {const direction = useHierarchy((s) => s.direction);const root = useHierarchy((s) => s.root);if (!root) return null;- const label = `${directionLabel(mode, direction)} of ${root.name}`;+ const label = hierarchyTitle(mode, direction, root.name);return (<Tabsvariant="compact"@@ -74,7 +76,7 @@ function HierarchyToolbar() {const direction = useHierarchy((s) => s.direction);const autoscroll = useHierarchyOptions((s) => s.autoscroll);return (- <div className={styles.toolbar} role="toolbar" aria-label="Hierarchy actions">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Hierarchy actions")}><IconButtonicon="arrow-up"size="small"@@ -165,7 +167,7 @@ export function HierarchyView() {</span>)}{!loading && !failed.has(ROOT_ID) && children.get(ROOT_ID)?.length === 0 && (- <span className={styles.muted}>— no {directionLabel(mode, direction).toLowerCase()} found</span>+ <span className={styles.muted}>{noneFoundLabel(mode, direction)}</span>)}</span>);@@ -180,7 +182,7 @@ export function HierarchyView() {<span className={styles.muted}>{basename(item.path)}:{item.selectionRange.start.line + 1}</span>- {calls > 1 && <span className={styles.muted}>({calls} calls)</span>}+ {calls > 1 && <span className={styles.muted}>{tx`(${calls} calls)`}</span>}{failed.has(n.id) && (<span className={styles.error}><T>failed to load</T>diff --git a/src/features/code-insight/UsagesPopup.tsx b/src/features/code-insight/UsagesPopup.tsxindex 96537c65b..61e060a87 100644--- a/src/features/code-insight/UsagesPopup.tsx+++ b/src/features/code-insight/UsagesPopup.tsx@@ -16,6 +16,7 @@ import { openLocation, readFileLines } from "./ipc";import { showUsageResults, usageCount, useUsagesPopup, type Usage, type UsageGroup } from "./usages";import { UsagePreview } from "./UsagesView";import styles from "./UsagesPopup.module.css";+import { tx } from "@/platform/i18n";const close = () => useUsagesPopup.setState({ open: false });@@ -118,8 +119,8 @@ function UsagesPopupInner() {<div className={styles.focus} tabIndex={0} data-autofocus onKeyDown={onKeyDown}><div className={styles.header}><span className={styles.title}>- Usages{symbol ? ` of ${symbol}` : ""}{" "}- <span className={styles.count}>{filter ? `${items.length} of ${total}` : total} found</span>+ {symbol ? tx`Usages of ${symbol}` : tx("Usages")}{" "}+ <span className={styles.count}>{filter ? tx`${items.length} of ${total} found` : tx`${total} found`}</span></span>{filter && (<span className={clsx(styles.filter, !items.length && styles.noMatch)} role="status">@@ -135,7 +136,8 @@ function UsagesPopupInner() {onClick={() => setUsagesPopupPreview(!preview)}/><button type="button" className={styles.link} onClick={openInFindWindow}>- Open in Find Window{keys ? ` ${keys}` : ""}+ {tx("Open in Find Window")}+ {keys ? ` ${keys}` : ""}</button></div>{note && <div className={styles.note}>{note}</div>}@@ -150,7 +152,7 @@ function UsagesPopupInner() {rowHeight={ROW}aria-label="Usages"onActivate={pick}- empty={<div className={styles.empty}>Nothing matches '{filter}'</div>}+ empty={<div className={styles.empty}>{tx`Nothing matches '${filter}'`}</div>}renderItem={(u) => (<div className={styles.row}><Icon name={fileIconName(basename(u.path))} size={14} className={styles.icon} />@@ -234,7 +236,7 @@ function UsageCodePreview({ usage }: { usage: Usage | null }) {}, [usage, loaded]);return (- <div className={styles.preview} role="region" aria-label="Preview">+ <div className={styles.preview} role="region" aria-label={tx("Preview")}><div ref={host} className={clsx(styles.previewEditor, loaded !== path && styles.previewHidden)} /></div>);diff --git a/src/features/code-insight/hierarchy.ts b/src/features/code-insight/hierarchy.tsindex effd0f663..8ef5ef451 100644--- a/src/features/code-insight/hierarchy.ts+++ b/src/features/code-insight/hierarchy.ts@@ -5,6 +5,7 @@ import { IpcError, call, commands } from "@/platform/ipc";import { toolWindowService } from "@/workbench/contributions";import { basename } from "@/platform/project";import { caretContext, hint, lspRequest, reportError, withDocument, type CaretContext } from "./ipc";+import { tx } from "@/platform/i18n";export type HierarchyMode = "call" | "type";@@ -56,9 +57,21 @@ export function resetHierarchy() {}));}+/** The empty-result line of the hierarchy tree. */+export function noneFoundLabel(mode: HierarchyMode, direction: HierarchyDirection): string {+ if (mode === "call") return direction === "incoming" ? tx`— no callers found` : tx`— no callees found`;+ return direction === "incoming" ? tx`— no supertypes found` : tx`— no subtypes found`;+}+export function directionLabel(mode: HierarchyMode, direction: HierarchyDirection): string {- if (mode === "call") return direction === "incoming" ? "Callers" : "Callees";- return direction === "incoming" ? "Supertypes" : "Subtypes";+ if (mode === "call") return direction === "incoming" ? tx("Callers") : tx("Callees");+ return direction === "incoming" ? tx("Supertypes") : tx("Subtypes");+}++/** The tab title of the hierarchy tree, e.g. "Callers of main". */+export function hierarchyTitle(mode: HierarchyMode, direction: HierarchyDirection, name: string): string {+ if (mode === "call") return direction === "incoming" ? tx`Callers of ${name}` : tx`Callees of ${name}`;+ return direction === "incoming" ? tx`Supertypes of ${name}` : tx`Subtypes of ${name}`;}function request(mode: HierarchyMode, doc: number, line: number, col: number, direction: HierarchyDirection) {diff --git a/src/features/database/DataDialogs.tsx b/src/features/database/DataDialogs.tsxindex e681afd84..0eef22125 100644--- a/src/features/database/DataDialogs.tsx+++ b/src/features/database/DataDialogs.tsx@@ -225,7 +225,7 @@ export function ImportDialog({ id, schema, table }: { id: string; schema: string<T>Columns:</T></span><span className={styles.formHint}>- {mapped.length ? mapped.join(", ") : "No column of the file matches the table"}+ {mapped.length ? mapped.join(", ") : tx("No column of the file matches the table")}</span></div>{preview.length > 0 && (diff --git a/src/features/database/DataView.tsx b/src/features/database/DataView.tsxindex 480e81ce2..11423947f 100644--- a/src/features/database/DataView.tsx+++ b/src/features/database/DataView.tsx@@ -148,7 +148,7 @@ export function DataView(props: DataViewProps) {/>{filter.size > 0 && (<div className={styles.filterPill} role="status">- {shown} of {rowCount} rows+ {tx`${shown} of ${rowCount} rows`}<button type="button" className={styles.filterPillClear} onClick={() => setFilter(new Map())}><T>Clear local filter</T></button>@@ -219,7 +219,7 @@ function FilterPopup(props: {value={query}onChange={(e) => setQuery(e.target.value)}/>- <div className={styles.filterValues} role="group" aria-label="Values">+ <div className={styles.filterValues} role="group" aria-label={tx("Values")}>{list.map(({ value: v, count }) => (<div key={v ?? "\u0000null"} className={styles.filterValue}><Checkbox@@ -270,7 +270,7 @@ function SidePanel(props: {}) {const { range, value, columns } = props;return (- <aside className={styles.sidePanel} aria-label="Value panel">+ <aside className={styles.sidePanel} aria-label={tx("Value panel")}><div className={styles.sidePanelHead}><Tabsvariant="compact"diff --git a/src/features/database/DatabaseView.tsx b/src/features/database/DatabaseView.tsxindex 09a983d36..63367cd81 100644--- a/src/features/database/DatabaseView.tsx+++ b/src/features/database/DatabaseView.tsx@@ -42,6 +42,7 @@ import {import { DB_VIEW_FOCUS, openTableData } from "./treeActions";import { newMenu, nodeMenu } from "./treeMenu";import styles from "./Database.module.css";+import { tx } from "@/platform/i18n";const GROUP_LABELS: Record<Group, string> = {columns: "columns",@@ -427,7 +428,7 @@ export function DatabaseView() {<span className={styles.nodeIcon}><Icon name={i} size={16} />{/* IDEA: a green dot on the data source icon while connected. */}- {live && <span className={styles.connectedDot} title="Connected" />}+ {live && <span className={styles.connectedDot} title={tx("Connected")} />}</span>)}<span className={labelClass}>{label(n)}</span>@@ -490,7 +491,7 @@ function DatabaseToolbar() {const active = !!target && [...connected].some((t) => splitTarget(t).id === splitTarget(target).id);const button = { size: "small", iconSize: 16 } as const;return (- <div className={styles.dbToolbar} role="toolbar" aria-label="Database actions">+ <div className={styles.dbToolbar} role="toolbar" aria-label={tx("Database actions")}><IconButtonref={plus}{...button}@@ -520,7 +521,7 @@ function DatabaseToolbar() {<buttontype="button"className={styles.textTool}- aria-label="Go to DDL"+ aria-label={tx("Go to DDL")}disabled={!table}onClick={() => void executeAction("db.goToDdl")}{...tooltipAttrs("Go to DDL", shortcutLabel("db.goToDdl"))}diff --git a/src/features/database/Grid.tsx b/src/features/database/Grid.tsxindex 64c633dd4..8029a90ed 100644--- a/src/features/database/Grid.tsx+++ b/src/features/database/Grid.tsx@@ -9,6 +9,7 @@ import clsx from "clsx";import { Icon, showContextMenu, type MenuItem } from "@/ui";import { toCsv, toTsv, type Cell } from "./model";import styles from "./Database.module.css";+import { tx } from "@/platform/i18n";export interface GridColumn {name: string;@@ -291,7 +292,7 @@ export function Grid(props: GridProps) {type="button"className={clsx(styles.headerFilter, props.filtered?.(ci) && styles.headerFilterOn)}aria-label={`Filter ${c.name}`}- title="Local filter"+ title={tx("Local filter")}onMouseDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation();diff --git a/src/features/database/ObjectDialogs.tsx b/src/features/database/ObjectDialogs.tsxindex 45cbed50c..8681ad52a 100644--- a/src/features/database/ObjectDialogs.tsx+++ b/src/features/database/ObjectDialogs.tsx@@ -120,7 +120,7 @@ function RenameDialog({ id, object }: { id: string; object: DbObjectRef | null }><div className={styles.dialogBody}><label className={styles.formLabelLeft} htmlFor="db-rename">- Rename {what} '{initial}' to:+ {tx`Rename ${what} '${initial}' to:`}</label><Inputid="db-rename"@@ -156,7 +156,8 @@ function DropDialog({ id, object }: { id: string; object: DbObjectRef }) {><div className={styles.dialogBody}><div className={styles.dialogLead}>- Drop {KIND_LABEL[object.kind]} <strong>{reference(driver, object)}</strong>? This cannot be undone.+ {tx`Drop ${KIND_LABEL[object.kind]}`} <strong>{reference(driver, object)}</strong>+ {tx`? This cannot be undone.`}</div><Checkboxchecked={ifExists}@@ -387,7 +388,7 @@ function ModifyTableForm({onClick={remove}/></div>- <div role="listbox" aria-label="Columns" className={styles.modifyList}>+ <div role="listbox" aria-label={tx("Columns")} className={styles.modifyList}>{columns.map((c) => (<divkey={c.key}@@ -521,7 +522,7 @@ function SourceUrlDialog() {/><span className={styles.formHint}>{url.trim() && !parsed- ? "Not a URL of PostgreSQL, MySQL, SQLite or a compatible database"+ ? tx("Not a URL of PostgreSQL, MySQL, SQLite or a compatible database"): "postgresql://, mysql://, mariadb://, redshift://, tidb://…, jdbc:…, sqlite:path"}</span></div>diff --git a/src/features/database/ResultsView.tsx b/src/features/database/ResultsView.tsxindex 3d30b615c..2c32f6314 100644--- a/src/features/database/ResultsView.tsx+++ b/src/features/database/ResultsView.tsx@@ -24,6 +24,7 @@ import {type ResultTab,} from "./store";import styles from "./Database.module.css";+import { tx } from "@/platform/i18n";function time(t: number): string {const d = new Date(t);@@ -44,7 +45,7 @@ function Output() {<span className={styles.spacer} /><IconButton icon="trash" title="Clear All" disabled={!lines.length} onClick={clearOutput} /></div>- <div ref={ref} className={styles.output} role="log" aria-label="Database output">+ <div ref={ref} className={styles.output} role="log" aria-label={tx("Database output")}>{lines.map((l: OutputLine) => (<div key={l.id} className={clsx(styles.outputLine, l.kind === "error" && styles.outputError)}><span className={styles.outputTime}>[{time(l.time)}]</span>{" "}@@ -115,8 +116,8 @@ function Result({ tab }: { tab: ResultTab }) {aria-label={tab.title}/><div className={styles.rowPill} role="status" title={outcomeSummary(tab.outcome)}>- {r.rows.length} row{r.rows.length === 1 ? "" : "s"}- {r.hasMore ? " (limit reached)" : ""}+ {r.rows.length === 1 ? tx`${r.rows.length} row` : tx`${r.rows.length} rows`}+ {r.hasMore ? ` ${tx("(limit reached)")}` : ""}</div></div>)}@@ -208,7 +209,7 @@ function PlanResult({ tab }: { tab: ResultTab }) {<EmptyState title="Empty plan" />)}</div>- <table className={styles.planProperties} aria-label="Plan node properties">+ <table className={styles.planProperties} aria-label={tx("Plan node properties")}><thead><tr><th>diff --git a/src/features/database/SourceDialog.tsx b/src/features/database/SourceDialog.tsxindex 2abff8b48..0e77b840e 100644--- a/src/features/database/SourceDialog.tsx+++ b/src/features/database/SourceDialog.tsx@@ -534,7 +534,7 @@ export function SourceDialog({{sshOn && (<><span />- <span className={styles.formHint}>Reached from the SSH host {sshLabel({ ssh: sshUsed })}.</span>+ <span className={styles.formHint}>{tx`Reached from the SSH host ${sshLabel({ ssh: sshUsed })}.`}</span></>)}<label className={styles.formLabel} htmlFor="db-user">@@ -916,8 +916,10 @@ export function SourceDialog({</Button><span className={styles.formHint}>{initial?.id- ? "The Database tree shows only the checked names and patterns (* and ?); the connected database always shows."- : "Save the data source to pick from the server's names; patterns (* and ?) work any time."}+ ? tx(+ "The Database tree shows only the checked names and patterns (* and ?); the connected database always shows.",+ )+ : tx("Save the data source to pick from the server's names; patterns (* and ?) work any time.")}</span></div></div>diff --git a/src/features/database/TableEditor.tsx b/src/features/database/TableEditor.tsxindex 684509169..7e9acdf0c 100644--- a/src/features/database/TableEditor.tsx+++ b/src/features/database/TableEditor.tsx@@ -297,7 +297,7 @@ export function TableEditor({ input }: { input: EditorInput }) {</div>{page && !editable && (<div className={styles.notice}>- {pk.length ? "Read-only data source." : "Read-only: the table has no primary key to identify rows."}+ {pk.length ? tx("Read-only data source.") : tx("Read-only: the table has no primary key to identify rows.")}</div>)}{error ? (diff --git a/src/features/debugger/ui/DebugToolWindow.tsx b/src/features/debugger/ui/DebugToolWindow.tsxindex 8ef79ce7e..59595231a 100644--- a/src/features/debugger/ui/DebugToolWindow.tsx+++ b/src/features/debugger/ui/DebugToolWindow.tsx@@ -152,8 +152,8 @@ export function DebugToolWindow() {return (<div className={styles.root}>- <div className={styles.toolbar} role="toolbar" aria-label="Debugger actions">- <div role="tablist" aria-label="Debug views" className={styles.tabs}>+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Debugger actions")}>+ <div role="tablist" aria-label={tx("Debug views")} className={styles.tabs}>{([["variables", "Threads & Variables"],@@ -262,7 +262,7 @@ function FramesPane({ session }: { session: DebugSession }) {<divclassName={styles.frameList}role="listbox"- aria-label="Frames"+ aria-label={tx("Frames")}tabIndex={0}onKeyDown={onKeyDown}onFocus={() =>@@ -276,7 +276,7 @@ function FramesPane({ session }: { session: DebugSession }) {}onBlur={() => blurDebugView("frames")}>- {!paused && <div className={styles.note}>{session.status === "terminated" ? "Finished" : "Running…"}</div>}+ {!paused && <div className={styles.note}>{session.status === "terminated" ? tx("Finished") : "Running…"}</div>}{items.map((item) =>item.kind === "hidden" ? (<button@@ -285,7 +285,7 @@ function FramesPane({ session }: { session: DebugSession }) {className={clsx(styles.frame, styles.hiddenFrames)}onClick={() => setShowAll(true)}>- {item.count} library frames hidden+ {tx`${item.count} library frames hidden`}</button>) : (<button@@ -496,7 +496,7 @@ function VariablesPane({ session }: { session: DebugSession }) {}}}placeholder={frame != null ? "Evaluate expression (↩) or add a watch (⇧⌘↩)" : "Evaluate expression"}- aria-label="Evaluate expression"+ aria-label={tx("Evaluate expression")}spellCheck={false}autoComplete="off"disabled={frame == null}@@ -516,7 +516,9 @@ function VariablesPane({ session }: { session: DebugSession }) {</div>{frame == null && !watches.length && !lastEval ? (<div className={styles.note}>- {session.status === "terminated" ? "The session has finished." : "Variables are available while suspended."}+ {session.status === "terminated"+ ? tx("The session has finished.")+ : tx("Variables are available while suspended.")}</div>) : (<VariablesView@@ -589,7 +591,7 @@ function ConsoleView({ session }: { session: DebugSession }) {showContextMenu(e, [{ label: "Clear All", icon: "trash", run: () => clearConsole(session.id) }]);}}role="log"- aria-label="Debug console"+ aria-label={tx("Debug console")}tabIndex={0}>{(lines ?? []).map((l) => (@@ -609,7 +611,7 @@ function ConsoleView({ session }: { session: DebugSession }) {onKeyDown={onKeyDown}placeholder={isLive(session) ? "Evaluate in the debug console" : "Session finished"}disabled={!isLive(session)}- aria-label="Debug console input"+ aria-label={tx("Debug console input")}spellCheck={false}autoComplete="off"/>diff --git a/src/features/debugger/ui/Overlays.tsx b/src/features/debugger/ui/Overlays.tsxindex fc0e32c59..148067930 100644--- a/src/features/debugger/ui/Overlays.tsx+++ b/src/features/debugger/ui/Overlays.tsx@@ -458,7 +458,11 @@ function BreakpointsDialog() {{r.bp.line != null ? `:${r.bp.line + 1}` : ""}</span>)}- {st && !st.verified && isLive(activeSession()) && <span className={styles.bpCond}>unverified</span>}+ {st && !st.verified && isLive(activeSession()) && (+ <span className={styles.bpCond}>+ <T>unverified</T>+ </span>+ )}</div>);}@@ -486,7 +490,11 @@ function BreakpointsDialog() {</span><span className={styles.bpDir}>{relativePath(root, r.path)}</span>{isConditional(r.bp) && <span className={styles.bpCond}>{suspends(r.bp) ? "if" : "log"}</span>}- {r.bp.temporary && <span className={styles.bpCond}>temp</span>}+ {r.bp.temporary && (+ <span className={styles.bpCond}>+ <T>temp</T>+ </span>+ )}</div>);}}@@ -514,7 +522,7 @@ function ExceptionBreakpoints({ open }: { open: boolean }) {if (open) void refreshExceptionFilters();}, [open]);return (- <section className={styles.exceptions} aria-label="Exception breakpoints">+ <section className={styles.exceptions} aria-label={tx("Exception breakpoints")}><div className={styles.exceptionsTitle}><T>Exception Breakpoints</T></div>@@ -564,7 +572,7 @@ function BreakpointDetail({ row, onGo }: { row: BpRow; onGo: () => void }) {<T>Remove</T></Button></div>- {st && <div className={styles.statusLine}>{st.verified ? "Verified" : (st.message ?? "Not verified")}</div>}+ {st && <div className={styles.statusLine}>{st.verified ? tx("Verified") : (st.message ?? "Not verified")}</div>}<BreakpointFields path={path} bp={bp} /><Checkboxchecked={!!bp.temporary}@@ -595,7 +603,7 @@ function SpecialDetail({ bp, onGo }: { bp: SpecialBreakpoint; onGo: () => void }<T>Remove</T></Button></div>- {st && <div className={styles.statusLine}>{st.verified ? "Verified" : (st.message ?? "Not verified")}</div>}+ {st && <div className={styles.statusLine}>{st.verified ? tx("Verified") : (st.message ?? "Not verified")}</div>}<Checkbox checked={bp.enabled} onChange={(enabled) => updateSpecial(bp.id, { enabled })} label="Enabled" />{bp.kind === "method" ? (<label className={styles.field}>@@ -614,7 +622,7 @@ function SpecialDetail({ bp, onGo }: { bp: SpecialBreakpoint; onGo: () => void }</label>) : (<>- <div className={styles.statusLine}>Watching {bp.dataId}</div>+ <div className={styles.statusLine}>{tx`Watching ${bp.dataId}`}</div><label className={styles.field}><span className={styles.label}><T>Suspend on</T>@@ -776,7 +784,7 @@ function EvaluateDialogInner({ initial }: { initial: string }) {spellCheck={false}autoComplete="off"data-autofocus=""- aria-label="Expression"+ aria-label={tx("Expression")}placeholder={paused ? "Expression to evaluate in the selected frame" : "Pause the program to evaluate"}/><span ref={historyButton}>@@ -805,7 +813,7 @@ function EvaluateDialogInner({ initial }: { initial: string }) {<VariablesView roots={[result]} session={session?.id ?? null} aria-label="Evaluation result" />) : (<div className={styles.empty}>- {paused ? "Press Enter to evaluate" : "Evaluation is available while the program is suspended"}+ {paused ? tx("Press Enter to evaluate") : tx("Evaluation is available while the program is suspended")}</div>)}</div>@@ -938,7 +946,11 @@ function AttachPopup() {focusable={false}aria-label="Processes"className={styles.attachList}- empty={<div className={styles.empty}>No attachable processes{filter ? " match the filter" : ""}.</div>}+ empty={+ <div className={styles.empty}>+ {filter ? tx`No attachable processes match the filter.` : tx`No attachable processes.`}+ </div>+ }renderItem={(r) =>r.kind === "process" ? (<div className={styles.chooserRow} title={r.process.commandLine}>diff --git a/src/features/deployment/RemoteHostView.tsx b/src/features/deployment/RemoteHostView.tsxindex 2da00981c..ca807ee49 100644--- a/src/features/deployment/RemoteHostView.tsx+++ b/src/features/deployment/RemoteHostView.tsx@@ -123,7 +123,7 @@ export function RemoteHostView() {return (<div className={styles.view}>- <div className={styles.toolbar} role="toolbar" aria-label="Remote host actions">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Remote host actions")}><SelectclassName={styles.serverSelect}aria-label="Deployment server"diff --git a/src/features/github/PullRequestsView.tsx b/src/features/github/PullRequestsView.tsxindex 0c6f9bf69..a782613c6 100644--- a/src/features/github/PullRequestsView.tsx+++ b/src/features/github/PullRequestsView.tsx@@ -35,14 +35,9 @@ import {import { addComment, checkoutPullRequest, openCommentLocation, openFileDiff, openUrl, submitReview } from "./ops";import { cancelBusy, loadDetails, refreshAll, select, setQuery, useGithub, type DetailTab } from "./store";import styles from "./Github.module.css";-import { tx } from "@/platform/i18n";+import { t, tx } from "@/platform/i18n";-const STATES: Array<{ value: PrStateFilter; label: string }> = [- { value: "open", label: "Open" },- { value: "merged", label: "Merged" },- { value: "closed", label: "Closed" },- { value: "all", label: "All" },-];+const STATES: PrStateFilter[] = ["open", "merged", "closed", "all"];function Unavailable({ availability }: { availability: GhAvailability }) {const retry = (@@ -138,7 +133,10 @@ function Filters() {className={styles.search}/><div className={styles.filterRow}>- <Select value={query.state} options={STATES} onChange={(state) => setQuery({ state })} aria-label="State" />+ <Select+ value={query.state}+ options={STATES.map((value) => ({ value, label: t(`github.prState.${value}`) }))}+ onChange={(state) => setQuery({ state })} aria-label="State" /><Checkbox checked={query.authorMe} onChange={(authorMe) => setQuery({ authorMe })} label="Mine" /><Checkboxchecked={query.reviewRequested}@@ -247,7 +245,7 @@ function Overview({ pr }: { pr: PullRequestDetails }) {<div className={styles.scroll}><Markdown text={pr.body} /><section className={styles.section}>- <h3 className={styles.sectionTitle}>Checks · {checksText(summary)}</h3>+ <h3 className={styles.sectionTitle}>{tx`Checks · ${checksText(summary)}`}</h3>{pr.checks.map((c, i) => (<div key={i} className={styles.checkRow}><Icon name={CHECK_ICON[c.status]} size={14} className={styles[`check-${c.status}`]} />@@ -303,7 +301,7 @@ function Overview({ pr }: { pr: PullRequestDetails }) {))}</div>)}- {pr.assignees.length > 0 && <div className={styles.dim}>Assignees: {pr.assignees.join(", ")}</div>}+ {pr.assignees.length > 0 && <div className={styles.dim}>{tx`Assignees: ${pr.assignees.join(", ")}`}</div>}</section>)}</div>@@ -318,7 +316,7 @@ function Files({ pr }: { pr: PullRequestDetails }) {return m;}, [comments]);return (- <div className={styles.scroll} role="list" aria-label="Changed files">+ <div className={styles.scroll} role="list" aria-label={tx("Changed files")}>{pr.files.map((f) => {const slash = f.path.lastIndexOf("/");return (@@ -334,7 +332,7 @@ function Files({ pr }: { pr: PullRequestDetails }) {<span className={clsx(styles.fileName, styles[`change-${f.changeType}`])}>{f.path.slice(slash + 1)}</span><span className={clsx(styles.dim, styles.ellipsis)}>{slash > 0 ? f.path.slice(0, slash) : ""}</span><span className={styles.flex} />- {counts.get(f.path) ? <span className={styles.dim}>{counts.get(f.path)} comments</span> : null}+ {counts.get(f.path) ? <span className={styles.dim}>{tx`${counts.get(f.path)} comments`}</span> : null}<span className={styles.added}>+{f.additions}</span><span className={styles.deleted}>−{f.deletions}</span></button>@@ -346,7 +344,7 @@ function Files({ pr }: { pr: PullRequestDetails }) {function Commits({ pr }: { pr: PullRequestDetails }) {return (- <div className={styles.scroll} role="list" aria-label="Commits">+ <div className={styles.scroll} role="list" aria-label={tx("Commits")}>{pr.commits.map((c) => (<divkey={c.oid}@@ -406,7 +404,11 @@ function Conversation({ pr }: { pr: PullRequestDetails }) {<button type="button" className={styles.link} onClick={() => void openCommentLocation(pr, t.root.path)}>{t.root.path}:{t.root.line ?? t.root.originalLine ?? "?"}</button>- {t.root.line == null && <span className={styles.dim}>outdated</span>}+ {t.root.line == null && (+ <span className={styles.dim}>+ <T>outdated</T>+ </span>+ )}</header>{[t.root, ...t.replies].map((c) => (<div key={c.id} className={styles.threadItem}>@@ -421,8 +423,8 @@ function Conversation({ pr }: { pr: PullRequestDetails }) {))}<div className={styles.newComment}><textarea- aria-label="New comment"- placeholder="Add a comment (Markdown)"+ aria-label={tx("New comment")}+ placeholder={tx("Add a comment (Markdown)")}className={styles.textarea}rows={4}value={draft}@@ -565,7 +567,11 @@ export function PullRequestsView() {if (!useGithub.getState().availability) void refreshAll();}, []);if (!availability)- return <div className={styles.loading}>{checking && <Spinner size={14} />} Connecting to GitHub…</div>;+ return (+ <div className={styles.loading}>+ {checking && <Spinner size={14} />} {tx("Connecting to GitHub…")}+ </div>+ );if (availability.kind !== "ready")return (<div className={styles.view}>diff --git a/src/features/github/dialogs.tsx b/src/features/github/dialogs.tsxindex e262d0439..1fd2662ea 100644--- a/src/features/github/dialogs.tsx+++ b/src/features/github/dialogs.tsx@@ -126,8 +126,8 @@ function CreateDialog(props: {onChange={(e) => setTitle(e.target.value)}/><textarea- aria-label="Description"- placeholder="Description (Markdown)"+ aria-label={tx("Description")}+ placeholder={tx("Description (Markdown)")}className={styles.textarea}rows={10}value={body}@@ -188,7 +188,7 @@ function ReviewDialog(props: {/><textareadata-autofocus- aria-label="Review comment"+ aria-label={tx("Review comment")}placeholder={needsBody ? "Leave a comment (required)" : "Leave a comment (optional)"}className={styles.textarea}rows={8}diff --git a/src/features/github/github.test.ts b/src/features/github/github.test.tsindex 5f388a409..269dffbaa 100644--- a/src/features/github/github.test.ts+++ b/src/features/github/github.test.ts@@ -44,7 +44,7 @@ describe("pull request model", () => {const c = (status: PrCheck["status"]): PrCheck => ({ name: status, workflow: null, status, url: null });const s = checksSummary([c("failure"), c("success"), c("success"), c("pending"), c("skipped")]);expect(s).toEqual({ failed: 1, pending: 1, passed: 2, other: 1 });- expect(checksText(s)).toBe("1 failing, 1 pending, 2 successful, 1 skipped");+ expect(checksText(s)).toBe("1 failing, 1 pending, 2 passed, 1 skipped");expect(checksText(checksSummary([]))).toBe("No checks");});diff --git a/src/features/github/model.ts b/src/features/github/model.tsindex af814bca0..eeab618fb 100644--- a/src/features/github/model.ts+++ b/src/features/github/model.ts@@ -1,20 +1,22 @@/** Pure helpers of the Pull Requests view (labels, check summaries, review threads, diff inputs). */import type { ChangedFile, PrCheck, PrDiffRevisions, PrFile, PrReviewComment, PullRequestDetails, PullRequestSummary } from "@/platform/ipc";+import { t, tx } from "@/platform/i18n";+/** Keyed, not source text: "Open" as a state reads differently from the "Open" action in some locales. */export function stateLabel(pr: PullRequestSummary): string {- if (pr.state === "merged") return "Merged";- if (pr.state === "closed") return "Closed";- return pr.isDraft ? "Draft" : "Open";+ if (pr.state === "merged") return t("github.prState.merged");+ if (pr.state === "closed") return t("github.prState.closed");+ return pr.isDraft ? t("github.prState.draft") : t("github.prState.open");}export function reviewDecisionLabel(decision: string | null): string | null {switch (decision) {case "APPROVED":- return "Approved";+ return tx("Approved");case "CHANGES_REQUESTED":- return "Changes requested";+ return tx("Changes requested");case "REVIEW_REQUIRED":- return "Review required";+ return tx("Review required");default:return null;}@@ -23,15 +25,15 @@ export function reviewDecisionLabel(decision: string | null): string | null {export function reviewStateLabel(state: string): string {switch (state) {case "APPROVED":- return "approved";+ return tx("approved");case "CHANGES_REQUESTED":- return "requested changes";+ return tx("requested changes");case "COMMENTED":- return "reviewed";+ return tx("reviewed");case "DISMISSED":- return "review dismissed";+ return tx("review dismissed");case "REQUESTED":- return "review requested";+ return tx("review requested");default:return state.toLowerCase().replace(/_/g, " ");}@@ -58,11 +60,11 @@ export function checksSummary(checks: readonly PrCheck[]): ChecksSummary {export function checksText(s: ChecksSummary): string {const parts: string[] = [];- if (s.failed) parts.push(`${s.failed} failing`);- if (s.pending) parts.push(`${s.pending} pending`);- if (s.passed) parts.push(`${s.passed} successful`);- if (s.other) parts.push(`${s.other} skipped`);- return parts.length ? parts.join(", ") : "No checks";+ if (s.failed) parts.push(tx`${s.failed} failing`);+ if (s.pending) parts.push(tx`${s.pending} pending`);+ if (s.passed) parts.push(tx`${s.passed} passed`);+ if (s.other) parts.push(tx`${s.other} skipped`);+ return parts.length ? parts.join(", ") : tx`No checks`;}/** "3 minutes ago"-style text for an ISO date. */@@ -70,18 +72,18 @@ export function relativeTime(iso: string, now = Date.now()): string {const t = Date.parse(iso);if (Number.isNaN(t)) return "";const s = Math.max(0, Math.round((now - t) / 1000));- const units: Array<[number, string]> = [- [60 * 60 * 24 * 365, "year"],- [60 * 60 * 24 * 30, "month"],- [60 * 60 * 24, "day"],- [60 * 60, "hour"],- [60, "minute"],+ const units: Array<[number, (n: number) => string]> = [+ [60 * 60 * 24 * 365, (n) => (n === 1 ? tx`${n} year ago` : tx`${n} years ago`)],+ [60 * 60 * 24 * 30, (n) => (n === 1 ? tx`${n} month ago` : tx`${n} months ago`)],+ [60 * 60 * 24, (n) => (n === 1 ? tx`${n} day ago` : tx`${n} days ago`)],+ [60 * 60, (n) => (n === 1 ? tx`${n} hour ago` : tx`${n} hours ago`)],+ [60, (n) => (n === 1 ? tx`${n} minute ago` : tx`${n} minutes ago`)],];- for (const [size, name] of units) {+ for (const [size, text] of units) {const n = Math.floor(s / size);- if (n >= 1) return `${n} ${name}${n === 1 ? "" : "s"} ago`;+ if (n >= 1) return text(n);}- return "just now";+ return tx("just now");}export interface ReviewThread {diff --git a/src/features/http-client/HttpClientView.tsx b/src/features/http-client/HttpClientView.tsxindex b2809306a..cc14e7741 100644--- a/src/features/http-client/HttpClientView.tsx+++ b/src/features/http-client/HttpClientView.tsx@@ -94,10 +94,10 @@ function ExchangeView({ ex }: { ex: HttpExchange }) {<pre className={styles.pre}>{ex.entry.error}</pre>) : body == null ? (<EmptyState title="Binary response">- {r.contentType ?? "unknown type"}, {formatSize(r.size)}+ {r.contentType ?? tx("unknown type")}, {formatSize(r.size)}</EmptyState>) : (- <pre className={styles.pre} aria-label="Response body">+ <pre className={styles.pre} aria-label={tx("Response body")}>{body}{r.truncated && (<span className={styles.truncated}>{`\n… truncated (${formatSize(r.size)} received)`}</span>@@ -143,10 +143,10 @@ export function HttpClientView() {return (<SplitGroup orientation="horizontal" className={styles.root}><SplitPanel id="http-history" defaultSize="32%" minSize="160px">- <div className={styles.list} role="list" aria-label="Response history">+ <div className={styles.list} role="list" aria-label={tx("Response history")}>{running && (<div className={styles.runningRow}>- <Spinner size={12} /> Sending request #{running.index + 1}…+ <Spinner size={12} /> {tx`Sending request #${running.index + 1}…`}</div>)}{history.length === 0 && !running ? (diff --git a/src/features/macros/MacrosDialog.tsx b/src/features/macros/MacrosDialog.tsxindex 24c70faaf..19512bc1e 100644--- a/src/features/macros/MacrosDialog.tsx+++ b/src/features/macros/MacrosDialog.tsx@@ -98,7 +98,7 @@ function EditMacrosDialog({ onClose }: { onClose: () => void }) {</Button></div></div>- <ol className={styles.steps} aria-label="Recorded steps">+ <ol className={styles.steps} aria-label={tx("Recorded steps")}>{macro?.steps.map((step, i) => (<li key={i} className={styles.step}>{describeStep(step, actionTitle)}diff --git a/src/features/perf/MemoryStatus.tsx b/src/features/perf/MemoryStatus.tsxindex e838891f3..631c7a7af 100644--- a/src/features/perf/MemoryStatus.tsx+++ b/src/features/perf/MemoryStatus.tsx@@ -89,7 +89,7 @@ export function MemoryDetails({ metrics: m }: { metrics: AppMetrics }) {const sections = memorySections(m.memory ?? []);return (<div className={styles.panel}>- <div className={styles.header}>Memory & Diagnostics</div>+ <div className={styles.header}>{tx("Memory & Diagnostics")}</div>{sections.map((sec) => (<div key={sec.title} className={styles.section} aria-label={sec.title} role="group"><div className={styles.groupRow}>diff --git a/src/features/perf/PerfOverlay.tsx b/src/features/perf/PerfOverlay.tsxindex 7f537d87c..2cba75d2b 100644--- a/src/features/perf/PerfOverlay.tsx+++ b/src/features/perf/PerfOverlay.tsx@@ -7,6 +7,7 @@ import { FRAME_BUDGET_MS, keystrokeLatencies, supportsEntryType, type EventEntryimport { RollingWindow, type Summary } from "./stats";import { refreshMetrics, usePerf } from "./store";import styles from "./perf.module.css";+import { tx } from "@/platform/i18n";const IPC_PING_MS = 2000;const REPAINT_MS = 500;@@ -70,7 +71,7 @@ function PerfPanel({ onClose }: { onClose: () => void }) {}, [eventTiming, longTasks]);return (- <section className={styles.overlay} aria-label="Performance overlay (dev diagnostics)">+ <section className={styles.overlay} aria-label={tx("Performance overlay (dev diagnostics)")}><div className={styles.overlayHeader}><span className={styles.overlayTitle}><T>Performance (dev diagnostics)</T>@@ -109,7 +110,7 @@ function Block({ title, summary, budget, note }: { title: string; summary?: Summ<span className={styles.value}>{s ? [s.last, s.p50, s.p95, s.max].map(formatMs).join(" · ") : "–"}</span></div><div className={styles.row}>- <span className={styles.label}>Over budget ({budget})</span>+ <span className={styles.label}>{tx`Over budget (${budget})`}</span><span className={s && s.overBudget > 0 ? `${styles.value} ${styles.warn}` : styles.value}>{s ? s.overBudget : "–"}</span>diff --git a/src/features/plugins/PluginsPage.tsx b/src/features/plugins/PluginsPage.tsxindex 2f6a7a152..7eff00533 100644--- a/src/features/plugins/PluginsPage.tsx+++ b/src/features/plugins/PluginsPage.tsx@@ -124,7 +124,11 @@ function InstalledRow({ plugin, selected, onSelect }: { plugin: PluginInfo; sele<span className={styles.rowMeta}><span className={styles.rowVendor}>{vendorOf(plugin.authors) || plugin.id}</span><span>{plugin.version}</span>- {plugin.source === "dev" && <span className={styles.devTag}>dev</span>}+ {plugin.source === "dev" && (+ <span className={styles.devTag}>+ <T>dev</T>+ </span>+ )}{plugin.status === "failed" && (<Badge dot tone="danger"><T>Failed</T>@@ -149,7 +153,7 @@ function CatalogButton({ entry, compact }: { entry: CatalogPlugin; compact?: booconst installing = usePlugins((s) => s.installing);const state = catalogState(entry, plugins);if (state === "installed" || state === "dev") {- return <span className={styles.installedTag}>{state === "dev" ? "Dev plugin loaded" : "Installed"}</span>;+ return <span className={styles.installedTag}>{state === "dev" ? tx("Dev plugin loaded") : tx("Installed")}</span>;}const label = state === "update" ? "Update" : "Install";return (@@ -261,7 +265,7 @@ function InstalledDetails({ plugin }: { plugin: PluginInfo }) {<dt><T>Code</T></dt>- <dd>{plugin.hasCode ? "WebAssembly component (sandboxed)" : "None — contributions only"}</dd>+ <dd>{plugin.hasCode ? tx("WebAssembly component (sandboxed)") : tx("None — contributions only")}</dd>{plugin.homepage && (<><dt>@@ -300,7 +304,7 @@ function InstalledDetails({ plugin }: { plugin: PluginInfo }) {<li key={c.id} className={styles.item}><span className={styles.itemMain}>{c.title}</span><Kbd action={actionId} />- <span className={styles.mono} title="Action id (bind it in Keymap)">+ <span className={styles.mono} title={tx("Action id (bind it in Keymap)")}>{actionId}</span><Button@@ -328,7 +332,7 @@ function InstalledDetails({ plugin }: { plugin: PluginInfo }) {return (<li key={t.id} className={styles.item}><span className={styles.itemMain}>{t.name}</span>- <span className={styles.muted}>{t.kind === "dark" ? "Dark" : "Light"}</span>+ <span className={styles.muted}>{t.kind === "dark" ? tx("Dark") : tx("Light")}</span>{isActive ? (<Button size="small" variant="secondary" onClick={() => void selectPluginTheme(null, null)}><T>Use Default Theme</T>@@ -456,7 +460,7 @@ function CatalogDetails({ entry }: { entry: CatalogPlugin }) {<dt><T>Code</T></dt>- <dd>{entry.hasCode ? "WebAssembly component (sandboxed)" : "None — contributions only"}</dd>+ <dd>{entry.hasCode ? tx("WebAssembly component (sandboxed)") : tx("None — contributions only")}</dd>{contributes.length > 0 && (<><dt>@@ -602,7 +606,7 @@ export function PluginsPage() {aria-label="Filter plugins"/>{tab === "installed" ? (- <ul className={styles.list} aria-label="Installed plugins">+ <ul className={styles.list} aria-label={tx("Installed plugins")}>{downloaded.length > 0 && <ListHeader title="Downloaded" count={downloaded.length} />}{downloaded.map((p) => (<InstalledRow@@ -623,15 +627,15 @@ export function PluginsPage() {))}{loaded && shown.length === 0 && (<li className={styles.listEmpty}>- {plugins.length === 0 ? "No plugins installed." : "No plugins match."}+ {plugins.length === 0 ? tx("No plugins installed.") : tx("No plugins match.")}</li>)}</ul>) : (- <ul className={styles.list} aria-label="Available plugins">+ <ul className={styles.list} aria-label={tx("Available plugins")}><li className={styles.notice} role="note"><Icon name="info" size={14} />- <span>{NO_REPOSITORY}. Showing plugin packages available on this machine.</span>+ <span>{tx`${NO_REPOSITORY}. Showing plugin packages available on this machine.`}</span></li>{catalogShown.length > 0 && <ListHeader title="Local" count={catalogShown.length} />}{catalogShown.map((c) => (@@ -644,7 +648,7 @@ export function PluginsPage() {))}{catalog && catalogShown.length === 0 && (<li className={styles.listEmpty}>- {catalog.length === 0 ? "No local plugin packages." : "No plugins match."}+ {catalog.length === 0 ? tx("No local plugin packages.") : tx("No plugins match.")}</li>)}{catalogError && <li className={clsx(styles.listEmpty, styles.errorText)}>{catalogError}</li>}diff --git a/src/features/profiler/ProfilerView.tsx b/src/features/profiler/ProfilerView.tsxindex 84dd39905..03ac49494 100644--- a/src/features/profiler/ProfilerView.tsx+++ b/src/features/profiler/ProfilerView.tsx@@ -11,6 +11,7 @@ import { editorService } from "@/workbench/contributions";import { colorSlot, flameLayout, formatWeight, frameLocation, matchingFrames, share } from "./model";import { activeSnapshot, closeSnapshot, useProfiler, type ProfilerTab } from "./store";import styles from "./Profiler.module.css";+import { tx } from "@/platform/i18n";const ROW = 18;@@ -67,11 +68,11 @@ function FlameGraph({ profile, query }: { profile: Profile; query: string }) {{focus !== 0 && (<div className={styles.flameBar}><IconButton icon="close" size="small" title="Reset Zoom" onClick={() => setFocus(0)} />- <span className={styles.muted}>Zoomed into {profile.frames[profile.nodes[focus]!.frame]!.name}</span>+ <span className={styles.muted}>{tx`Zoomed into ${profile.frames[profile.nodes[focus]!.frame]!.name}`}</span></div>)}<div className={styles.flameScroll} ref={ref}>- <div className={styles.flame} style={{ height: layout.depth * ROW }} role="tree" aria-label="Flame graph">+ <div className={styles.flame} style={{ height: layout.depth * ROW }} role="tree" aria-label={tx("Flame graph")}>{width > 0 &&layout.rects.map((r) => {const node = profile.nodes[r.node]!;diff --git a/src/features/project-tree/FileRefactorDialogs.tsx b/src/features/project-tree/FileRefactorDialogs.tsxindex a05457274..16fbf2eb5 100644--- a/src/features/project-tree/FileRefactorDialogs.tsx+++ b/src/features/project-tree/FileRefactorDialogs.tsx@@ -20,6 +20,7 @@ import {} from "./paths";import { useProjectTree } from "./store";import styles from "./FileRefactor.module.css";+import { tx } from "@/platform/i18n";export type FileRefactorRequest =| {@@ -220,7 +221,9 @@ function RenameDialog({ request }: { request: Extract<FileRefactorRequest, { kin}}><label className={styles.fieldLabel} htmlFor="file-rename-name">- Rename {request.dir ? "directory" : "file"} '{current}' and its usages to:+ {request.dir+ ? tx`Rename directory '${current}' and its usages to:`+ : tx`Rename file '${current}' and its usages to:`}</label><Inputid="file-rename-name"@@ -307,7 +310,7 @@ function MoveDialog({ request }: { request: Extract<FileRefactorRequest, { kind:aria-label="Target directory"onChange={(e) => setTarget(e.target.value)}/>- <div className={styles.hint}>{relativeTo(root, dest) || (dest === root ? "Project root" : dest)}</div>+ <div className={styles.hint}>{relativeTo(root, dest) || (dest === root ? tx("Project root") : dest)}</div>{error && (<div className={styles.error} role="alert">{error}@@ -418,7 +421,7 @@ function CopyDialog({ request }: { request: Extract<FileRefactorRequest, { kind:aria-label="Target directory"onChange={(e) => setTarget(e.target.value)}/>- <div className={styles.hint}>{relativeTo(root, dest) || (dest === root ? "Project root" : dest)}</div>+ <div className={styles.hint}>{relativeTo(root, dest) || (dest === root ? tx("Project root") : dest)}</div>{error && (<div className={styles.error} role="alert">{error}diff --git a/src/features/project-tree/RefactoringPreview.tsx b/src/features/project-tree/RefactoringPreview.tsxindex 1fe2e8f27..65ef5afe7 100644--- a/src/features/project-tree/RefactoringPreview.tsx+++ b/src/features/project-tree/RefactoringPreview.tsx@@ -132,10 +132,9 @@ function PreviewDialog({ request }: { request: PreviewRequest }) {]}><div className={styles.previewSummary}>- References to update: {occurrences} {occurrences === 1 ? "occurrence" : "occurrences"} in {kept.length}{" "}- {kept.length === 1 ? "file" : "files"}+ {tx`References to update: ${occurrences === 1 ? tx`${occurrences} occurrence` : tx`${occurrences} occurrences`} in ${kept.length === 1 ? tx`${kept.length} file` : tx`${kept.length} files`}`}</div>- <ul className={styles.previewList} aria-label="Changes">+ <ul className={styles.previewList} aria-label={tx("Changes")}>{files.map((f) => (<FileGroupkey={f.path}diff --git a/src/features/run/ConfigChooser.tsx b/src/features/run/ConfigChooser.tsxindex 713e66819..becadcc4e 100644--- a/src/features/run/ConfigChooser.tsx+++ b/src/features/run/ConfigChooser.tsx@@ -238,7 +238,7 @@ function ConfigChooser() {return (<span className={clsx(styles.chooserRow, styles.chooserEdit)}><Icon name="check" size={13} />- <span>Save '{r.config.name}' Configuration</span>+ <span>{tx`Save '${r.config.name}' Configuration`}</span></span>);}@@ -277,9 +277,15 @@ function ConfigChooser() {{r.indices ? <HighlightedText text={c.name} indices={r.indices} /> : c.name}</span>{c.target && <span className={styles.chooserMuted}>@ {targetName(c, runTargets)}</span>}- {c.isTest && <span className={styles.badge}>test</span>}- {!c.detected && <span className={styles.chooserMuted}>user</span>}- {temporary.includes(c.id) && <span className={styles.chooserMuted}>temporary</span>}+ {c.isTest && <span className={styles.badge}>+ <T>test</T>+ </span>}+ {!c.detected && <span className={styles.chooserMuted}>+ <T>user</T>+ </span>}+ {temporary.includes(c.id) && <span className={styles.chooserMuted}>+ <T>temporary</T>+ </span>}{isActive && (<span className={styles.chooserActions}><IconButtondiff --git a/src/features/run/ConsoleView.tsx b/src/features/run/ConsoleView.tsxindex 358428bfd..0bac60623 100644--- a/src/features/run/ConsoleView.tsx+++ b/src/features/run/ConsoleView.tsx@@ -19,6 +19,7 @@ import { findOutputLinks, type OutputLink } from "./links";import { openTarget, openUrl } from "./navigate";import { segmentLine } from "./segments";import styles from "./Run.module.css";+import { tx } from "@/platform/i18n";const ROW = 20;@@ -248,12 +249,12 @@ export function ConsoleView({ model, version, softWrap, follow, onFollowChange,);const foldButton = (fold: Fold, attached: boolean) =>fold.expanded ? (- <button type="button" className={styles.foldToggle} title="Collapse folded lines" aria-label="Collapse folded lines" onClick={() => toggleFold(fold.id)}>+ <button type="button" className={styles.foldToggle} title={tx("Collapse folded lines")} aria-label={tx("Collapse folded lines")} onClick={() => toggleFold(fold.id)}><Icon name="chevron-up" size={10} /></button>) : (- <button type="button" className={styles.fold} title="Expand folded lines" onClick={() => toggleFold(fold.id)}>- {`${attached ? " " : ""}<${fold.count} internal line${fold.count === 1 ? "" : "s"}>`}+ <button type="button" className={styles.fold} title={tx("Expand folded lines")} onClick={() => toggleFold(fold.id)}>+ {`${attached ? " " : ""}${fold.count === 1 ? tx`<${fold.count} internal line>` : tx`<${fold.count} internal lines>`}`}</button>);diff --git a/src/features/run/EditConfigsDialog.tsx b/src/features/run/EditConfigsDialog.tsxindex d5befcfac..124d5aef6 100644--- a/src/features/run/EditConfigsDialog.tsx+++ b/src/features/run/EditConfigsDialog.tsx@@ -29,6 +29,7 @@ import { targetName } from "./remote";import { saveUserConfigs, selectConfig, useRun } from "./store";import { blankTemplate, COMPOUND, missingParams, newConfigOfType, templateId, typeFor } from "./types";import styles from "./Run.module.css";+import { tx } from "@/platform/i18n";export { envFromRows } from "./EnvDialog";@@ -364,7 +365,7 @@ function EditConfigsDialog() {<div className={styles.editSidebar}>{mode === "configs" ? (<>- <div className={styles.editToolbar} role="toolbar" aria-label="Configurations">+ <div className={styles.editToolbar} role="toolbar" aria-label={tx("Configurations")}><IconButtonref={addRef}icon="plus"@@ -420,7 +421,7 @@ function EditConfigsDialog() {onClick={() => move(1)}/></div>- <div className={styles.editList} role="tree" aria-label="Run configurations">+ <div className={styles.editList} role="tree" aria-label={tx("Run configurations")}>{rows.map((r) => {if (r.type === "group")return (@@ -522,7 +523,7 @@ function EditConfigsDialog() {<T>Templates</T></span></div>- <div className={styles.editList} role="listbox" aria-label="Configuration templates">+ <div className={styles.editList} role="listbox" aria-label={tx("Configuration templates")}>{templateTypes.map((t) => {const sel = selection?.type === "template" && selection.kind === t.id;return (diff --git a/src/features/run/RunView.tsx b/src/features/run/RunView.tsxindex a0610ff9c..f45f471aa 100644--- a/src/features/run/RunView.tsx+++ b/src/features/run/RunView.tsx@@ -69,7 +69,7 @@ function SessionPanel({ session }: { session: RunSession }) {const consoleColumn = (<div className={styles.consoleColumn}>{rt.console.dropped > 0 && !testModel && (- <div className={styles.notice}>{rt.console.dropped.toLocaleString()} earlier lines were discarded</div>+ <div className={styles.notice}>{tx`${rt.console.dropped.toLocaleString()} earlier lines were discarded`}</div>)}{testModel && (<div className={styles.notice}>@@ -113,7 +113,7 @@ function SessionPanel({ session }: { session: RunSession }) {return (<div className={styles.session}>- <div className={styles.toolbar} role="toolbar" aria-orientation="vertical" aria-label="Run actions">+ <div className={styles.toolbar} role="toolbar" aria-orientation="vertical" aria-label={tx("Run actions")}><IconButtonicon="rerun"iconSize={14}diff --git a/src/features/run/TestTreeView.tsx b/src/features/run/TestTreeView.tsxindex 71aafa6ce..c17616476 100644--- a/src/features/run/TestTreeView.tsx+++ b/src/features/run/TestTreeView.tsx@@ -179,10 +179,10 @@ export function TestTreeView({ results, version, cwd, selected, onSelect, runnin<div className={styles.testHeader}><StatusIcon status={status} /><span className={styles.testCounts}>- {counts.failed > 0 && <span className={styles.failed}>{counts.failed} failed</span>}- {counts.passed > 0 && <span>{counts.passed} passed</span>}- {counts.skipped > 0 && <span className={styles.skipped}>{counts.skipped} ignored</span>}- {counts.total === 0 && <span className={styles.skipped}>{running ? "Running…" : "No tests"}</span>}+ {counts.failed > 0 && <span className={styles.failed}>{tx`${counts.failed} failing`}</span>}+ {counts.passed > 0 && <span>{tx`${counts.passed} passed`}</span>}+ {counts.skipped > 0 && <span className={styles.skipped}>{tx`${counts.skipped} ignored`}</span>}+ {counts.total === 0 && <span className={styles.skipped}>{running ? tx("Running…") : tx("No tests")}</span>}{duration !== undefined && <span className={styles.skipped}>{formatDuration(duration)}</span>}</span><span className={styles.spacer} />@@ -235,7 +235,7 @@ export function TestTreeView({ results, version, cwd, selected, onSelect, runnin}}empty={<div className={styles.testEmpty}>- {running ? "Waiting for test results…" : results.isEmpty ? "No test results" : "Passed tests are hidden"}+ {running ? tx("Waiting for test results…") : results.isEmpty ? tx("No test results") : tx("Passed tests are hidden")}</div>}/>diff --git a/src/features/search/bookmarks/BookmarksView.tsx b/src/features/search/bookmarks/BookmarksView.tsxindex 393e5856f..74a7dfa02 100644--- a/src/features/search/bookmarks/BookmarksView.tsx+++ b/src/features/search/bookmarks/BookmarksView.tsx@@ -186,7 +186,7 @@ export function BookmarksView() {if (!items.length && !paths.length && lists.length === 1) {return (<EmptyState>- No bookmarks yet. Toggle a line bookmark with {shortcutLabel("navigate.toggleBookmark") ?? "F3"}+ {tx`No bookmarks yet. Toggle a line bookmark with ${shortcutLabel("navigate.toggleBookmark") ?? "F3"}`}</EmptyState>);}diff --git a/src/features/search/find/FindInFiles.tsx b/src/features/search/find/FindInFiles.tsxindex d1767ec72..5fd36f918 100644--- a/src/features/search/find/FindInFiles.tsx+++ b/src/features/search/find/FindInFiles.tsx@@ -3,7 +3,7 @@ import clsx from "clsx";import { openEditorPaths, useEditorRegistry } from "@/editor/api";import { executeAction } from "@/platform/actions";import { setContext } from "@/platform/context";-import { useTxTemplate } from "@/platform/i18n";+import { useTxTemplate, tx } from "@/platform/i18n";import { call, commands, type SearchScope } from "@/platform/ipc";import { useProject } from "@/platform/project";import { useProjectModules } from "@/platform/projectRoots";@@ -477,7 +477,7 @@ function FindInFilesDialog() {><div className={styles.root} onKeyDown={onKeyDown}><header className={styles.header}>- <span className={styles.title}>{s.replace ? "Replace in Files" : "Find in Files"}</span>+ <span className={styles.title}>{s.replace ? tx("Replace in Files") : tx("Find in Files")}</span><span className={styles.status} aria-live="polite">{state.status === "searching" || state.status === "validating" ? <Spinner size={12} /> : null}{summary}@@ -490,7 +490,7 @@ function FindInFilesDialog() {className={styles.maskInput}value={s.mask}placeholder="*.kt, !*Test*"- aria-label="File mask"+ aria-label={tx("File mask")}spellCheck={false}onChange={(e) => set({ mask: e.target.value, maskEnabled: true })}onBlur={() => s.maskEnabled && rememberMask(s.mask)}@@ -604,8 +604,8 @@ function FindInFilesDialog() {<inputclassName={styles.dirInput}value={displayDirectory(s.directory, root)}- placeholder="Directory (relative to project root)"- aria-label="Directory"+ placeholder={tx("Directory (relative to project root)")}+ aria-label={tx("Directory")}spellCheck={false}// Keep the raw text (resolved only when searching), or a typed "/" would be stripped.onChange={(e) => set({ directory: e.target.value })}@@ -746,7 +746,7 @@ function FindInFilesDialog() {<span className={styles.spacer} />{s.replace && progress && (<span className={styles.hint} aria-live="polite">- Replacing… {progress.done}/{progress.total} files+ {tx`Replacing… ${progress.done}/${progress.total} files`}</span>)}{s.replace && running && (diff --git a/src/features/search/find/FindToolWindow.tsx b/src/features/search/find/FindToolWindow.tsxindex 997b14ff4..cfb386fea 100644--- a/src/features/search/find/FindToolWindow.tsx+++ b/src/features/search/find/FindToolWindow.tsx@@ -52,6 +52,7 @@ import {type FindTab,} from "./windowStore";import styles from "./FindToolWindow.module.css";+import { tx } from "@/platform/i18n";type Node =| { kind: "dir"; key: string; label: string; count: number; children: Node[] }@@ -199,7 +200,7 @@ export function FindToolWindow() {if (!tab) {return (<EmptyState title="No search results" icon="search">- Use Find in Files ({shortcutLabel("find.inPath") ?? "⇧⌘F"}) and choose “Open in Find Window”.+ {tx`Use Find in Files (${shortcutLabel("find.inPath") ?? "⇧⌘F"}) and choose “Open in Find Window”.`}</EmptyState>);}@@ -367,12 +368,11 @@ function FindTabView({ tab }: { tab: FindTab }) {<span className={styles.title}>{tab.title}</span><span className={styles.count}>{st.status === "invalid" || st.status === "error"- ? (st.error ?? "Search failed")+ ? (st.error ?? tx("Search failed")): progress- ? `Replacing… ${progress.done}/${progress.total} files`- : `${st.matchCount}${st.summary?.limitHit ? "+" : ""} matches in ${st.files.length} files${- marks.excluded.size ? ` · ${marks.excluded.size} excluded` : ""- }`}+ ? tx`Replacing… ${progress.done}/${progress.total} files`+ : tx`${`${st.matchCount}${st.summary?.limitHit ? "+" : ""}`} matches in ${st.files.length} files` ++ (marks.excluded.size ? ` · ${tx`${marks.excluded.size} excluded`}` : "")}</span><span className={styles.spacer} /><Button size="small" variant="ghost" disabled={!selection.size} onClick={exclude} title="Exclude / include (⌫)">diff --git a/src/features/search/find/parts.tsx b/src/features/search/find/parts.tsxindex 961a399f6..6c8d02af3 100644--- a/src/features/search/find/parts.tsx+++ b/src/features/search/find/parts.tsx@@ -9,6 +9,7 @@ import { loadPreviewText } from "./preview";import type { PreviewLine } from "./replaceFlow";import styles from "./parts.module.css";import { T } from "@/ui";+import { tx } from "@/platform/i18n";/** A result line with matches highlighted; in replace mode shows `old → new` inline. */export function MatchText({@@ -169,7 +170,7 @@ export function CodePreview({const placeholder = !path ? <T>Select a result to preview</T> : error && !current ? error : null;return (- <div className={styles.preview} role="region" aria-label="Preview">+ <div className={styles.preview} role="region" aria-label={tx("Preview")}><div ref={hostRef} className={clsx(styles.previewEditor, (!current || placeholder) && styles.previewHidden)} />{placeholder && <div className={styles.previewEmpty}>{placeholder}</div>}</div>@@ -189,7 +190,7 @@ export function ReplaceDiffPreview({ lines, line }: { lines: readonly PreviewLinconst from = Math.max(0, focus - WINDOW);const shown = lines.slice(from, Math.max(focus, 0) + WINDOW);return (- <div ref={scrollRef} className={styles.preview} role="region" aria-label="Replace preview">+ <div ref={scrollRef} className={styles.preview} role="region" aria-label={tx("Replace preview")}><pre className={styles.pre}>{shown.map((l, i) => (<divdiff --git a/src/features/search/recent/RecentPopups.tsx b/src/features/search/recent/RecentPopups.tsxindex eca5013a8..4a7d88f28 100644--- a/src/features/search/recent/RecentPopups.tsx+++ b/src/features/search/recent/RecentPopups.tsx@@ -33,6 +33,7 @@ import {} from "./model";import { cycleSwitcher, hideRecentPopup, showRecentPopup, useRecentPopup } from "./store";import styles from "./RecentPopups.module.css";+import { tx } from "@/platform/i18n";export function RecentPopupsOverlay() {const open = useRecentPopup((s) => s.open);@@ -233,7 +234,7 @@ function RecentFilesDialog() {value={query}spellCheck={false}autoComplete="off"- aria-label="Filter recent files"+ aria-label={tx("Filter recent files")}onChange={(e) => {setQuery(e.target.value);setFileIndex(null);@@ -248,7 +249,7 @@ function RecentFilesDialog() {showRecentPopup("files");inputRef.current?.focus();}}- label={<>Show edited only {recentShortcut && <span className={styles.hint}>{recentShortcut}</span>}</>}+ label={<><T>Show edited only</T> {recentShortcut && <span className={styles.hint}>{recentShortcut}</span>}</>}/></>)}@@ -304,12 +305,12 @@ function RecentFilesDialog() {paths && (<span>{switcher- ? "No open files"+ ? tx("No open files"): editedOnly- ? "No edited files"+ ? tx("No edited files"): query- ? "No matching files"- : "No recent files"}+ ? tx("No matching files")+ : tx("No recent files")}</span>)}@@ -506,7 +507,7 @@ function RecentLocationsDialog() {return (<Dialog open onClose={hideRecentPopup} width={720} aria-label="Recent Locations" className={styles.dialog}><header className={styles.header}>- <span className={styles.title}>{changedOnly ? "Recently Changed Locations" : "Recent Locations"}</span>+ <span className={styles.title}>{changedOnly ? tx("Recently Changed Locations") : tx("Recent Locations")}</span><span className={clsx(styles.speed, styles.speedWide, query && styles.speedActive)}><Icon name="search" size={14} className={styles.filterIcon} /><input@@ -514,10 +515,10 @@ function RecentLocationsDialog() {data-autofocusclassName={styles.filter}value={query}- placeholder="Type to filter by file name or code"+ placeholder={tx("Type to filter by file name or code")}spellCheck={false}autoComplete="off"- aria-label="Filter recent locations"+ aria-label={tx("Filter recent locations")}onChange={(e) => {setQuery(e.target.value);setIndex(0);@@ -552,7 +553,7 @@ function RecentLocationsDialog() {focusable={false}rowHeight={LOCATION_ROW}aria-label="Recent locations"- empty={<span>{changedOnly ? "No changed locations" : "No recent locations"}</span>}+ empty={<span>{changedOnly ? tx("No changed locations") : tx("No recent locations")}</span>}renderItem={(l) => (<div className={styles.location}><div className={styles.locationHeader}>@@ -564,7 +565,9 @@ function RecentLocationsDialog() {tone="strong"/><span className={styles.dir}>{breadcrumbOf(outlines.get(l.path), l) || l.rel}</span>- {l.changed && <span className={styles.changed}>changed</span>}+ {l.changed && <span className={styles.changed}>+ <T>changed</T>+ </span>}<span className={styles.time}>{locationTime(l.time, now)}</span></div><SnippetCode path={l.path} lines={dedent(l.snippet)} first={l.snippetStart} caret={l.line} />diff --git a/src/features/search/structure/StructureView.tsx b/src/features/search/structure/StructureView.tsxindex 9c444448d..56445025e 100644--- a/src/features/search/structure/StructureView.tsx+++ b/src/features/search/structure/StructureView.tsx@@ -36,6 +36,7 @@ import {} from "./outline";import { useLiveOutline, useOutline, useStructureOptions } from "./store";import styles from "./StructureView.module.css";+import { tx } from "@/platform/i18n";function useOutlineNodes() {const items = useOutline((s) => s.items);@@ -228,7 +229,7 @@ function StructureToolbar() {const narrowed = useStructureOptions((s) => !s.showFields || !s.showNonPublic || s.sortByVisibility);const hasOptions = viewOptionItems(items ?? []).length > 0;return (- <div className={styles.toolbar} role="toolbar" aria-label="Structure actions">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Structure actions")}><IconButtonicon="sort"title="Sort Alphabetically"@@ -417,7 +418,7 @@ function FileStructureDialog() {aria-label="File Structure"title={<span className={styles.popupTitle}>- {path ? basename(path) : "File Structure"}+ {path ? basename(path) : tx("File Structure")}<span className={styles.popupHint}>{shortcutLabel("navigate.fileStructure")}</span></span>}@@ -428,7 +429,7 @@ function FileStructureDialog() {className={styles.filter}value={query}placeholder={path ? "Type to filter symbols" : "No active editor"}- aria-label="Filter symbols"+ aria-label={tx("Filter symbols")}spellCheck={false}autoComplete="off"onChange={(e) => {@@ -490,7 +491,7 @@ function FileStructureDialog() {onActivate={(n) => choose(n)}rowHeight={POPUP_ROW}indent={16}- empty={<span className={styles.popupEmpty}>{!path ? "Open a file first" : loading && !items ? "Loading…" : "No symbols"}</span>}+ empty={<span className={styles.popupEmpty}>{!path ? tx("Open a file first") : loading && !items ? "Loading…" : "No symbols"}</span>}renderNode={(n, s) => {const matched = filter.matches.get(n.key);return <SymbolRow node={n} indices={matched} selected={s.selected} dim={!!query.trim() && !matched} />;diff --git a/src/features/services/ServicesTree.tsx b/src/features/services/ServicesTree.tsxindex 0765a23cc..615bc4fbc 100644--- a/src/features/services/ServicesTree.tsx+++ b/src/features/services/ServicesTree.tsx@@ -6,7 +6,7 @@import { useEffect, useMemo, useRef } from "react";import clsx from "clsx";import { setContext } from "@/platform/context";-import { useTxTemplate } from "@/platform/i18n";+import { useTxTemplate, tx } from "@/platform/i18n";import { shortcutLabel } from "@/platform/keymap";import {EmptyState,@@ -93,7 +93,7 @@ export function ServicesTreeView() {{providers.map((p) => (<ProviderRoots key={p.id} provider={p} />))}- <div className={styles.toolbar} role="toolbar" aria-label="Services actions">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Services actions")}><IconButtonref={addRef}data-services-adddiff --git a/src/features/services/docker.tsx b/src/features/services/docker.tsxindex 55277aa17..8d6dca472 100644--- a/src/features/services/docker.tsx+++ b/src/features/services/docker.tsx@@ -250,8 +250,9 @@ function Unavailable({ availability, conn }: { availability: DockerAvailability;><div>{availability.message}</div><div className={styles.hint}>- Start Docker{availability.context ? ` (context '${availability.context}')` : ""}; this view connects- automatically.+ {availability.context+ ? tx`Start Docker (context '${availability.context}'); this view connects automatically.`+ : tx`Start Docker; this view connects automatically.`}</div></EmptyState>);diff --git a/src/features/settings/components/Form.tsx b/src/features/settings/components/Form.tsxindex 98c91225c..e8ac1c825 100644--- a/src/features/settings/components/Form.tsx+++ b/src/features/settings/components/Form.tsx@@ -225,7 +225,7 @@ export function ColorSwatches({ value, presets, onChange, allowCustom = true, ..<><labelclassName={clsx(styles.swatch, styles.custom, !isPreset && styles.swatchOn)}- title="Custom colour"+ title={tx("Custom colour")}aria-checked={!isPreset}role="radio">@@ -233,7 +233,7 @@ export function ColorSwatches({ value, presets, onChange, allowCustom = true, ..<inputtype="color"className={styles.colorNative}- aria-label="Custom colour"+ aria-label={tx("Custom colour")}value={HEX_COLOR.test(value) && value.length === 7 ? value : "#808080"}onChange={(e) => onChange(e.target.value)}/>diff --git a/src/features/settings/dialog/SettingsDialog.tsx b/src/features/settings/dialog/SettingsDialog.tsxindex 233977a09..a7da54d08 100644--- a/src/features/settings/dialog/SettingsDialog.tsx+++ b/src/features/settings/dialog/SettingsDialog.tsx@@ -350,7 +350,7 @@ function SettingsStatus() {<span className={styles.footerStatus} role="status">{error && (<span className={styles.error}>- <Icon name="error" size={14} /> Could not save: {error}+ <Icon name="error" size={14} /> {tx`Could not save: ${error}`}</span>)}</span>diff --git a/src/features/settings/keymap/KeymapPage.tsx b/src/features/settings/keymap/KeymapPage.tsxindex c1be71848..6274b9391 100644--- a/src/features/settings/keymap/KeymapPage.tsx+++ b/src/features/settings/keymap/KeymapPage.tsx@@ -295,7 +295,7 @@ export function KeymapPage() {<span className={styles.spacer} />{overrideCount > 0 && (<span className={styles.modifiedNote}>- {overrideCount} modified {overrideCount === 1 ? "action" : "actions"}+ {overrideCount === 1 ? tx`${overrideCount} modified action` : tx`${overrideCount} modified actions`}</span>)}</div>diff --git a/src/features/settings/languages/AddInterpreterDialog.tsx b/src/features/settings/languages/AddInterpreterDialog.tsxindex cfd9914af..cfa4148a0 100644--- a/src/features/settings/languages/AddInterpreterDialog.tsx+++ b/src/features/settings/languages/AddInterpreterDialog.tsx@@ -8,6 +8,7 @@ import { Dialog, IconButton, Input, Select, Spinner, type SelectOption, T } fromimport { choosePath, createVenv, rememberSdk } from "./api";import { tildify, useDetected } from "./components";import styles from "./Sdk.module.css";+import { tx } from "@/platform/i18n";type Mode = "new" | "existing";@@ -80,7 +81,7 @@ export function AddInterpreterDialog({]}><div className={styles.dialogBody}>- <ul className={styles.kinds} aria-label="Interpreter type">+ <ul className={styles.kinds} aria-label={tx("Interpreter type")}><li><button type="button" className={`${styles.kind} ${styles.kindOn}`} aria-current="true"><T>Virtualenv Environment</T>@@ -88,14 +89,14 @@ export function AddInterpreterDialog({</li></ul><div className={styles.form}>- <div className={styles.radios} role="radiogroup" aria-label="Environment">+ <div className={styles.radios} role="radiogroup" aria-label={tx("Environment")}><label className={styles.radio}><input type="radio" name="env" checked={mode === "new"} onChange={() => setMode("new")} />{" "}<T>New environment</T></label><label className={styles.radio}><input type="radio" name="env" checked={mode === "existing"} onChange={() => setMode("existing")} />{" "}- Existing environment+ <T>Existing environment</T></label></div>{mode === "new" ? (@@ -143,7 +144,7 @@ export function AddInterpreterDialog({/></div><div className={styles.note}>- Runs “<base> -m venv <location>”; the new interpreter becomes the project interpreter.+ {tx("Runs “<base> -m venv <location>”; the new interpreter becomes the project interpreter.")}</div></>) : (diff --git a/src/features/settings/languages/DownloadJdkDialog.tsx b/src/features/settings/languages/DownloadJdkDialog.tsxindex c01628a72..4155fcc26 100644--- a/src/features/settings/languages/DownloadJdkDialog.tsx+++ b/src/features/settings/languages/DownloadJdkDialog.tsx@@ -8,6 +8,7 @@ import { downloadJdk, TEMURIN, type JdkDownload } from "@/platform/jdk";import { Dialog, IconButton, Input, ProgressBar, Select, type SelectOption, T } from "@/ui";import { choosePath, rememberSdk } from "./api";import styles from "./Sdk.module.css";+import { tx } from "@/platform/i18n";const errorText = (e: unknown) => (e instanceof Error ? e.message : String(e));@@ -148,8 +149,7 @@ export function DownloadJdkDialog({</div></div><div className={styles.note}>- {vendorName} {version ?? ""} is unpacked into a folder of its own in {location || "…"}, where JDK detection- finds it.+ {tx`${vendorName} ${version ?? ""} is unpacked into a folder of its own in ${location || "…"}, where JDK detection finds it.`}</div>{progress && (<div className={styles.downloadProgress}>diff --git a/src/features/settings/languages/ProjectStructurePage.tsx b/src/features/settings/languages/ProjectStructurePage.tsxindex 58f1745b6..e637de0ea 100644--- a/src/features/settings/languages/ProjectStructurePage.tsx+++ b/src/features/settings/languages/ProjectStructurePage.tsx@@ -236,7 +236,7 @@ export function ProjectStructurePage() {<div className={styles.page}><div className={styles.structure}><div className={styles.structureTree}>- <div className={styles.markBar} role="toolbar" aria-label="Mark as">+ <div className={styles.markBar} role="toolbar" aria-label={tx("Mark as")}><span><T>Mark as:</T></span>@@ -279,7 +279,7 @@ export function ProjectStructurePage() {</div><ExcludeFiles /></div>- <div className={styles.roots} aria-label="Marked folders">+ <div className={styles.roots} aria-label={tx("Marked folders")}><ContentRoots root={rootNode.path} />{ROLES.map((r) => {const list = roots.filter((x) => x.kind === r.role);@@ -300,7 +300,9 @@ export function ProjectStructurePage() {<div key={x.path} className={styles.rootItem}><span className={styles.rootPath} title={x.path || root || undefined}>{shown}- {x.detectedFrom && <span className={styles.rootHint}> detected from {x.detectedFrom}</span>}+ {x.detectedFrom && (+ <span className={styles.rootHint}> {tx`detected from ${x.detectedFrom}`}</span>+ )}</span><IconButtonicon="close"@@ -318,8 +320,8 @@ export function ProjectStructurePage() {{unmarkedDetected.length > 0 && (<div className={styles.note}>{unmarkedDetected.length === 1- ? "1 detected folder is unmarked."- : `${unmarkedDetected.length} detected folders are unmarked.`}{" "}+ ? tx("1 detected folder is unmarked.")+ : tx`${unmarkedDetected.length} detected folders are unmarked.`}{" "}<button type="button" className={styles.linkButton} onClick={restore}><T>Restore detected roots</T></button>diff --git a/src/features/settings/languages/PythonInterpreterPage.tsx b/src/features/settings/languages/PythonInterpreterPage.tsxindex 0c11c443a..c2960b17b 100644--- a/src/features/settings/languages/PythonInterpreterPage.tsx+++ b/src/features/settings/languages/PythonInterpreterPage.tsx@@ -15,6 +15,7 @@ import { AddInterpreterDialog } from "./AddInterpreterDialog";import { useSetting } from "../components/context";import { SdkField, tildify } from "./components";import styles from "./Sdk.module.css";+import { tx } from "@/platform/i18n";type Op = "install" | "upgrade" | "uninstall";@@ -167,7 +168,7 @@ export function PythonInterpreterPage() {)}<div className={styles.tablePanel}>- <div className={styles.tableToolbar} role="toolbar" aria-label="Packages">+ <div className={styles.tableToolbar} role="toolbar" aria-label={tx("Packages")}><IconButtonicon="plus"size="small"@@ -235,7 +236,7 @@ export function PythonInterpreterPage() {</form>)}<div className={styles.tableScroll}>- <table className={styles.table} aria-label="Installed packages">+ <table className={styles.table} aria-label={tx("Installed packages")}><thead><tr><th scope="col">@@ -274,7 +275,7 @@ export function PythonInterpreterPage() {</div>)}{python && !error && packages && shown.length === 0 && (- <div className={styles.empty}>{query ? "No packages match" : "No packages installed"}</div>+ <div className={styles.empty}>{query ? tx("No packages match") : tx("No packages installed")}</div>)}{python && !error && !packages && loading && (<div className={styles.empty}>@@ -288,7 +289,8 @@ export function PythonInterpreterPage() {<div className={styles.status}><Spinner size={14} label="Working" /><span>- {job.op === "install" ? "Installing" : job.op === "upgrade" ? "Upgrading" : "Uninstalling"} {job.target}…+ {job.op === "install" ? tx("Installing") : job.op === "upgrade" ? tx("Upgrading") : tx("Uninstalling")}{" "}+ {job.target}…</span><Button size="small" variant="ghost" onClick={job.cancel}><T>Cancel</T>@@ -301,7 +303,7 @@ export function PythonInterpreterPage() {</div>)}{log.length > 0 && (- <pre className={styles.log} aria-label="pip output">+ <pre className={styles.log} aria-label={tx("pip output")}>{log.join("\n")}</pre>)}diff --git a/src/features/settings/pages/FileTypes.tsx b/src/features/settings/pages/FileTypes.tsxindex ebf4bee05..d96cff7cc 100644--- a/src/features/settings/pages/FileTypes.tsx+++ b/src/features/settings/pages/FileTypes.tsx@@ -82,7 +82,7 @@ export function RecognizedFileTypes() {aria-label="Filter file types"onChange={(e) => setFilter(e.target.value)}/>- <div className={styles.typeList} role="listbox" aria-label="Recognized file types">+ <div className={styles.typeList} role="listbox" aria-label={tx("Recognized file types")}>{shown.map((l) => {const sample = sampleFileName(l);return (@@ -96,7 +96,11 @@ export function RecognizedFileTypes() {><Icon name={sample ? fileIconName(sample) : "file-text"} size={16} /><span className={styles.typeName}>{l.name}</span>- {current[l.id] && <span className={styles.modified}>modified</span>}+ {current[l.id] && (+ <span className={styles.modified}>+ <T>modified</T>+ </span>+ )}</button>);})}diff --git a/src/features/settings/pages/behavior.tsx b/src/features/settings/pages/behavior.tsxindex 5afe55657..23028de3c 100644--- a/src/features/settings/pages/behavior.tsx+++ b/src/features/settings/pages/behavior.tsx@@ -306,7 +306,7 @@ function OpenProjectInRow() {const name = useId();return (<Row label="Open project in">- <div className={styles.radios} role="radiogroup" aria-label="Open project in">+ <div className={styles.radios} role="radiogroup" aria-label={tx("Open project in")}>{OPEN_IN.map((o) => (<label key={o.value} className={styles.radio}><input type="radio" name={name} checked={value === o.value} onChange={() => set(o.value)} />@@ -365,7 +365,9 @@ function IdleSaveRow() {<div className={clsx(styles.fontRow, matched && styles.matched)}><Checkbox checked={on} onChange={setOn} label={<SearchLabel text="Save files if the IDE is idle for" />} /><NumberInput value={seconds} onChange={setSeconds} {...IDLE_LIMITS} integer aria-label="Idle seconds" />- <span className={clsx(!on && styles.disabled)}>seconds</span>+ <span className={clsx(!on && styles.disabled)}>+ <T>seconds</T>+ </span></div>);}@@ -438,7 +440,7 @@ function NotificationGroupsTable() {setGroups(all);};return (- <table className={styles.table} aria-label="Notification groups">+ <table className={styles.table} aria-label={tx("Notification groups")}><thead><tr><th>diff --git a/src/features/settings/pages/deployment.tsx b/src/features/settings/pages/deployment.tsxindex e9b2267cd..024180060 100644--- a/src/features/settings/pages/deployment.tsx+++ b/src/features/settings/pages/deployment.tsx@@ -6,7 +6,7 @@import { useEffect, useId, useState, type KeyboardEvent } from "react";import clsx from "clsx";import { call, commands, IpcError, type RemoteEntry } from "@/platform/ipc";-import { useTx } from "@/platform/i18n";+import { useTx, tx } from "@/platform/i18n";import type { DeploymentServerValid } from "@/platform/remoteSettings";import { Badge, Button, Checkbox, Dialog, Icon, IconButton, Input, Spinner, T, Tabs } from "@/ui";import { GlobListEditor, Row } from "../components/Form";@@ -198,7 +198,7 @@ function RemoteFolderDialog({<ulclassName={styles.folderList}role="listbox"- aria-label="Remote folders"+ aria-label={tx("Remote folders")}tabIndex={0}onKeyDown={onListKey}>@@ -369,7 +369,7 @@ function MappingsTab({return (<div className={styles.panel}><div className={workflow.tableBox}>- <div className={workflow.toolbar} role="toolbar" aria-label="Mappings actions">+ <div className={workflow.toolbar} role="toolbar" aria-label={tx("Mappings actions")}><IconButtonicon="plus"title="Add"@@ -391,7 +391,7 @@ function MappingsTab({}}/></div>- <table className={styles.mappingTable} aria-label="Mappings">+ <table className={styles.mappingTable} aria-label={tx("Mappings")}><thead><tr>{MAPPING_COLUMNS.map((c) => (@@ -505,7 +505,7 @@ function DeploymentServersEditor() {return (<div className={styles.layout}><div className={workflow.tableBox}>- <div className={workflow.toolbar} role="toolbar" aria-label="Deployment servers actions">+ <div className={workflow.toolbar} role="toolbar" aria-label={tx("Deployment servers actions")}><IconButton icon="plus" title="Add" size="small" onClick={() => add()} /><IconButton icon="minus" title="Remove" size="small" disabled={!current} onClick={remove} /><IconButton@@ -523,7 +523,7 @@ function DeploymentServersEditor() {onClick={() => current && setDefaultServer(current.id)}/></div>- <div className={styles.serverList} role="listbox" aria-label="Deployment servers">+ <div className={styles.serverList} role="listbox" aria-label={tx("Deployment servers")}>{list.length === 0 && (<div className={styles.empty}><T>No servers. Click + to add one.</T>diff --git a/src/features/settings/pages/editor/codeStyle.tsx b/src/features/settings/pages/editor/codeStyle.tsxindex af2b8c417..a67039b92 100644--- a/src/features/settings/pages/editor/codeStyle.tsx+++ b/src/features/settings/pages/editor/codeStyle.tsx@@ -17,6 +17,7 @@ import type { PageSpec } from "../spec";import { CODE_STYLE_SCOPE, CodeStyleMain, SchemeRow, formatterLabels } from "./codeStyleScheme";import { editorPage, sectionLabels, type EditorSection } from "./kit";import styles from "./Editor.module.css";+import { tx } from "@/platform/i18n";function VisualGuidesRow() {const [guides, setGuides] = useSetting<number[]>("editor.codeStyle.visualGuides");@@ -44,7 +45,9 @@ function VisualGuidesRow() {}}onBlur={() => setDraft(null)}/>- <span className={styles.suffix}>columns</span>+ <span className={styles.suffix}>+ <T>columns</T>+ </span></Row>);}@@ -155,7 +158,7 @@ function LanguageStyle({ lang }: { lang: LanguageInfo }) {return (<div className={styles.page}><SchemeRow />- <section aria-label="Tabs and Indents">+ <section aria-label={tx("Tabs and Indents")}><div className={styles.previewTitle}><T>Tabs and Indents</T></div>@@ -183,7 +186,7 @@ function LanguageStyle({ lang }: { lang: LanguageInfo }) {/></Row></section>- <section aria-label="Wrapping">+ <section aria-label={tx("Wrapping")}><div className={styles.previewTitle}><T>Wrapping</T></div>@@ -200,7 +203,7 @@ function LanguageStyle({ lang }: { lang: LanguageInfo }) {</Row></section>{lang.lineComment && (- <section aria-label="Comment Code">+ <section aria-label={tx("Comment Code")}><div className={styles.previewTitle}><T>Comment Code</T></div>@@ -225,7 +228,9 @@ function LanguageStyle({ lang }: { lang: LanguageInfo }) {<T>Reset to Language Defaults</T></Button><span className={styles.inherited}>- Defaults from the {lang.name} language definition: {base.useTab ? "tab" : `${base.tabSize} spaces`}.+ {base.useTab+ ? tx`Defaults from the ${lang.name} language definition: tab.`+ : tx`Defaults from the ${lang.name} language definition: ${base.tabSize} spaces.`}</span></div></div>diff --git a/src/features/settings/pages/editor/codeStyleScheme.tsx b/src/features/settings/pages/editor/codeStyleScheme.tsxindex e142efbbc..30f1ebc7a 100644--- a/src/features/settings/pages/editor/codeStyleScheme.tsx+++ b/src/features/settings/pages/editor/codeStyleScheme.tsx@@ -13,6 +13,7 @@ import { usePageContext, useSetting } from "../../components/context";import { setPageScope, stage, stagedValue, useSettingsDialog, type Scope } from "../../model/staging";import { EditorSections, sectionLabels, type EditorSection } from "./kit";import styles from "./CodeStyle.module.css";+import { tx } from "@/platform/i18n";export const CODE_STYLE_SCOPE = "editor.codeStyle";@@ -125,7 +126,7 @@ export function CodeStyleMain({ general }: { general: EditorSection[] }) {return (<div className={styles.page}><SchemeRow />- <div className={styles.tabs} role="tablist" aria-label="Code Style">+ <div className={styles.tabs} role="tablist" aria-label={tx("Code Style")}>{tabs.map(([id, label]) => (<buttonkey={id}diff --git a/src/features/settings/pages/editor/colorScheme.tsx b/src/features/settings/pages/editor/colorScheme.tsxindex b6f10a663..6b0557aee 100644--- a/src/features/settings/pages/editor/colorScheme.tsx+++ b/src/features/settings/pages/editor/colorScheme.tsx@@ -306,7 +306,9 @@ function ColorSchemePage() {<T>Restore Defaults</T></Button></div>- {scheme === "theme-default" && <div className={styles.note}>Follows the IDE theme: currently {schemeName}.</div>}+ {scheme === "theme-default" && (+ <div className={styles.note}>{tx`Follows the IDE theme: currently ${schemeName}.`}</div>+ )}<div className={styles.schemeBody}><div className={styles.attrTree}><Tree<Node>@@ -335,7 +337,7 @@ function ColorSchemePage() {<div />)}</div>- <pre className={styles.schemePreview} style={vars} aria-label="Color scheme preview">+ <pre className={styles.schemePreview} style={vars} aria-label={tx("Color scheme preview")}>{SAMPLE.map((line, i) => (<div key={i} className={`${styles.previewLine} ${i === 6 ? styles.previewCaretLine : ""}`}><span className={styles.previewGutter}>{i + 1}</span>diff --git a/src/features/settings/pages/editor/font.tsx b/src/features/settings/pages/editor/font.tsxindex 73391f4a3..b94543679 100644--- a/src/features/settings/pages/editor/font.tsx+++ b/src/features/settings/pages/editor/font.tsx@@ -209,7 +209,7 @@ function Preview() {</div><textareaclassName={styles.previewArea}- aria-label="Font preview"+ aria-label={tx("Font preview")}spellCheck={false}value={text}onChange={(e) => setText(e.target.value)}diff --git a/src/features/settings/pages/editor/general.tsx b/src/features/settings/pages/editor/general.tsxindex 0e512f186..7278f102e 100644--- a/src/features/settings/pages/editor/general.tsx+++ b/src/features/settings/pages/editor/general.tsx@@ -13,6 +13,7 @@ import { SearchLabel, Select } from "../../components/Form";import { useLabelMatch, useSetting } from "../../components/context";import { editorPage, type Item } from "./kit";import styles from "./Editor.module.css";+import { tx } from "@/platform/i18n";const P = "editor";const ms = (key: string, max = 5000) => ({ kind: "number" as const, key, min: 0, max, unit: "ms" });@@ -472,13 +473,13 @@ function TabRows() {</label>);return (- <div className={clsx(styles.radioBlock, matched && styles.matched)} role="radiogroup" aria-label="Show tabs in">+ <div className={clsx(styles.radioBlock, matched && styles.matched)} role="radiogroup" aria-label={tx("Show tabs in")}><div className={clsx(styles.radioLabel, disabled && styles.dim)}><SearchLabel text="Show tabs in" />:</div><div className={styles.radios}>{radio("One row, and if tabs don't fit:", !multiple, () => setMultiple(false))}- <div className={styles.children} role="radiogroup" aria-label="If tabs don't fit">+ <div className={styles.children} role="radiogroup" aria-label={tx("If tabs don't fit")}>{radio("Scroll the tabs panel", !multiple && overflow !== "squeeze", () => setOverflow("scroll"), disabled || multiple)}{radio("Squeeze tabs", !multiple && overflow === "squeeze", () => setOverflow("squeeze"), disabled || multiple)}</div>diff --git a/src/features/settings/pages/runTargets.tsx b/src/features/settings/pages/runTargets.tsxindex 4ebb2f673..b0e9aa492 100644--- a/src/features/settings/pages/runTargets.tsx+++ b/src/features/settings/pages/runTargets.tsx@@ -5,7 +5,7 @@import { useCallback, useEffect, useId, useState } from "react";import clsx from "clsx";import { call, commands, isTauri, type RemoteEntry } from "@/platform/ipc";-import { useTx } from "@/platform/i18n";+import { useTx, tx } from "@/platform/i18n";import { useProject } from "@/platform/project";import { DEFAULT_RUN_TARGET, newRemoteId, type RunTargetValid } from "@/platform/remoteSettings";import { Button, Checkbox, Dialog, Icon, IconButton, Input, T } from "@/ui";@@ -297,7 +297,7 @@ function RunTargetsEditor() {return (<div className={styles.toolsLayout}><div className={styles.tableBox}>- <div className={styles.toolbar} role="toolbar" aria-label="Run targets actions">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Run targets actions")}><IconButton icon="plus" title="Add" size="small" onClick={() => add()} /><IconButton icon="minus" title="Remove" size="small" disabled={!current} onClick={remove} /><IconButton@@ -316,7 +316,7 @@ function RunTargetsEditor() {onClick={() => move(1)}/></div>- <div className={styles.toolList} role="listbox" aria-label="Run targets">+ <div className={styles.toolList} role="listbox" aria-label={tx("Run targets")}>{targets.length === 0 && (<div className={clsx(styles.toolRow, styles.empty)}><T>No run targets. Click + to add one.</T>diff --git a/src/features/settings/pages/ssh.tsx b/src/features/settings/pages/ssh.tsxindex c600f76fe..a87a2d8d6 100644--- a/src/features/settings/pages/ssh.tsx+++ b/src/features/settings/pages/ssh.tsx@@ -5,7 +5,7 @@import { useId, useState } from "react";import clsx from "clsx";import { call, commands, IpcError, isTauri } from "@/platform/ipc";-import { useTx } from "@/platform/i18n";+import { useTx, tx } from "@/platform/i18n";import {DEFAULT_SSH_CONFIG,newRemoteId,@@ -285,7 +285,7 @@ function SshConfigsEditor() {return (<div className={styles.toolsLayout}><div className={styles.tableBox}>- <div className={styles.toolbar} role="toolbar" aria-label="SSH configurations actions">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("SSH configurations actions")}><IconButton icon="plus" title="Add" size="small" onClick={() => add()} /><IconButton icon="minus" title="Remove" size="small" disabled={!current} onClick={remove} /><IconButton@@ -296,7 +296,7 @@ function SshConfigsEditor() {onClick={() => current && add(current)}/></div>- <div className={styles.toolList} role="listbox" aria-label="SSH configurations">+ <div className={styles.toolList} role="listbox" aria-label={tx("SSH configurations")}>{configs.length === 0 && (<div className={clsx(styles.toolRow, styles.empty)}><T>No SSH configurations. Click + to add one.</T>diff --git a/src/features/settings/pages/tools.tsx b/src/features/settings/pages/tools.tsxindex 24c923abd..e831de263 100644--- a/src/features/settings/pages/tools.tsx+++ b/src/features/settings/pages/tools.tsx@@ -435,7 +435,7 @@ function ExternalToolsEditor() {return (<div className={styles.toolsLayout}><div className={styles.tableBox}>- <div className={styles.toolbar} role="toolbar" aria-label="External tools actions">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("External tools actions")}><IconButton icon="plus" title="Add" size="small" onClick={() => add()} /><IconButton icon="minus" title="Remove" size="small" disabled={!current} onClick={remove} /><IconButton@@ -454,7 +454,7 @@ function ExternalToolsEditor() {onClick={() => move(1)}/></div>- <div className={styles.toolList} role="listbox" aria-label="External tools">+ <div className={styles.toolList} role="listbox" aria-label={tx("External tools")}>{tools.length === 0 && (<div className={clsx(styles.toolRow, styles.empty)}><T>No external tools. Click + to add one.</T>diff --git a/src/features/settings/pages/vcs.tsx b/src/features/settings/pages/vcs.tsxindex dec8219f4..b7657ea46 100644--- a/src/features/settings/pages/vcs.tsx+++ b/src/features/settings/pages/vcs.tsx@@ -36,7 +36,7 @@ function MappingsTable() {const project = useProject((s) => s.project);return (<div className={styles.tableBox}>- <table className={styles.table} aria-label="Directory mappings">+ <table className={styles.table} aria-label={tx("Directory mappings")}><thead><tr><th>@@ -58,9 +58,9 @@ function MappingsTable() {<tr><td title={project.root}><Icon name="folder" size={16} className={styles.mappingIcon} />- <Project> {project.root}+ {tx("<Project>")} {project.root}</td>- <td>{project.isGit ? "Git" : "<none>"}</td>+ <td>{project.isGit ? "Git" : tx("<none>")}</td></tr>)}</tbody>@@ -221,10 +221,11 @@ function IssueTable() {stackedhint={<>- Matches of an Issue ID regular expression in commit messages (Git log, commit details) become links; $0 is the- whole match, $1… the groups.+ {tx(+ "Matches of an Issue ID regular expression in commit messages (Git log, commit details) become links; $0 is the whole match, $1… the groups.",+ )}{invalid.length > 0 && (- <span className={styles.error}> Invalid pattern: {invalid.map((l) => l.pattern).join(", ")}</span>+ <span className={styles.error}> {tx`Invalid pattern: ${invalid.map((l) => l.pattern).join(", ")}`}</span>)}</>}diff --git a/src/features/templates/emmet/UpdateTagDialog.tsx b/src/features/templates/emmet/UpdateTagDialog.tsxindex ae39eef8c..6d979efe0 100644--- a/src/features/templates/emmet/UpdateTagDialog.tsx+++ b/src/features/templates/emmet/UpdateTagDialog.tsx@@ -3,6 +3,7 @@ import { useState } from "react";import { create } from "zustand";import { Dialog, Input } from "@/ui";import styles from "./Emmet.module.css";+import { tx } from "@/platform/i18n";interface Pending {tag: string;@@ -36,7 +37,7 @@ function PromptDialog({ tag, resolve }: Pending) {><div className={styles.body}><label className={styles.label} htmlFor="emmet-update-tag">- Abbreviation for <{tag}>, e.g. <code>section.card#main[data-x=1]</code>+ {tx`Abbreviation for <${tag}>, e.g.`} <code>section.card#main[data-x=1]</code></label><Inputid="emmet-update-tag"diff --git a/src/features/templates/files/NewFileDialog.tsx b/src/features/templates/files/NewFileDialog.tsxindex 1e1e08636..9ffc767c6 100644--- a/src/features/templates/files/NewFileDialog.tsx+++ b/src/features/templates/files/NewFileDialog.tsx@@ -205,7 +205,7 @@ function NameStep({onKeyDown={onKeyDown}/>{template.kinds.length > 1 && (- <div className={styles.kinds} role="listbox" aria-label="Kind">+ <div className={styles.kinds} role="listbox" aria-label={tx("Kind")}>{template.kinds.map((k, i) => (<divkey={k.id}diff --git a/src/features/templates/popup/Chooser.tsx b/src/features/templates/popup/Chooser.tsxindex bf9ea6746..c965ca0bd 100644--- a/src/features/templates/popup/Chooser.tsx+++ b/src/features/templates/popup/Chooser.tsx@@ -3,6 +3,7 @@ import clsx from "clsx";import { HighlightedText, List, Popup, fuzzyMatch, listNavigate } from "@/ui";import { closeChooser, useChooser, type ChooserItem, type ChooserRequest } from "./store";import styles from "./Chooser.module.css";+import { tx } from "@/platform/i18n";/** Overlay contribution: renders the pending chooser, if any. */export function ChooserHost() {@@ -126,7 +127,7 @@ function ChooserPopup({ request }: { request: ChooserRequest }) {rowHeight={22}className={styles.list}aria-label={request.title}- empty={<div className={styles.empty}>{request.emptyText ?? "Nothing to show"}</div>}+ empty={<div className={styles.empty}>{request.emptyText ?? tx("Nothing to show")}</div>}renderItem={(r, state) => (<div className={clsx(styles.row, state.active && styles.active)}><span className={styles.label}>diff --git a/src/features/templates/settings/LiveTemplatesPage.tsx b/src/features/templates/settings/LiveTemplatesPage.tsxindex dbe32ea2b..433960651 100644--- a/src/features/templates/settings/LiveTemplatesPage.tsx+++ b/src/features/templates/settings/LiveTemplatesPage.tsx@@ -88,7 +88,7 @@ export function LiveTemplatesPage() {aria-label="Filter templates"/></div>- <div className={styles.items} role="listbox" aria-label="Live templates">+ <div className={styles.items} role="listbox" aria-label={tx("Live templates")}>{groups.map(([group, list]) => (<div key={group} role="group" aria-label={group}><div className={styles.groupHeader}>{group}</div>@@ -180,7 +180,7 @@ function TemplateEditor({ template: t }: { template: LiveTemplate }) {className={styles.body}value={t.body}spellCheck={false}- aria-label="Template text"+ aria-label={tx("Template text")}onChange={(e) => update({ body: e.target.value })}onKeyDown={(e) => {if (e.key !== "Tab") return;@@ -193,8 +193,9 @@ function TemplateEditor({ template: t }: { template: LiveTemplate }) {}}/><div className={styles.hint}>- <code>$NAME$</code> variables (repeated ones are linked), <code>$END$</code> caret, <code>$SELECTION$</code>{" "}- surrounded text, <code>$$</code> a dollar sign. Leading tabs are indent units.+ <code>$NAME$</code> <T>variables (repeated ones are linked),</T> <code>$END$</code> <T>caret,</T>{" "}+ <code>$SELECTION$</code> <T>surrounded text,</T> <code>$$</code>{" "}+ <T>a dollar sign. Leading tabs are indent units.</T></div><div className={styles.row}><span className={styles.label}>@@ -269,7 +270,7 @@ function TemplateEditor({ template: t }: { template: LiveTemplate }) {</table>)}<div className={styles.hint}>- Functions: <code>className()</code> <code>methodName()</code> <code>fileName()</code>{" "}+ <T>Functions:</T> <code>className()</code> <code>methodName()</code> <code>fileName()</code>{" "}<code>fileNameWithoutExtension()</code> <code>date("yyyy-MM-dd")</code> <code>time()</code>{" "}<code>user()</code> <code>clipboard()</code> <code>complete()</code> <code>suggestVariableName()</code>{" "}<code>commentStart()</code> <code>capitalize(…)</code> <code>camelCase(…)</code> <code>snakeCase(…)</code>diff --git a/src/features/templates/settings/PostfixPage.tsx b/src/features/templates/settings/PostfixPage.tsxindex fcb7aff90..e333da135 100644--- a/src/features/templates/settings/PostfixPage.tsx+++ b/src/features/templates/settings/PostfixPage.tsx@@ -39,7 +39,7 @@ export function PostfixPage() {<code>items.for</code><T>, then press Tab.</T></div>- <div className={styles.tabs} role="tablist" aria-label="Languages">+ <div className={styles.tabs} role="tablist" aria-label={tx("Languages")}>{POSTFIX_GROUPS.map((g) => (<buttonkey={g.id}@@ -53,7 +53,7 @@ export function PostfixPage() {</button>))}</div>- <div className={styles.list} role="list" aria-label="Postfix templates">+ <div className={styles.list} role="list" aria-label={tx("Postfix templates")}>{list.map((t) => (<div key={t.id} className={styles.listRow} role="listitem"><Checkboxdiff --git a/src/features/terminal/FindBar.tsx b/src/features/terminal/FindBar.tsxindex 596822144..65b8b065b 100644--- a/src/features/terminal/FindBar.tsx+++ b/src/features/terminal/FindBar.tsx@@ -7,6 +7,7 @@ import type { TerminalSearchOptions, TerminalSearchResult } from "./session";import { activeSession } from "./store";import styles from "./Terminal.module.css";import { hasPrimaryModifier } from "@/platform/keymap";+import { tx } from "@/platform/i18n";export const useTerminalFind = create<{ open: boolean; seq: number; query: string; options: TerminalSearchOptions }>(() => ({@@ -101,7 +102,7 @@ export function TerminalFindBar({ sessionKey }: { sessionKey: string | null }) {<divclassName={styles.find}role="search"- aria-label="Find in terminal"+ aria-label={tx("Find in terminal")}data-terminal-find=""onKeyDown={onKeyDown}>diff --git a/src/features/todo/TodoSettingsPage.tsx b/src/features/todo/TodoSettingsPage.tsxindex f7a34e3fc..faedf9fd2 100644--- a/src/features/todo/TodoSettingsPage.tsx+++ b/src/features/todo/TodoSettingsPage.tsx@@ -50,7 +50,7 @@ export function TodoSettingsPage() {}/></div>- <div className={styles.list} role="list" aria-label="TODO patterns">+ <div className={styles.list} role="list" aria-label={tx("TODO patterns")}>{s.patterns.map((p) => (<div key={p.id} className={styles.row} role="listitem"><Checkboxdiff --git a/src/features/todo/TodoView.tsx b/src/features/todo/TodoView.tsxindex 69c39dfa5..57396ae2f 100644--- a/src/features/todo/TodoView.tsx+++ b/src/features/todo/TodoView.tsx@@ -414,7 +414,7 @@ export function TodoView() {<span className={clsx(styles.fileName, state.selected && styles.selectedText)}>{name}</span><span className={styles.muted}>{relativeDir(root, n.group.path)}</span><span className={styles.count}>- {n.group.items.length} item{n.group.items.length === 1 ? "" : "s"}+ {n.group.items.length === 1 ? tx`${n.group.items.length} item` : tx`${n.group.items.length} items`}</span></span>);diff --git a/src/features/tools/LanguageServersPage.tsx b/src/features/tools/LanguageServersPage.tsxindex b5407495f..70373bbff 100644--- a/src/features/tools/LanguageServersPage.tsx+++ b/src/features/tools/LanguageServersPage.tsx@@ -313,8 +313,9 @@ export function LanguageServersPage() {return (<div className={styles.page}><p className={styles.intro}>- Language servers and debug adapters used by the IDE. Missing tools can be installed into the IDE's own- tools folder; nothing is downloaded until you click Install.+ {tx(+ "Language servers and debug adapters used by the IDE. Missing tools can be installed into the IDE's own tools folder; nothing is downloaded until you click Install.",+ )}</p>{error && (<div className={styles.error} role="alert">@@ -351,7 +352,7 @@ export function LanguageServersPage() {aria-label="Filter language servers"/></div>- <div className={styles.segmented} role="radiogroup" aria-label="Show">+ <div className={styles.segmented} role="radiogroup" aria-label={tx("Show")}>{(["all", "missing", "installed"] as const).map((f) => (<buttonkey={f}@@ -365,7 +366,7 @@ export function LanguageServersPage() {</button>))}</div>- <ul className={styles.list} aria-label="Language servers and debug adapters" onKeyDown={onListKey}>+ <ul className={styles.list} aria-label={tx("Language servers and debug adapters")} onKeyDown={onListKey}>{group("Available", ready)}{group("Missing", missing)}{loaded && shown.length === 0 && (diff --git a/src/features/vcs/BranchWidget.tsx b/src/features/vcs/BranchWidget.tsxindex bed98625b..e8f7878a4 100644--- a/src/features/vcs/BranchWidget.tsx+++ b/src/features/vcs/BranchWidget.tsx@@ -19,6 +19,7 @@ import {SearchField,firstSelectable,type MenuItem,+ T,} from "@/ui";import { buildBranchRows, type BranchRow, type PopupAction } from "./branches";import { branchMenu, commonBranchMenu, inRepo, tagMenu } from "./branchMenu";@@ -331,7 +332,7 @@ function BranchesPanel({ onClose, actions: baseActions, root, fallback, onBack }items={rows}getKey={(r) => r.key}isSection={isSection}- renderSection={(r) => <span className={styles.section}>{r.type === "section" ? r.label : ""}</span>}+ renderSection={(r) => <span className={styles.section}>{r.type === "section" ? tx(r.label) : ""}</span>}activeIndex={activeIndex}onActiveChange={setActive}onActivate={(_r, i) => activate(i)}@@ -340,7 +341,7 @@ function BranchesPanel({ onClose, actions: baseActions, root, fallback, onBack }rowHeight={ROW_HEIGHT}aria-label="Branches"className={styles.list}- empty={<span className={styles.empty}>{loaded ? "No matching branches" : "Loading…"}</span>}+ empty={<span className={styles.empty}>{loaded ? tx("No matching branches") : "Loading…"}</span>}renderItem={(r) => <BranchRowView row={r} />}/></div>@@ -599,7 +600,7 @@ function MultiRepoPanel({ onClose }: { onClose: () => void }) {sectionHeightOf={(r) => (r.type === "section" && !r.label ? SEPARATOR_HEIGHT : undefined)}renderSection={(r) =>r.type === "section" && r.label ? (- <span className={styles.section}>{r.label}</span>+ <span className={styles.section}>{tx(r.label)}</span>) : (<span className={styles.separator} role="separator" />)@@ -612,7 +613,11 @@ function MultiRepoPanel({ onClose }: { onClose: () => void }) {rowHeight={ROW_HEIGHT}aria-label="Repositories and branches"className={styles.list}- empty={<span className={styles.empty}>No matching repositories or branches</span>}+ empty={+ <span className={styles.empty}>+ <T>No matching repositories or branches</T>+ </span>+ }renderItem={(r) => (<RepoRowView row={r} operation={r.type === "repo" ? operations[r.repo.root] : undefined} />)}@@ -674,7 +679,7 @@ function RepoRowView({ row, operation }: { row: RepoRow; operation?: string }) {><Icon name={row.expanded ? "chevron-down" : "chevron-right"} size={12} className={styles.rowIcon} />{row.depth > 0 && <Icon name="folder" size={14} className={styles.rowIcon} />}- <span className={styles.label}>{row.label}</span>+ <span className={styles.label}>{tx(row.label)}</span></span>);case "common":@@ -691,7 +696,11 @@ function RepoRowView({ row, operation }: { row: RepoRow; operation?: string }) {indices={row.matches}tone="accent"/>- {row.branch.current && <span className={styles.tag}>current</span>}+ {row.branch.current && (+ <span className={styles.tag}>+ <T>current</T>+ </span>+ )}<Icon name="chevron-right" size={10} className={styles.chevron} /></span>);@@ -707,7 +716,7 @@ function BranchRowView({ row }: { row: BranchRow | Extract<RepoRow, { type: "actreturn (<span className={styles.row} data-row-key={row.key}><Icon name={row.action.icon ?? "more"} size={14} className={styles.rowIcon} />- <HighlightedText className={styles.label} text={row.action.label} indices={row.matches} tone="accent" />+ <HighlightedText className={styles.label} text={tx(row.action.label)} indices={row.matches} tone="accent" />{keys && <span className={styles.keys}>{keys}</span>}</span>);@@ -756,7 +765,11 @@ function BranchRowView({ row }: { row: BranchRow | Extract<RepoRow, { type: "actindices={row.matches}tone="accent"/>- {b.current && <span className={styles.tag}>current</span>}+ {b.current && (+ <span className={styles.tag}>+ <T>current</T>+ </span>+ )}{(b.ahead > 0 || b.behind > 0) && (<span className={styles.syncSmall}>{b.ahead > 0 && `↑${b.ahead}`}diff --git a/src/features/vcs/CommitView.tsx b/src/features/vcs/CommitView.tsxindex 282d4f0d3..cbaabb04d 100644--- a/src/features/vcs/CommitView.tsx+++ b/src/features/vcs/CommitView.tsx@@ -42,7 +42,7 @@ import { useChangelists, withListDefaults } from "./changelists";import { moveToChangelist } from "./changelistsUi";import { messageHistory, setAmend, setGroupByDir, useCommit, type CommitTab } from "./commitStore";import { openDiff, withChain, workingDiffData } from "./diffInput";-import { KIND_COLOR, KIND_LABEL, formatTime, stashLabel, stripSlash } from "./model";+import { KIND_COLOR, KIND_LABEL, fileCount, formatTime, stashLabel, stripSlash } from "./model";import { call, commands } from "@/platform/ipc";import { OperationBanner } from "./operations";import { ShelfPanel, loadShelves, useShelf } from "./shelf";@@ -423,7 +423,7 @@ function ChangesPanel() {style={n.type === "file" && n.kind ? { color: KIND_COLOR[n.kind] } : undefined}title={n.type === "file" && n.kind ? KIND_LABEL[n.kind] : undefined}>- {n.label}+ {n.type === "group" && !n.changelist ? tx(n.label) : n.label}</span>);// Pointer-driven (HTML5 drag and drop never reaches the Tauri webview):@@ -480,14 +480,10 @@ function ChangesPanel() {/>)}{label}- {n.type === "group" && (- <span className={styles.detail}>- {n.files.length} file{n.files.length === 1 ? "" : "s"}- </span>- )}+ {n.type === "group" && <span className={styles.detail}>{fileCount(n.files.length)}</span>}{n.type === "file" && n.files[0] && isPartiallyStaged(n.files[0]) && (- <span className={styles.partial} title="Partially staged: only staged hunks are committed">- partial+ <span className={styles.partial} title={tx("Partially staged: only staged hunks are committed")}>+ <T>partial</T></span>)}{n.detail && <span className={styles.detail}>{n.detail}</span>}@@ -631,7 +627,7 @@ function CommitMessage({ included }: { included: number }) {/><span className={styles.grow} />{tooLong && (- <span className={clsx(styles.lineLen, styles.lineLenWarn)} title="Subject line length">+ <span className={clsx(styles.lineLen, styles.lineLenWarn)} title={tx("Subject line length")}>{first.length}/{cfg.subjectLimit}</span>)}@@ -642,8 +638,8 @@ function CommitMessage({ included }: { included: number }) {aria-invalid={emptyError || undefined}style={{ ["--guide" as string]: `${margin}ch` }}value={message}- placeholder="Commit Message"- aria-label="Commit message"+ placeholder={tx("Commit Message")}+ aria-label={tx("Commit message")}spellCheckonChange={(e) => {const el = e.target;diff --git a/src/features/vcs/DiffEditor.tsx b/src/features/vcs/DiffEditor.tsxindex 0c4266ac9..d84c10c3a 100644--- a/src/features/vcs/DiffEditor.tsx+++ b/src/features/vcs/DiffEditor.tsx@@ -19,7 +19,7 @@ import { setContext } from "@/platform/context";import { call, commands } from "@/platform/ipc";import { shortcutLabel } from "@/platform/keymap";import { tx } from "@/platform/i18n";-import { IconButton, Select, Spinner } from "@/ui";+import { IconButton, Select, Spinner, T } from "@/ui";import { editorService, type EditorInput } from "@/workbench/contributions";import { languageFor, viewerBase } from "./cm";import { applyChunk, arrowControls, hoverRevert } from "./diffControls";@@ -591,7 +591,7 @@ export function DiffEditor({ input }: { input: EditorInput }) {? "": chunkInfo.count === 0? identical- ? "Contents are identical"+ ? tx("Contents are identical"): "No differences": chunkInfo.current >= 0? `${chunkInfo.current + 1} of ${chunkInfo.count} differences`@@ -602,11 +602,13 @@ export function DiffEditor({ input }: { input: EditorInput }) {<div className={styles.labels}><span className={styles.label} title={sideLabel(left)}>{sideLabel(left)}- {editableA && <span className={styles.badge}>editable</span>}+ {editableA && <span className={styles.badge}>+ <T>editable</T>+ </span>}</span><span className={styles.label} title={sideLabel(right)}>{sideLabel(right)}- {editableB && <span className={styles.badge}>{left.type === "rev" ? "working copy" : "editable"}</span>}+ {editableB && <span className={styles.badge}>{left.type === "rev" ? tx("working copy") : "editable"}</span>}</span></div>) : (diff --git a/src/features/vcs/GitLog.tsx b/src/features/vcs/GitLog.tsxindex 87a485c77..6aff5e2c5 100644--- a/src/features/vcs/GitLog.tsx+++ b/src/features/vcs/GitLog.tsx@@ -53,7 +53,7 @@ import {useGitLog,} from "./logStore";import { refLabels, useLogOptions, type LogOptions } from "./logOptions";-import { KIND_COLOR, baseName, formatTime, relTo, type EffectiveKind } from "./model";+import { KIND_COLOR, baseName, fileCount, formatTime, relTo, type EffectiveKind } from "./model";import { clearConsole, useVcsConsole } from "./ops";import { currentRepo, loadBranches, useVcs } from "./store";import { loadFavoriteBranches, newBranch, useFavoriteBranches } from "./branchOps";@@ -166,7 +166,7 @@ function branchDetail(n: BranchTreeNode): string | undefined {const b = n.branch;if (!b) return undefined;const sync = [b.behind > 0 ? `↓${b.behind}` : "", b.ahead > 0 ? `↑${b.ahead}` : ""].filter(Boolean).join(" ");- return [b.current ? "current" : "", sync].filter(Boolean).join(" ") || undefined;+ return [b.current ? tx("current") : "", sync].filter(Boolean).join(" ") || undefined;}export function BranchesPanel() {@@ -219,7 +219,7 @@ export function BranchesPanel() {};return (<div className={styles.branches} onKeyDownCapture={onKeyDownCapture}>- <div className={styles.branchesBar} role="toolbar" aria-label="Branches">+ <div className={styles.branchesBar} role="toolbar" aria-label={tx("Branches")}><SearchFieldclassName={styles.branchSearch}value={query}@@ -235,7 +235,7 @@ export function BranchesPanel() {key={`${root ?? ""}:${branchesLoaded}`}roots={roots}getKey={(n) => n.key}- getLabel={(n) => n.label}+ getLabel={(n) => (n.kind === "head" || n.kind === "group" ? tx(n.label) : n.label)}getChildren={(n) => n.children}isExpandable={(n) => !!n.children}defaultExpanded={[@@ -317,15 +317,15 @@ function FilterButton({<button type="button" className={styles.filterMain} onClick={onOpen} aria-haspopup="menu">{value ? (<>- {label}: <span className={styles.filterValue}>{value}</span>+ {tx(label)}: <span className={styles.filterValue}>{value}</span></>) : (- label+ tx(label))}{!value && <Icon name="chevron-down" size={12} className={styles.filterChevron} />}</button>{value && (- <button type="button" className={styles.filterClear} aria-label={`Clear ${label} filter`} onClick={onClear}>+ <button type="button" className={styles.filterClear} aria-label={tx`Clear ${tx(label)} filter`} onClick={onClear}><Icon name="close" size={12} /></button>)}@@ -443,7 +443,7 @@ function FilterBar() {]);return (- <div className={styles.filters} role="toolbar" aria-label="Log filters">+ <div className={styles.filters} role="toolbar" aria-label={tx("Log filters")}><SearchFieldclassName={styles.textFilter}value={text}@@ -724,14 +724,14 @@ function CommitList() {ref={scrollRef}className={styles.list}role="listbox"- aria-label="Commits"+ aria-label={tx("Commits")}aria-multiselectablearia-activedescendant={selectedIndex >= 0 ? `commit-${selectedIndex}` : undefined}tabIndex={0}onKeyDown={onKeyDown}>{!commits.length && !loading && finished && (- <div className={styles.message}>{headCommit ? "No commits match the filters" : "No commits yet"}</div>+ <div className={styles.message}>{headCommit ? tx("No commits match the filters") : tx("No commits yet")}</div>)}<div style={{ height: virtualizer.getTotalSize(), position: "relative" }}>{items.map((v) => {@@ -986,10 +986,10 @@ export function CommitDetails({ commits }: { commits: Commit[] }) {<SplitGroup orientation="vertical" id="git-log-details"><SplitPanel id="files" defaultSize="60%" minSize="60px"><div className={styles.filesPane}>- <div className={styles.detailsBar} role="toolbar" aria-label="Changed files">+ <div className={styles.detailsBar} role="toolbar" aria-label={tx("Changed files")}><span className={styles.detailsCount}>- {files ? `${files.length} file${files.length === 1 ? "" : "s"}` : ""}- {many ? ` in ${chosen.length} commits` : ""}+ {files ? fileCount(files.length) : ""}+ {many ? " " + tx`in ${chosen.length} commits` : ""}</span><span className={styles.grow} /><IconButton@@ -1062,16 +1062,16 @@ function CommitMessage({ commit, compact = false }: { commit: Commit; compact?:<buttontype="button"className={clsx(styles.linkButton, styles.hash)}- title="Copy revision number"+ title={tx("Copy revision number")}onClick={() => void navigator.clipboard?.writeText(commit.id)}>{commit.shortId}</button>{" "}{commit.author} <{commit.email}>- {commit.timeMs ? ` on ${new Date(commit.timeMs).toLocaleString()}` : ""}+ {commit.timeMs ? " " + tx`on ${new Date(commit.timeMs).toLocaleString()}` : ""}</div>{commit.parents.length > 1 && (- <div className={styles.meta}>Merge of {commit.parents.map((p) => p.slice(0, 8)).join(", ")}</div>+ <div className={styles.meta}>{tx`Merge of ${commit.parents.map((p) => p.slice(0, 8)).join(", ")}`}</div>)}{commit.refs.length > 0 && (<div className={styles.meta}>@@ -1088,9 +1088,7 @@ function ChangedFileRow({ node }: { node: FileTreeNode<ChangedFile> }) {<span className={styles.fileRow}><Icon name="folder" size={16} className={styles.fileIcon} /><span className={styles.fileName}>{node.name}</span>- <span className={styles.fileDir}>- {node.count} file{node.count === 1 ? "" : "s"}- </span>+ <span className={styles.fileDir}>{fileCount(node.count)}</span></span>);const f = node.file;@@ -1101,7 +1099,7 @@ function ChangedFileRow({ node }: { node: FileTreeNode<ChangedFile> }) {<span className={styles.fileName} style={{ color: KIND_COLOR[kind] }}>{node.name}</span>- {f.oldPath && <span className={styles.fileDir}>renamed from {baseName(f.oldPath)}</span>}+ {f.oldPath && <span className={styles.fileDir}>{tx`renamed from ${baseName(f.oldPath)}`}</span>}</span>);}@@ -1126,7 +1124,7 @@ function ConsoleView() {ref={ref}className={styles.console}role="log"- aria-label="Git console"+ aria-label={tx("Git console")}onScroll={(e) => {const el = e.currentTarget;stick.current = el.scrollTop + el.clientHeight >= el.scrollHeight - 8;diff --git a/src/features/vcs/HunkPopup.tsx b/src/features/vcs/HunkPopup.tsxindex bb998a482..be25804a6 100644--- a/src/features/vcs/HunkPopup.tsx+++ b/src/features/vcs/HunkPopup.tsx@@ -7,6 +7,7 @@ import { shortcutLabel } from "@/platform/keymap";import { IconButton, Popup } from "@/ui";import { editorHunks, gotoChange, setHunkPopupHooks, type EditorHunk } from "./gutter";import styles from "./HunkPopup.module.css";+import { tx } from "@/platform/i18n";interface PopupState {view: EditorView;@@ -110,7 +111,7 @@ function HunkPopupView({ state }: { state: PopupState }) {aria-label={KIND_TITLE[hunk.kind]}className={styles.popup}>- <div className={styles.toolbar} role="toolbar" aria-label="Change actions">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Change actions")}><IconButtonicon="arrow-up"title="Previous Change"diff --git a/src/features/vcs/LocalHistory.tsx b/src/features/vcs/LocalHistory.tsxindex 83095c290..da3c35f9a 100644--- a/src/features/vcs/LocalHistory.tsx+++ b/src/features/vcs/LocalHistory.tsx@@ -179,9 +179,9 @@ export function LocalHistoryEditor({ input }: { input: EditorInput }) {elsedetail = (<div className={styles.message}>- Label '{current.label}'+ {tx`Label '${current.label}'`}{view?.folder && atLabel?.size- ? ` · ${atLabel.size} ${atLabel.size === 1 ? "file" : "files"} recorded before it`+ ? ` · ${atLabel.size === 1 ? tx`${atLabel.size} file recorded before it` : tx`${atLabel.size} files recorded before it`}`: ""}</div>);@@ -249,7 +249,9 @@ export function LocalHistoryEditor({ input }: { input: EditorInput }) {aria-label="Revisions"className={styles.list}empty={- <span className={styles.message}>No local history for this {view.folder ? "folder" : "path"} yet</span>+ <span className={styles.message}>+ {view.folder ? tx`No local history for this folder yet` : tx`No local history for this path yet`}+ </span>}renderItem={(e) =>isLabel(e) ? (diff --git a/src/features/vcs/MergeEditor.tsx b/src/features/vcs/MergeEditor.tsxindex d760b5e6d..02b2a1621 100644--- a/src/features/vcs/MergeEditor.tsx+++ b/src/features/vcs/MergeEditor.tsx@@ -296,7 +296,7 @@ export function MergeEditor({ input }: { input: EditorInput }) {if (resolved)return (<div className={styles.message}>- {baseName(path)} has been resolved and staged.+ {tx`${baseName(path)} has been resolved and staged.`}<Button onClick={() => void editorService().openFile(path, { focus: true })}><T>Open File</T></Button>@@ -305,7 +305,7 @@ export function MergeEditor({ input }: { input: EditorInput }) {return (<div className={styles.root}>- <div className={styles.toolbar} role="toolbar" aria-label="Merge">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Merge")}><IconButton icon="arrow-up" title="Previous Conflict" size="small" onClick={() => goto(-1)} /><IconButton icon="arrow-down" title="Next Conflict" size="small" onClick={() => goto(1)} /><span className={styles.sep} />@@ -317,7 +317,7 @@ export function MergeEditor({ input }: { input: EditorInput }) {</Button><IconButton icon="refresh" title="Reload from Disk" size="small" onClick={() => void load()} /><span className={clsx(styles.status, !left && styles.statusDone)}>- {left ? `${left} conflict${left === 1 ? "" : "s"} left` : "All conflicts resolved"}+ {left ? `${left} conflict${left === 1 ? "" : "s"} left` : tx("All conflicts resolved")}</span><Button size="small" variant="primary" onClick={() => void apply()}><T>Apply</T>@@ -336,9 +336,9 @@ export function MergeEditor({ input }: { input: EditorInput }) {</div>) : null}<div className={styles.panes} hidden={!state || lang === null}>- <div ref={oursRef} className={styles.pane} aria-label="Your version" role="region" />- <div ref={resultRef} className={styles.pane} aria-label="Result" role="region" />- <div ref={theirsRef} className={styles.pane} aria-label="Their version" role="region" />+ <div ref={oursRef} className={styles.pane} aria-label={tx("Your version")} role="region" />+ <div ref={resultRef} className={styles.pane} aria-label={tx("Result")} role="region" />+ <div ref={theirsRef} className={styles.pane} aria-label={tx("Their version")} role="region" /></div></div>);diff --git a/src/features/vcs/branches.ts b/src/features/vcs/branches.tsindex 6561e4ac6..bc839f6d2 100644--- a/src/features/vcs/branches.ts+++ b/src/features/vcs/branches.ts@@ -1,5 +1,6 @@/** Branches popup model: grouping, ordering and filtering (pure). */import type { Branch } from "@/bindings";+import { tx } from "@/platform/i18n";import { fuzzyMatch } from "@/ui/match";export interface PopupAction {@@ -69,7 +70,7 @@ export function buildBranchRows(};for (const a of actions) {- const m = match(a.label);+ const m = match(tx(a.label));if (m === false) continue;rows.push({ type: "action", key: `action:${a.id}`, action: a, matches: m });}diff --git a/src/features/vcs/changeOps.tsx b/src/features/vcs/changeOps.tsxindex 31433341e..7365f53b4 100644--- a/src/features/vcs/changeOps.tsx+++ b/src/features/vcs/changeOps.tsx@@ -2,7 +2,7 @@import { useState } from "react";import type { FileStatus, PartialCommitFile } from "@/bindings";import { call, commands } from "@/platform/ipc";-import { Checkbox, Dialog, Icon, Input, fileIconName } from "@/ui";+import { Checkbox, Dialog, Icon, Input, T, fileIconName } from "@/ui";import { notifications } from "@/workbench/contributions";import { commitRepos, groupOf, planCommit, renamedFromPath } from "./changes";import { useChangelists, withListDefaults } from "./changelists";@@ -222,10 +222,11 @@ function RollbackDialog({ files, onClose }: { files: FileStatus[]; onClose: () =]}><div className={styles.section}>- {selected.size} of {files.length} file{files.length === 1 ? "" : "s"} will be reverted to their last committed- state. Uncommitted changes are lost.+ {files.length === 1+ ? tx`${selected.size} of ${files.length} file will be reverted to their last committed state. Uncommitted changes are lost.`+ : tx`${selected.size} of ${files.length} files will be reverted to their last committed state. Uncommitted changes are lost.`}</div>- <div className={styles.fileList} role="group" aria-label="Files to roll back">+ <div className={styles.fileList} role="group" aria-label={tx("Files to roll back")}>{files.map((f) => {const kind = effectiveKind(f) ?? "modified";return (@@ -337,8 +338,10 @@ function StashDialog({submit();}}>- {branch && <div className={styles.hint}>Current branch: {branch}</div>}- <label className={styles.fieldLabel}>Message:</label>+ {branch && <div className={styles.hint}>{tx`Current branch: ${branch}`}</div>}+ <label className={styles.fieldLabel}>+ <T>Message:</T>+ </label><Inputdata-autofocusaria-label="Message"@@ -428,8 +431,12 @@ function UnstashDialog({ initial, onClose }: { initial: number; onClose: () => vsubmit();}}>- <div className={styles.choiceList} role="radiogroup" aria-label="Stashes">- {stashes.length === 0 && <div className={styles.hint}>No stashes</div>}+ <div className={styles.choiceList} role="radiogroup" aria-label={tx("Stashes")}>+ {stashes.length === 0 && (+ <div className={styles.hint}>+ <T>No stashes</T>+ </div>+ )}{stashes.map((s) => (<label key={s.index} className={styles.radioRow}><input type="radio" name="stash" checked={chosen?.index === s.index} onChange={() => setIndex(s.index)} />@@ -446,7 +453,9 @@ function UnstashDialog({ initial, onClose }: { initial: number; onClose: () => vonChange={setReinstateIndex}label="Reinstate index"/>- <label className={styles.fieldLabel}>As new branch:</label>+ <label className={styles.fieldLabel}>+ <T>As new branch:</T>+ </label><Input mono aria-label="As new branch" value={branch} onChange={(e) => setBranch(e.target.value)} /></form></Dialog>diff --git a/src/features/vcs/changelistsUi.tsx b/src/features/vcs/changelistsUi.tsxindex 6ac014aba..28dbd22cd 100644--- a/src/features/vcs/changelistsUi.tsx+++ b/src/features/vcs/changelistsUi.tsx@@ -17,6 +17,7 @@ import {} from "./changelists";import { useCommit } from "./commitStore";import { confirmDialog, openDialog } from "./dialogs";+import { fileCount } from "./model";import { useVcs } from "./store";import styles from "./common.module.css";import { tx } from "@/platform/i18n";@@ -230,10 +231,8 @@ function MoveDialog({ paths, onClose }: { paths: readonly string[]; onClose: (){ label: "Cancel", role: "cancel" },]}>- <div className={styles.form} role="radiogroup" aria-label="Target changelist">- <div className={styles.hint}>- {paths.length} file{paths.length === 1 ? "" : "s"}- </div>+ <div className={styles.form} role="radiogroup" aria-label={tx("Target changelist")}>+ <div className={styles.hint}>{fileCount(paths.length)}</div><label className={styles.radioRow}><inputtype="radio"diff --git a/src/features/vcs/commitChecks.tsx b/src/features/vcs/commitChecks.tsxindex b9a85f10d..6bd91621a 100644--- a/src/features/vcs/commitChecks.tsx+++ b/src/features/vcs/commitChecks.tsx@@ -180,10 +180,6 @@ export interface CommitProblem {details?: { label: string; run: () => void };}-function plural(n: number, word: string) {- return `${n} ${word}${n === 1 ? "" : "s"}`;-}-// ---------------------------------------------------------------------------export interface CommitCandidate {@@ -289,7 +285,11 @@ export async function runCommitChecks(files: readonly CommitCandidate[], amend:title: "TODO",text: (<>- <div>{plural(hits.length, "TODO item")} found in the changed lines:</div>+ <div>+ {hits.length === 1+ ? tx`${hits.length} TODO item found in the changed lines:`+ : tx`${hits.length} TODO items found in the changed lines:`}+ </div><ul className={styles.todoList}>{hits.slice(0, 20).map((h, i) => (<li key={i}>@@ -325,13 +325,14 @@ export async function runCommitChecks(files: readonly CommitCandidate[], amend:}}if (crlf.length) {+ const crlfNames = crlf.slice(0, 5).map(baseName).join(", ") + (crlf.length > 5 ? ", …" : "");problems.push({title: "Line separators",text: (<>- {plural(crlf.length, "file")} ({crlf.slice(0, 5).map(baseName).join(", ")}- {crlf.length > 5 ? ", …" : ""}) contain CRLF line separators and core.autocrlf is not set, so they would be- committed with CRLF. Convert them with the line separator widget in the status bar, or set{" "}+ {crlf.length === 1+ ? tx`${crlf.length} file (${crlfNames}) contain CRLF line separators and core.autocrlf is not set, so they would be committed with CRLF. Convert them with the line separator widget in the status bar, or set`+ : tx`${crlf.length} files (${crlfNames}) contain CRLF line separators and core.autocrlf is not set, so they would be committed with CRLF. Convert them with the line separator widget in the status bar, or set`}{" "}<code>git config core.autocrlf input</code>.</>),diff --git a/src/features/vcs/conflictsUi.tsx b/src/features/vcs/conflictsUi.tsxindex 28d693f02..c24969bdb 100644--- a/src/features/vcs/conflictsUi.tsx+++ b/src/features/vcs/conflictsUi.tsx@@ -14,6 +14,7 @@ import { runOp, writeFileText } from "./ops";import { executeAction } from "@/platform/actions";import { conflictedFiles, useVcs } from "./store";import styles from "./common.module.css";+import { tx } from "@/platform/i18n";export function showConflictsDialog() {if (!conflictedFiles().length) {@@ -99,8 +100,10 @@ function ConflictsDialog({ onClose }: { onClose: () => void }) {><div className={styles.section}>{files.length- ? `${files.length} file${files.length === 1 ? "" : "s"} with conflicts`- : "All conflicts resolved"}+ ? files.length === 1+ ? tx`${files.length} file with conflicts`+ : tx`${files.length} files with conflicts`+ : tx("All conflicts resolved")}</div><div style={{ height: 240, display: "flex", flexDirection: "column", padding: "0 14px 14px" }}><Listdiff --git a/src/features/vcs/dialogs.tsx b/src/features/vcs/dialogs.tsxindex 2c5d15450..d976a8c7e 100644--- a/src/features/vcs/dialogs.tsx+++ b/src/features/vcs/dialogs.tsx@@ -1,7 +1,7 @@/** Imperative dialogs for VCS actions, rendered by one overlay contribution. */import { Fragment, useState, type ReactNode } from "react";import { create } from "zustand";-import { Checkbox, Dialog, Input } from "@/ui";+import { Checkbox, Dialog, Input, T } from "@/ui";import { confirm } from "@/workbench/messages";import styles from "./common.module.css";@@ -279,9 +279,13 @@ function DateRangeDialog({ onDone }: { onDone: (r: { after: number | null; beforsubmit();}}>- <label className={styles.fieldLabel}>From:</label>+ <label className={styles.fieldLabel}>+ <T>From:</T>+ </label><Input data-autofocus type="date" aria-label="From" value={from} onChange={(e) => setFrom(e.target.value)} />- <label className={styles.fieldLabel}>To:</label>+ <label className={styles.fieldLabel}>+ <T>To:</T>+ </label><Input type="date" aria-label="To" value={to} onChange={(e) => setTo(e.target.value)} />{(from || to) && error && <div className={styles.error}>{error}</div>}</form>diff --git a/src/features/vcs/gitMenuDialogs.tsx b/src/features/vcs/gitMenuDialogs.tsxindex 65b731330..57148bbda 100644--- a/src/features/vcs/gitMenuDialogs.tsx+++ b/src/features/vcs/gitMenuDialogs.tsx@@ -62,7 +62,7 @@ function MergeFlags({}) {const disabled = disabledMergeFlags(on, rebase);return (- <div className={styles.optionGrid} role="group" aria-label="Merge options">+ <div className={styles.optionGrid} role="group" aria-label={tx("Merge options")}>{FLAG_LABELS.map(([flag, label]) => (<Checkboxkey={flag}@@ -317,7 +317,7 @@ function RebaseDialog({ onClose }: { onClose: () => void }) {><div className={styles.form}><div className={styles.fieldLabel}>- {useOnto ? `Rebase commits of ${head ?? "HEAD"} not on:` : `Rebase ${head ?? "HEAD"} onto:`}+ {useOnto ? tx`Rebase commits of ${head ?? "HEAD"} not on:` : `Rebase ${head ?? "HEAD"} onto:`}</div><Select aria-label="Upstream" value={upstream} placeholder="Select branch" options={options} onChange={setUpstream} /><Checkbox label="--onto" checked={useOnto} onChange={setUseOnto} />@@ -409,12 +409,12 @@ function RemotesDialog({ onClose }: { onClose: () => void }) {buttons={[{ label: "OK", role: "default", autoFocus: true, onClick: onClose }]}><div className={styles.form}>- <div className={styles.manageBar} role="toolbar" aria-label="Remotes">+ <div className={styles.manageBar} role="toolbar" aria-label={tx("Remotes")}><IconButton icon="plus" title="Add Remote…" size="small" onClick={() => edit()} /><IconButton icon="minus" title="Remove Remote" size="small" disabled={!current} onClick={() => void remove()} /><IconButton icon="edit" title="Edit Remote…" size="small" disabled={!current} onClick={() => edit(current)} /></div>- <div className={styles.choiceList} role="listbox" aria-label="Remotes">+ <div className={styles.choiceList} role="listbox" aria-label={tx("Remotes")}>{!remotes.length && (<div className={styles.empty}><T>No remotes</T>@@ -565,7 +565,7 @@ function WorktreesDialog({ onClose }: { onClose: () => void }) {buttons={[{ label: "Close", role: "default", autoFocus: true, onClick: onClose }]}><div className={styles.form}>- <div className={styles.manageBar} role="toolbar" aria-label="Worktrees">+ <div className={styles.manageBar} role="toolbar" aria-label={tx("Worktrees")}><IconButton icon="plus" title="New Worktree…" size="small" onClick={() => showNewWorktree(() => void reload())} /><IconButtonicon="minus"@@ -582,7 +582,7 @@ function WorktreesDialog({ onClose }: { onClose: () => void }) {onClick={() => current && void executeAction("file.openProjectPath", current.path)}/></div>- <div className={styles.choiceList} role="listbox" aria-label="Worktrees">+ <div className={styles.choiceList} role="listbox" aria-label={tx("Worktrees")}>{list.map((w) => (<buttonkey={w.path}diff --git a/src/features/vcs/model.ts b/src/features/vcs/model.tsindex 5b4ac19dd..bf6828a62 100644--- a/src/features/vcs/model.ts+++ b/src/features/vcs/model.ts@@ -172,3 +172,8 @@ export function commitWebUrl(remoteUrl: string, sha: string): string | null {if (!base) return null;return `${base}/${/bitbucket\.org\//.test(base) ? "commits" : "commit"}/${sha}`;}++/** "N file(s)", worded for the locale. */+export function fileCount(n: number): string {+ return n === 1 ? tx`${n} file` : tx`${n} files`;+}diff --git a/src/features/vcs/operations.tsx b/src/features/vcs/operations.tsxindex 5ad795438..c35ff7301 100644--- a/src/features/vcs/operations.tsx+++ b/src/features/vcs/operations.tsx@@ -145,7 +145,7 @@ export function OperationBanner() {{conflicts? ` · ${conflicts} conflict${conflicts === 1 ? "" : "s"}`: op === "merge"- ? " · commit to conclude"+ ? tx(" · commit to conclude"): ""}</span>{conflicts > 0 && (@@ -161,7 +161,7 @@ export function OperationBanner() {disabled={!!busy || (c === "continue" && conflicts > 0)}onClick={() => void controlOperation(c, op)}>- {c === "continue" ? "Continue" : c === "skip" ? "Skip" : "Abort"}+ {c === "continue" ? tx("Continue") : c === "skip" ? tx("Skip") : tx("Abort")}</button>))}</div>@@ -266,7 +266,7 @@ function ResetDialog({ commit, onClose }: { commit?: Commit; onClose: () => void{ label: "Cancel", role: "cancel" },]}>- <div className={styles.form} role="radiogroup" aria-label="Reset type">+ <div className={styles.form} role="radiogroup" aria-label={tx("Reset type")}>{commit ? (<div className={styles.hint}><T>@@ -398,7 +398,7 @@ function TagDialog({ onClose }: { onClose: () => void }) {className={styles.textarea}rows={4}value={message}- placeholder="Optional; creates an annotated tag"+ placeholder={tx("Optional; creates an annotated tag")}onChange={(e) => setMessage(e.target.value)}/></div>diff --git a/src/features/vcs/patches.tsx b/src/features/vcs/patches.tsxindex 1ed9c86d3..3cc9f70c2 100644--- a/src/features/vcs/patches.tsx+++ b/src/features/vcs/patches.tsx@@ -114,7 +114,7 @@ function CreatePatchDialog({ origin, onClose }: { origin: PatchOrigin; onClose:: `${origin.commits.length} commits`}</div>)}- <div className={styles.form} role="radiogroup" aria-label="Patch destination">+ <div className={styles.form} role="radiogroup" aria-label={tx("Patch destination")}><label className={styles.radioRow}><input type="radio" name="dest" checked={toFile} onChange={() => setToFile(true)} /><span className={styles.radioText}>@@ -220,7 +220,9 @@ function ApplyPatchDialog({ patch, source, onClose }: { patch: string; source: sfooterStart={files && failing > 0 ? (<span className={styles.hint}>- {failing} file{failing === 1 ? "" : "s"} will be merged; conflicts open in the merge tool+ {failing === 1+ ? tx`${failing} file will be merged; conflicts open in the merge tool`+ : tx`${failing} files will be merged; conflicts open in the merge tool`}</span>) : undefined}diff --git a/src/features/vcs/rebase.tsx b/src/features/vcs/rebase.tsxindex e351e5267..d08de6bee 100644--- a/src/features/vcs/rebase.tsx+++ b/src/features/vcs/rebase.tsx@@ -260,7 +260,7 @@ function MessageDialog({<div className={styles.form}><textareadata-autofocus- aria-label="Commit message"+ aria-label={tx("Commit message")}className={styles.textarea}rows={8}value={message}@@ -306,7 +306,7 @@ function InteractiveRebaseDialog({ range, onClose }: { range: RebaseRange; onClo<div className={styles.section}><T>Commits are applied from top to bottom.</T></div>- <div className={styles.rebaseList} role="list" aria-label="Commits to rebase">+ <div className={styles.rebaseList} role="list" aria-label={tx("Commits to rebase")}>{rows.map((r, i) => (<div key={r.commit.id} className={styles.rebaseRow} role="listitem"><Select<RebaseAction>diff --git a/src/features/vcs/remoteUi.tsx b/src/features/vcs/remoteUi.tsxindex 5684327a9..b9be0f8ea 100644--- a/src/features/vcs/remoteUi.tsx+++ b/src/features/vcs/remoteUi.tsx@@ -48,7 +48,7 @@ function UpdateDialog({ onClose }: { onClose: () => void }) {<div className={styles.hint}>{branch?.upstream? `Update ${branch.head ?? "HEAD"} from ${branch.upstream}${branch.behind ? ` (${branch.behind} incoming)` : ""}`- : "The current branch has no tracked branch; git pull may fail."}+ : tx("The current branch has no tracked branch; git pull may fail.")}</div><div className={styles.fieldLabel}><T>Update type:</T>@@ -237,7 +237,11 @@ function MultiPushDialog({ onClose }: { onClose: () => void }) {onActivate={(r, _i, e) => {if (r.type === "repo" && !(e.target as HTMLElement | null)?.closest?.("label")) toggle(r.repo.root);}}- empty={<span>Everything is up to date</span>}+ empty={+ <span>+ <T>Everything is up to date</T>+ </span>+ }renderItem={(r) =>r.type === "repo" ? (<span className={styles.commitRow} style={{ flex: 1, padding: 0 }}>@@ -390,12 +394,12 @@ function PushDialog({ target: pushTarget, onClose }: { target: PushTarget; onClo><div className={styles.section}>{!head- ? "HEAD is detached; check out a branch to push."+ ? tx("HEAD is detached; check out a branch to push."): upstream? `${head}${revision ? ` up to ${revision.slice(0, 8)}` : ""} → ${remote}/`: revision- ? `${head} has no upstream: commits up to ${revision.slice(0, 8)} will be pushed as a new branch:`- : `${head} has no upstream: it will be pushed as a new branch and tracked:`}+ ? tx`${head} has no upstream: commits up to ${revision.slice(0, 8)} will be pushed as a new branch:`+ : tx`${head} has no upstream: it will be pushed as a new branch and tracked:`}{head && (<Inputaria-label="Target branch"@@ -421,7 +425,7 @@ function PushDialog({ target: pushTarget, onClose }: { target: PushTarget; onClorowHeight={22}aria-label="Outgoing commits"className={styles.boxList}- empty={<span>{upstream ? "Everything is up to date" : "No commits"}</span>}+ empty={<span>{upstream ? tx("Everything is up to date") : "No commits"}</span>}renderItem={(c) => (<span className={styles.commitRow} style={{ flex: 1, padding: 0 }}><span className={styles.commitHash}>{c.shortId}</span>diff --git a/src/features/vcs/shelf.tsx b/src/features/vcs/shelf.tsxindex 092391103..b211f29f1 100644--- a/src/features/vcs/shelf.tsx+++ b/src/features/vcs/shelf.tsx@@ -14,7 +14,7 @@ import { groupOf } from "./changes";import { activeList, listOf, moveFiles, relOf, updateChangelists, useChangelists } from "./changelists";import { useCommit } from "./commitStore";import { confirmDialog, openDialog, promptText } from "./dialogs";-import { KIND_COLOR, baseName, dirName, effectiveKind, formatTime, relTo, stripSlash } from "./model";+import { KIND_COLOR, baseName, dirName, effectiveKind, fileCount, formatTime, relTo, stripSlash } from "./model";import { errorMessage, logConsole, runOp, saveAll } from "./ops";import { conflictedFiles, refreshNow, useVcs } from "./store";import styles from "./common.module.css";@@ -155,8 +155,9 @@ function ShelveDialog({]}><div className={styles.section}>- {selected.size} of {files.length} file{files.length === 1 ? "" : "s"} will be shelved and reverted in the- working tree.+ {files.length === 1+ ? tx`${selected.size} of ${files.length} file will be shelved and reverted in the working tree.`+ : tx`${selected.size} of ${files.length} files will be shelved and reverted in the working tree.`}</div><FileChecklist files={files} selected={selected} onChange={setSelected} label="Files to shelve" /><div className={styles.form}>@@ -221,7 +222,7 @@ function UnshelveDialog({ entry, onClose }: { entry: ShelvedChangeList; onClose:]}><div className={styles.section}>- {entry.name} · {entry.files.length} file{entry.files.length === 1 ? "" : "s"}+ {entry.name} · {fileCount(entry.files.length)}</div><div className={styles.form}><label className={styles.fieldLabel}>@@ -316,7 +317,7 @@ export function ShelfPanel() {const current = roots.find((r) => selected.has(r.key) || r.children?.some((c) => selected.has(c.key)))?.entry;return (<div className={viewStyles.changes}>- <div className={viewStyles.toolbar} role="toolbar" aria-label="Shelf">+ <div className={viewStyles.toolbar} role="toolbar" aria-label={tx("Shelf")}><IconButton icon="refresh" title="Refresh" size="small" onClick={() => void loadShelves()} /><IconButton icon="shelve" action="vcs.shelve" size="small" /><span className={viewStyles.sep} />@@ -354,7 +355,7 @@ export function ShelfPanel() {}}onContextMenu={(node, _sel, e: MouseEvent) => node && showContextMenu(e, shelfMenu(node.entry))}aria-label="Shelved changes"- empty={<span className={viewStyles.empty}>{loaded ? "No shelved changes" : "Loading…"}</span>}+ empty={<span className={viewStyles.empty}>{loaded ? tx("No shelved changes") : "Loading…"}</span>}renderNode={(n) =>n.file ? (<>@@ -372,7 +373,7 @@ export function ShelfPanel() {<Icon name="shelve" size={16} className={viewStyles.icon} /><span className={viewStyles.label}>{n.entry.name}</span><span className={viewStyles.detail}>- {n.entry.files.length} file{n.entry.files.length === 1 ? "" : "s"}+ {fileCount(n.entry.files.length)}{n.entry.timeMs ? ` · ${formatTime(n.entry.timeMs)}` : ""}</span></>diff --git a/src/features/viewers/HexViewer.tsx b/src/features/viewers/HexViewer.tsxindex 98e5f8762..6bf2aef22 100644--- a/src/features/viewers/HexViewer.tsx+++ b/src/features/viewers/HexViewer.tsx@@ -25,6 +25,7 @@ import {} from "./hex";import { useForwardFocus } from "./forwardFocus";import styles from "./Viewers.module.css";+import { tx } from "@/platform/i18n";const ROW_H = 20;const COLUMNS = Array.from({ length: BYTES_PER_ROW }, (_, i) => i);@@ -167,15 +168,15 @@ export function HexViewer({ input }: { input: EditorInput }) {return (<div className={styles.root}>- <div className={styles.toolbar} role="toolbar" aria-label="Hex view">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Hex view")}><Icon name="lock" size={14} /><span className={styles.info}>- {data?.binary === false ? "Large file" : "Binary file"} · {formatSize(total)} · read-only+ {data?.binary === false ? tx("Large file") : tx("Binary file")} · {formatSize(total)} · {tx("read-only")}</span><div className={styles.spacer} />{selected !== null && (<span className={styles.info}>- Offset 0x{formatOffset(selected, 1)} ({selected})+ {tx`Offset 0x${formatOffset(selected, 1)} (${selected})`}{selectedByte !== undefined && ` · 0x${hexByte(selectedByte)} = ${selectedByte}`}</span>)}@@ -190,7 +191,7 @@ export function HexViewer({ input }: { input: EditorInput }) {)}</div>{error ? (- <div className={styles.message}>Cannot read the file: {error}</div>+ <div className={styles.message}>{tx`Cannot read the file: ${error}`}</div>) : (<><div className={styles.hexHeader} style={{ height: ROW_H }} aria-hidden="true">diff --git a/src/features/viewers/ImageViewer.tsx b/src/features/viewers/ImageViewer.tsxindex a8a36bc12..a54a1ee22 100644--- a/src/features/viewers/ImageViewer.tsx+++ b/src/features/viewers/ImageViewer.tsx@@ -14,6 +14,7 @@ import { formatSize, isSvgPath } from "./fileKinds";import { fitZoom, initialZoom, stepZoom, zoomLabel } from "./imageZoom";import { useForwardFocus } from "./forwardFocus";import styles from "./Viewers.module.css";+import { tx } from "@/platform/i18n";export interface ImageViewerHandle {zoom(dir: 1 | -1): void;@@ -147,7 +148,7 @@ export function ImageViewer({ input }: { input: EditorInput }) {if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setContext("imageViewerFocus", false);}}>- <div className={styles.toolbar} role="toolbar" aria-label="Image viewer">+ <div className={styles.toolbar} role="toolbar" aria-label={tx("Image viewer")}><IconButton icon="zoom-in" size="small" action="image.zoomIn" /><IconButton icon="zoom-out" size="small" action="image.zoomOut" /><IconButton icon="actual-size" size="small" action="image.actualSize" />@@ -176,7 +177,7 @@ export function ImageViewer({ input }: { input: EditorInput }) {)}</div>{error ? (- <div className={styles.message}>Cannot show the image: {error}</div>+ <div className={styles.message}>{tx`Cannot show the image: ${error}`}</div>) : (<div ref={canvasRef} className={styles.canvas} onWheel={onWheel}>{src && (diff --git a/src/features/viewers/markdown/MarkdownEditor.tsx b/src/features/viewers/markdown/MarkdownEditor.tsxindex f218bacc0..d76ef6da6 100644--- a/src/features/viewers/markdown/MarkdownEditor.tsx+++ b/src/features/viewers/markdown/MarkdownEditor.tsx@@ -25,6 +25,7 @@ import { hasMermaid, MERMAID_SELECTOR, renderMermaidIn, subscribeTheme, themeKeyimport { modeOf, useMarkdownModes } from "./modes";import { ANCHOR_PREFIX, previewOffsetForLine, renderMarkdown, resolveLink, slugify } from "./render";import styles from "./Markdown.module.css";+import { tx } from "@/platform/i18n";/** Loaded local images by absolute path (data URLs), shared by all previews. */const imageCache = new Map<string, Promise<string>>();@@ -52,7 +53,7 @@ export function MarkdownEditor({ path, children }: { path: string; tabId: string<div className={clsx(styles.split, styles[`mode-${mode}`])}><div className={styles.editor}>{children}</div>{mode !== "editor" && <MarkdownPreview path={path} sync={mode === "split"} />}- <div className={styles.modeBar} role="toolbar" aria-label="Markdown editor layout">+ <div className={styles.modeBar} role="toolbar" aria-label={tx("Markdown editor layout")}><IconButtonicon="edit"size="small"@@ -174,7 +175,7 @@ function MarkdownPreview({ path, sync }: { path: string; sync: boolean }) {style={{ "--markdown-font-zoom": `${fontZoom}px` } as CSSProperties}tabIndex={-1}role="document"- aria-label="Markdown preview"+ aria-label={tx("Markdown preview")}onClick={onClick}dangerouslySetInnerHTML={{ __html: html }}/>diff --git a/src/features/vim/VimSettingsPage.tsx b/src/features/vim/VimSettingsPage.tsxindex b0df4f57a..5639ef7d3 100644--- a/src/features/vim/VimSettingsPage.tsx+++ b/src/features/vim/VimSettingsPage.tsx@@ -41,7 +41,7 @@ export function VimSettingsPage() {label="Enable Vim emulation"/>- <section className={styles.section} aria-label="Vim rc file">+ <section className={styles.section} aria-label={tx("Vim rc file")}><div className={styles.header}><span><T>Configuration file</T>@@ -66,7 +66,7 @@ export function VimSettingsPage() {</T></p>{rc.ignored.length > 0 && (- <ul className={styles.ignored} aria-label="Ignored lines">+ <ul className={styles.ignored} aria-label={tx("Ignored lines")}>{rc.ignored.map((i) => (<li key={i.line}><span className={styles.mono}>@@ -79,7 +79,7 @@ export function VimSettingsPage() {)}</section>- <section className={styles.section} aria-label="Shortcut conflicts">+ <section className={styles.section} aria-label={tx("Shortcut conflicts")}><div className={styles.header}><span><T>Shortcut conflicts</T>diff --git a/src/features/web/WebEditor.tsx b/src/features/web/WebEditor.tsxindex 27fc5e182..9d272c95e 100644--- a/src/features/web/WebEditor.tsx+++ b/src/features/web/WebEditor.tsx@@ -10,6 +10,7 @@ import { useProject } from "@/platform/project";import { IconButton } from "@/ui";import { browserIcon, openInBrowser, useBrowsers, useWebPreview, webUrl } from "./browsers";import styles from "./Web.module.css";+import { tx } from "@/platform/i18n";const RELOAD_DELAY = 250;@@ -20,7 +21,7 @@ export function WebEditor({ path, children }: { path: string; tabId: string; chi<div className={clsx(styles.split, preview && styles.withPreview)}><div className={styles.editor}>{children}- <div className={styles.bar} role="toolbar" aria-label="Open in browser">+ <div className={styles.bar} role="toolbar" aria-label={tx("Open in browser")}><IconButtonicon="eye"size="small"@@ -89,7 +90,7 @@ function WebPreview({ path }: { path: string }) {<iframekey={seq}className={styles.preview}- title="HTML preview"+ title={tx("HTML preview")}src={url}sandbox="allow-scripts allow-same-origin allow-forms allow-modals allow-popups"/>diff --git a/src/features/welcome/CustomizePage.tsx b/src/features/welcome/CustomizePage.tsxindex cd334ae09..a996374b6 100644--- a/src/features/welcome/CustomizePage.tsx+++ b/src/features/welcome/CustomizePage.tsx@@ -14,6 +14,7 @@ import { ACCENT_PRESETS, DEFAULT_ACCENT } from "@/workbench/theme";import { reopenEnabled, setReopenPreference, useSession } from "./session";import styles from "./Welcome.module.css";import { BUILTIN_THEMES, isBuiltinTheme, type BuiltinThemeId } from "@/platform/themes";+import { tx } from "@/platform/i18n";type Theme = BuiltinThemeId;@@ -130,7 +131,7 @@ export function CustomizePage() {/></Field><Field label="Accent color">- <div className={styles.swatches} role="radiogroup" aria-label="Accent color">+ <div className={styles.swatches} role="radiogroup" aria-label={tx("Accent color")}>{ACCENT_PRESETS.map((p) => (<buttonkey={p.value}diff --git a/src/features/welcome/ProjectPopup.tsx b/src/features/welcome/ProjectPopup.tsxindex 96bf17230..39e2ecf22 100644--- a/src/features/welcome/ProjectPopup.tsx+++ b/src/features/welcome/ProjectPopup.tsx@@ -7,6 +7,7 @@ import type { ProjectPopupProps } from "@/workbench/contributions";import { askRemoveRecent, ProjectBadge, recentMenu } from "./RecentList";import { filterRecent, loadRecent, openRecent, useRecent, type RecentMatch } from "./recent";import styles from "./ProjectPopup.module.css";+import { tx } from "@/platform/i18n";type Entry ={ kind: "action"; id: string; label: string; icon: IconName } | { kind: "project"; open: boolean; m: RecentMatch };@@ -120,7 +121,7 @@ export function ProjectPopup({ anchor, onClose }: ProjectPopupProps) {onKeyDown={onKeyDown}className={styles.inner}role="listbox"- aria-label="Projects"+ aria-label={tx("Projects")}>{query && (<div className={styles.search} aria-live="polite">diff --git a/src/features/welcome/ProjectsPage.tsx b/src/features/welcome/ProjectsPage.tsxindex 13c3da41a..5e29e9e9d 100644--- a/src/features/welcome/ProjectsPage.tsx+++ b/src/features/welcome/ProjectsPage.tsx@@ -62,9 +62,11 @@ function Landing() {<T>Welcome to OpenIDEA</T></div><p className={styles.landingText}>- Open a folder from disk{canClone ? " or clone a repository from version control" : ""}.+ {canClone+ ? tx("Open a folder from disk or clone a repository from version control.")+ : tx("Open a folder from disk.")}<br />- You can also drop a folder onto this window.+ <T>You can also drop a folder onto this window.</T></p><div className={styles.landingActions}><button@@ -257,7 +259,7 @@ export function ProjectsPage() {<divid={`${baseId}-list`}role="listbox"- aria-label="Recent projects"+ aria-label={tx("Recent projects")}tabIndex={-1}className={styles.projectList}onKeyDown={onKeyDown}diff --git a/src/features/welcome/RecentList.tsx b/src/features/welcome/RecentList.tsxindex fac322948..4daccc5b9 100644--- a/src/features/welcome/RecentList.tsx+++ b/src/features/welcome/RecentList.tsx@@ -239,7 +239,9 @@ export function RecentList({ exclude, compact, autoFocus, onOpened, className, tshowContextMenu(e, recentMenu(m.project, onOpened));}}renderItem={(m, s) => <RecentRow m={m} active={s.active} compact={compact} onOpened={onOpened} />}- empty={<span className={styles.noMatches}>{query ? "No matching projects" : "No recent projects"}</span>}+ empty={+ <span className={styles.noMatches}>{query ? tx("No matching projects") : tx("No recent projects")}</span>+ }/></div>);diff --git a/src/features/welcome/WelcomeView.tsx b/src/features/welcome/WelcomeView.tsxindex 5599bf7b7..a9f276c91 100644--- a/src/features/welcome/WelcomeView.tsx+++ b/src/features/welcome/WelcomeView.tsx@@ -2,7 +2,7 @@import { useEffect, useRef, useState } from "react";import clsx from "clsx";import { executeAction } from "@/platform/actions";-import { useT, useTx } from "@/platform/i18n";+import { useT, useTx, tx } from "@/platform/i18n";import { isTauri } from "@/platform/ipc";import { useProject } from "@/platform/project";import { useRemoteProgress } from "@/platform/remote";@@ -169,7 +169,7 @@ export function WelcomeView() {</span></div><p className={styles.tagline}>{t("app.about.tagline")}</p>- <nav className={styles.nav} aria-label="Welcome">+ <nav className={styles.nav} aria-label={tx("Welcome")}><NavItem id="projects" label="Projects" page={shown} onSelect={setPage} /><NavItem id="customize" label="Customize" page={shown} onSelect={setPage} />{Plugins && <NavItem id="plugins" label="Plugins" page={shown} onSelect={setPage} />}diff --git a/src/platform/i18n.test.ts b/src/platform/i18n.test.tsindex 1601395c7..4c26a97f0 100644--- a/src/platform/i18n.test.ts+++ b/src/platform/i18n.test.ts@@ -117,6 +117,13 @@ describe("t / locales", () => {expect(tx(undefined)).toBeUndefined();});+ it("translates a tx tag without values like the same text as a string", async () => {+ await setLocale("zh");+ expect(tx`Sync with OS`).toBe("与操作系统同步");+ expect(tx`Sync with OS`).toBe(tx("Sync with OS"));+ expect(tx`Some text nobody translated`).toBe("Some text nobody translated");+ });+it("matches source-text templates, translating the substituted text", async () => {expect(txTemplate("Push failed")).toBe("Push failed");await setLocale("zh");diff --git a/src/platform/i18n.ts b/src/platform/i18n.tsindex 014cc8748..8e477b291 100644--- a/src/platform/i18n.ts+++ b/src/platform/i18n.ts@@ -189,6 +189,8 @@ export function useTx(): typeof tx {}function translateSource(texts: Catalog, text: string | TemplateStringsArray | undefined, values: unknown[]) {+ // A tag without `${}` spells out its whole text, which is looked up as written.+ if (text !== undefined && typeof text !== "string" && !values.length) text = text[0]!;if (text === undefined || typeof text === "string") return text && (texts[text] ?? rebuild(texts, text) ?? text);return buildText(texts, { strings: text, values });}diff --git a/src/platform/locales/en.json b/src/platform/locales/en.jsonindex fa87c8a9e..ba42766c4 100644--- a/src/platform/locales/en.json+++ b/src/platform/locales/en.json@@ -70,6 +70,11 @@"common.close": "Close","common.copied": "Copied","common.copy": "Copy",+ "github.prState.all": "All",+ "github.prState.closed": "Closed",+ "github.prState.draft": "Draft",+ "github.prState.merged": "Merged",+ "github.prState.open": "Open","menu.app": "OpenIDEA","menu.app.about": "About OpenIDEA","menu.app.checkForUpdates": "Check for Updates…",diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.jsonindex 053b9b934..96a4bba59 100644--- a/src/platform/locales/text/zh.json+++ b/src/platform/locales/text/zh.json@@ -1,9 +1,5 @@{- "' and its usages to:": "' 及其用法移动到:",- "' to:": "' 为:","(does not exist)": "(不存在)",- ") and choose “Open in Find Window”.": ") 并选择“在查找窗口中打开”。",- ") contain CRLF line separators and core.autocrlf is not set, so they would be committed with CRLF. Convert them with the line separator widget in the status bar, or set": ") 包含 CRLF 行分隔符且未设置 core.autocrlf,因此将以 CRLF 提交。请使用状态栏中的行分隔符组件进行转换,或设置",", e.g.": ",例如",", then press Tab.": ",然后按 Tab。","? This cannot be undone.": "?此操作无法撤消。",@@ -108,7 +104,6 @@"As typed": "按输入","Ask": "询问","Asks for a value when the tool runs": "工具运行时询问一个值",- "Assignees:": "负责人:","Async function": "异步函数","Async test case": "异步测试用例","Attach Debugger": "附加调试器",@@ -210,7 +205,6 @@"Cannot profile '{name}'": "无法分析 '{name}'","Cannot put label": "无法添加标签","Cannot read data sources": "无法读取数据源",- "Cannot read the file:": "无法读取文件:","Cannot read the patch": "无法读取补丁","Cannot reload Gradle projects": "无法重新加载 Gradle 项目","Cannot reload Maven projects": "无法重新加载 Maven 项目",@@ -223,7 +217,6 @@"Cannot save run configurations": "无法保存运行配置","Cannot save setting": "无法保存设置","Cannot send the request": "无法发送请求",- "Cannot show the image:": "无法显示图像:","Cannot stop process": "无法停止进程","Cannot undo": "无法撤消","Caret blinking (ms):": "光标闪烁(毫秒):",@@ -252,7 +245,6 @@"Checkout Tag or Revision…": "签出标签或修订…","Checkout branch": "签出分支","Checks out the selected pull request, a number given as argument, or asks for one.": "签出所选拉取请求或参数指定编号的拉取请求,否则询问编号。",- "Checks ·": "检查 ·","Cherry-Pick": "拣选","Children": "子项","Choose Content to Paste": "选择要粘贴的内容",@@ -302,7 +294,6 @@"Close non-modified files first": "优先关闭未修改的文件","Close performance overlay": "关闭性能浮层","Close session when it ends": "会话结束时关闭",- "Closed": "已关闭","Closing Policy": "关闭策略","Code": "代码","Code Completion": "代码补全",@@ -430,7 +421,6 @@"Could not open the folder picker": "无法打开文件夹选择器","Could not reach GitHub": "无法连接到 GitHub","Could not save": "无法保存",- "Could not save:": "无法保存:","Could not submit the review": "无法提交审查","Coverage": "覆盖率","Coverage is hidden in editors and the project view.": "覆盖率已在编辑器和项目视图中隐藏。",@@ -510,7 +500,6 @@"Default encoding": "默认编码","Default encoding for properties files": "属性文件的默认编码","Default value": "默认值",- "Defaults from the": "默认值来自","Definition": "定义","Delete": "删除","Delete Anyway": "仍然删除",@@ -763,7 +752,6 @@"Fold console lines that contain": "折叠包含以下内容的控制台行","Folders containing modified files are coloured in the Project tool window.": "包含已修改文件的文件夹会在“项目”工具窗口中着色。","Folding": "折叠",- "Follows the IDE theme: currently": "跟随 IDE 主题:当前为","Font": "字体","Font preview": "字体预览","For protanopia and deuteranopia.": "适用于红色盲和绿色盲。",@@ -945,7 +933,6 @@"Introduce Parameter…": "引入形参…","Introduce Variable…": "引入变量…","Invalid": "无效",- "Invalid pattern:": "无效的模式:","Invalidate Caches": "清除缓存","Invalidate Caches…": "清除缓存…","Invalidate and Restart": "清除并重启",@@ -982,7 +969,6 @@"Kind": "类型","Kind label": "类型标签","Kinds": "类型",- "Label '": "标签 '","Label name:": "标签名称:","Language": "语言","Language Defaults": "语言默认值",@@ -1038,7 +1024,7 @@"Location": "位置","Location:": "位置:","Log": "日志",- "Log filters": "日志过滤器",+ "Log filters": "日志筛选器","Long tasks": "长任务","Looking for references…": "正在查找引用…","Looks for TODO and FIXME in added lines.": "在新增的行中查找 TODO 和 FIXME。",@@ -1080,8 +1066,6 @@"Merge and Push": "合并并推送","Merge conflicts": "合并冲突","Merge incoming changes into the current branch": "将传入的更改合并到当前分支",- "Merge of": "合并自",- "Merged": "已合并","Merge…": "合并…","Message:": "消息:","Method": "方法",@@ -1181,9 +1165,7 @@"No TODO items in this file": "此文件中没有 TODO 项","No active editor": "没有活动编辑器","No antialiasing": "无抗锯齿",- "No attachable processes": "没有可附加的进程","No backend caches to clear": "没有要清除的后端缓存",- "No bookmarks yet. Toggle a line bookmark with": "还没有书签。切换行书签:","No breakpoints. Click a line number to add one.": "没有断点。点击行号即可添加。","No build output": "没有构建输出","No changes": "没有更改",@@ -1209,7 +1191,6 @@"No language server available": "没有可用的语言服务器","No languages": "没有语言","No local changes": "没有本地更改",- "No local history for this": "此项没有本地历史记录:","No matches": "没有匹配项","No matching branches": "没有匹配的分支","No matching languages": "没有匹配的语言",@@ -1264,7 +1245,6 @@"Object Actions": "对象操作","Occurrences": "匹配项","Occurrences of selected text": "所选文本的匹配项",- "Offset 0x": "偏移 0x","Older output is discarded": "较早的输出将被丢弃","Only in comments": "仅在注释中","Only one usage in Project Files": "项目文件中只有一个用法",@@ -1282,7 +1262,6 @@"Open a file to annotate it": "请打开一个文件进行注解","Open a file to show its local history": "请打开一个文件以显示其本地历史记录","Open a folder": "打开文件夹",- "Open a folder from disk": "从磁盘打开文件夹","Open a project first": "请先打开一个项目","Open a project to configure its folders.": "请打开一个项目以配置其文件夹。","Open as Text": "作为文本打开",@@ -1323,7 +1302,6 @@"Otherwise line breakpoints can only be set in files of languages that have a debugger.": "否则只能在有调试器的语言文件中设置行断点。","Outgoing commits": "传出的提交","Output": "输出",- "Over budget (": "超出预算(","Override IDE shortcuts": "覆盖 IDE 快捷键","Override Members": "重写成员","Override console cycle buffer size": "覆盖控制台循环缓冲区大小",@@ -1496,7 +1474,6 @@"Re-check installed tools": "重新检查已安装的工具","Re-reads the effective POMs and dependency trees with Maven": "使用 Maven 重新读取有效 POM 和依赖树","Re-reads the task list with Gradle": "使用 Gradle 重新读取任务列表",- "Reached from the SSH host": "从 SSH 主机访问","React useEffect hook": "React useEffect Hook","React useState hook": "React useState Hook","Read-only": "只读",@@ -1525,7 +1502,6 @@"Refactor This": "重构此项","Refactor This…": "重构此项…","Refactoring undone": "重构已撤消",- "References to update:": "要更新的引用:","Reformat Code": "重新格式化代码","Reformat File": "重新格式化文件","Reformat code": "重新格式化代码",@@ -1605,7 +1581,6 @@"Replace this occurrence only": "仅替换此匹配项","Replace with": "替换为","Replacements": "替换项",- "Replacing…": "正在替换…","Reports errors and warnings from language servers.": "报告来自语言服务器的错误和警告。","Repository": "仓库","Request": "请求",@@ -1823,7 +1798,6 @@"Select in Project View": "在项目视图中选择","Selection": "所选内容","Select…": "选择…",- "Sending request #": "正在发送请求 #","Services": "服务","Services actions": "服务操作","Session finished": "会话已结束",@@ -1965,10 +1939,9 @@"Standard library": "标准库","Start": "启动","Start Container": "启动容器",- "Start Docker": "启动 Docker","Start Rebasing": "开始变基","Start a debug configuration with": "启动调试配置:",- "Start a debug session to see the exception filters of its adapter.": "启动调试会话即可查看其适配器的异常过滤器。",+ "Start a debug session to see the exception filters of its adapter.": "启动调试会话即可查看其适配器的异常筛选器。","Start debugging a run configuration": "开始调试运行配置","Start directory": "起始目录","Startup": "启动",@@ -2026,7 +1999,7 @@"System-Dependent": "取决于系统","Tests failed: {detail}": "测试失败:{detail}","TODO comment": "TODO 注释",- "TODO filters": "TODO 过滤器",+ "TODO filters": "TODO 筛选器","TODO items": "TODO 项","TODO items unavailable": "TODO 项不可用","TODO patterns": "TODO 模式",@@ -2206,7 +2179,6 @@"Use DROP CASCADE syntax": "使用 DROP CASCADE 语法","Use Default Theme": "使用默认主题","Use Find Usages (⌥F7) on a symbol to see its usages here": "对符号使用查找用法 (⌥F7),即可在此查看其用法",- "Use Find in Files (": "使用“在文件中查找”(","Use IF EXISTS syntax": "使用 IF EXISTS 语法","Use Option as Meta key": "将 Option 用作 Meta 键","Use SSH tunnel": "使用 SSH 隧道",@@ -2252,11 +2224,10 @@"Virtualenv Environment": "Virtualenv 环境","Virtualenv Location": "Virtualenv 位置","Visual guides": "视觉参考线",- "WHERE filter": "WHERE 过滤器",+ "WHERE filter": "WHERE 筛选器","Warn if CRLF line separators are about to be committed": "即将提交 CRLF 行分隔符时发出警告","Warn when committing in detached HEAD or during rebase": "在分离的 HEAD 中或变基期间提交时发出警告","Warning": "警告",- "Watching": "监视","Welcome": "欢迎","Welcome to OpenIDEA": "欢迎使用 OpenIDEA","What's New": "新功能",@@ -2278,7 +2249,6 @@"Zoom": "缩放","Zoom In IDE": "放大 IDE","Zoom Out IDE": "缩小 IDE",- "Zoomed into": "已放大到","a dollar sign. Leading tabs are indent units.": "美元符号。前导制表符表示缩进单位。","any number of nodes (arguments, statements). A placeholder used twice must match equal code.": "匹配任意数量的节点(实参、语句)。使用两次的占位符必须匹配相同的代码。","any, rust, typescript…": "any、rust、typescript…",@@ -2290,17 +2260,13 @@"current branch": "当前分支","debugpy is not installed": "未安装 debugpy","delete specific rows from a table": "从表中删除特定行",- "detected from": "检测自",- "earlier lines were discarded": "较早的行已丢弃","failed to load": "加载失败","for loop": "for 循环","for range loop": "for range 循环","for…in loop": "for…in 循环","for…of loop": "for…of 循环",- "found in the changed lines:": "在更改的行中找到:","from packageManager / lock file": "来自 packageManager / 锁文件","from ~/.ssh/config": "来自 ~/.ssh/config",- "has been resolved and staged.": "已解决并暂存。","host or ~/.ssh/config alias": "主机或 ~/.ssh/config 别名","if statement": "if 语句","impl block": "impl 块",@@ -2311,11 +2277,9 @@"is already assigned to:": "已分配给:","is omitted (with one following blank line) when there is no package.": "的行在没有软件包时会被省略(连同其后的一个空行)。","is on PATH.": "位于 PATH 中。",- "language definition:": "语言定义:","last · p50 · p95 · max": "最近 · p50 · p95 · 最大","let binding": "let 绑定","let mut binding": "let mut 绑定",- "library frames hidden": "个库帧已隐藏","main function": "main 函数","main function with __main__ guard": "带 __main__ 守卫的 main 函数","main() function": "main() 函数",@@ -2331,7 +2295,6 @@"no symbols": "没有符号","not found": "未找到","not installed in this project": "此项目中未安装",- "occurrences ·": "个匹配项 ·","or click a line number to set a breakpoint.": "或点击行号设置断点。","per module, the JDK of its Java version": "按模块使用与其 Java 版本匹配的 JDK","the project JDK if new enough, else the first installed JDK that is": "项目 JDK 版本足够时使用它,否则使用第一个版本足够的已安装 JDK",@@ -2339,7 +2302,6 @@"places the caret. A line with": "放置光标。包含","println! with Debug": "使用 Debug 的 println!","pytest test function": "pytest 测试函数",- "renamed from": "重命名自","replaced ·": "已替换 ·","rust-analyzer runs the tool after each save and reports its diagnostics.": "rust-analyzer 会在每次保存后运行该工具并报告其诊断。","select a limited number of rows from a table": "从表中选择有限数量的行",@@ -2353,8 +2315,6 @@"var declaration": "var 声明","variables (repeated ones are linked),": "变量(重复的变量会联动),","via the gear menu › Install Plugin from Disk….": "通过齿轮菜单 › 从磁盘安装插件…。",- "will be reverted to their last committed state. Uncommitted changes are lost.": "将还原到上次提交的状态。未提交的更改将会丢失。",- "will be shelved and reverted in the working tree.": "将被搁置,并在工作树中还原。","with BOM": "带 BOM","with BOM under Windows, with no BOM otherwise": "在 Windows 下带 BOM,其他系统不带 BOM","with NO BOM": "不带 BOM",@@ -2366,7 +2326,6 @@"{name} installed": "{name} 已安装","{name} is not installed": "{name} 未安装","· Conflicts": "· 冲突",- "· read-only": "· 只读","↵ Open · ⇧↵ Open to the side · ⌘↵ Open in Find Window": "↵ 打开 · ⇧↵ 在侧边打开 · ⌘↵ 在查找窗口中打开","⌘↵ to open in Find tool window": "⌘↵ 在“查找”工具窗口中打开","⌥← / ⌥→ and ⌥⌫ stop at humps of camelCase names.": "⌥← / ⌥→ 和 ⌥⌫ 会在 camelCase 名称的驼峰处停止。",@@ -4204,5 +4163,225 @@"Configure code editing: completion, folding, tabs, fonts, colors, code style and inspections.": "配置代码编辑:补全、折叠、标签页、字体、配色、代码样式和检查。","Configure build tools, run configurations, debugger and deployment.": "配置构建工具、运行配置、调试器和部署。","Configure language servers, interpreters, SDKs and framework support.": "配置语言服务器、解释器、SDK 和框架支持。",- "Configure external tools, terminal, database and other integrations.": "配置外部工具、终端、数据库和其他集成。"+ "Configure external tools, terminal, database and other integrations.": "配置外部工具、终端、数据库和其他集成。",+ "Unversioned Files": "未跟踪的文件",+ "Merge Conflicts": "合并冲突",+ "current": "当前",+ "No matching repositories or branches": "没有匹配的仓库或分支",+ "partial": "部分",+ "editable": "可编辑",+ "on {date}": "于 {date}",+ "Merge of {parents}": "合并自 {parents}",+ "renamed from {name}": "已从 {name} 重命名",+ "Label '{label}'": "标签“{label}”",+ "{n} file recorded before it": "在此之前记录了 {n} 个文件",+ "{n} files recorded before it": "在此之前记录了 {n} 个文件",+ "No local history for this folder yet": "此文件夹尚无本地历史记录",+ "No local history for this path yet": "此路径尚无本地历史记录",+ "{name} has been resolved and staged.": "{name} 已解决并暂存。",+ "{selected} of {total} file will be reverted to their last committed state. Uncommitted changes are lost.": "{selected}/{total} 个文件将还原到其最后一次提交的状态。未提交的更改将丢失。",+ "{selected} of {total} files will be reverted to their last committed state. Uncommitted changes are lost.": "{selected}/{total} 个文件将还原到其最后一次提交的状态。未提交的更改将丢失。",+ "Current branch: {branch}": "当前分支:{branch}",+ "{count} TODO item found in the changed lines:": "在更改的行中发现 {count} 个 TODO 项:",+ "{count} TODO items found in the changed lines:": "在更改的行中发现 {count} 个 TODO 项:",+ "{count} file ({names}) contain CRLF line separators and core.autocrlf is not set, so they would be committed with CRLF. Convert them with the line separator widget in the status bar, or set": "{count} 个文件({names})包含 CRLF 行分隔符且未设置 core.autocrlf,因此将以 CRLF 提交。请使用状态栏中的行分隔符组件进行转换,或设置",+ "{count} files ({names}) contain CRLF line separators and core.autocrlf is not set, so they would be committed with CRLF. Convert them with the line separator widget in the status bar, or set": "{count} 个文件({names})包含 CRLF 行分隔符且未设置 core.autocrlf,因此将以 CRLF 提交。请使用状态栏中的行分隔符组件进行转换,或设置",+ "Optional; creates an annotated tag": "可选;创建附注标签",+ "{count} file will be merged; conflicts open in the merge tool": "{count} 个文件将被合并;冲突将在合并工具中打开",+ "{count} files will be merged; conflicts open in the merge tool": "{count} 个文件将被合并;冲突将在合并工具中打开",+ "{selected} of {total} file will be shelved and reverted in the working tree.": "{selected}/{total} 个文件将被搁置,并在工作树中还原。",+ "{selected} of {total} files will be shelved and reverted in the working tree.": "{selected}/{total} 个文件将被搁置,并在工作树中还原。",+ "tokens": "token",+ "{count} occurrences · {lines} lines": "{count} 个匹配项 · {lines} 行",+ "{tokens} tokens": "{tokens} 个 token",+ "— no callers found": "— 未找到调用方",+ "— no callees found": "— 未找到被调用方",+ "— no supertypes found": "— 未找到超类型",+ "— no subtypes found": "— 未找到子类型",+ "({calls} calls)": "({calls} 次调用)",+ "Usages of {symbol}": "{symbol} 的用法",+ "{shown} of {total} found": "找到 {shown}/{total} 项",+ "{total} found": "找到 {total} 项",+ "Nothing matches '{filter}'": "没有与“{filter}”匹配的内容",+ "{shown} of {rowCount} rows": "{shown}/{rowCount} 行",+ "Local filter": "本地筛选器",+ "Rename {what} '{initial}' to:": "将{what}“{initial}”重命名为:",+ "Drop {kind}": "删除{kind}",+ "{count} row": "{count} 行",+ "(limit reached)": "(已达到上限)",+ "Reached from the SSH host {label}.": "通过 SSH 主机 {label} 访问。",+ "table": "表",+ "view": "视图",+ "materialized view": "物化视图",+ "column": "列",+ "index": "索引",+ "schema": "架构",+ "function": "函数",+ "procedure": "过程",+ "trigger": "触发器",+ "sequence": "序列",+ "data source": "数据源",+ "{count} library frames hidden": "已隐藏 {count} 个库帧",+ "unverified": "未验证",+ "temp": "临时",+ "Watching {dataId}": "正在监视 {dataId}",+ "No attachable processes match the filter.": "没有与筛选条件匹配的可附加进程。",+ "No attachable processes.": "没有可附加的进程。",+ "{failed} failing": "{failed} 个失败",+ "{pending} pending": "{pending} 个待处理",+ "{other} skipped": "{other} 个已跳过",+ "No checks": "没有检查",+ "Checks · {summary}": "检查 · {summary}",+ "Assignees: {list}": "被指派者:{list}",+ "{count} comments": "{count} 条评论",+ "outdated": "已过时",+ "Sending request #{n}…": "正在发送请求 #{n}…",+ "Memory & Diagnostics": "内存与诊断",+ "Over budget ({budget})": "超出预算({budget})",+ "dev": "开发",+ "{label}. Showing plugin packages available on this machine.": "{label}。显示此计算机上可用的插件包。",+ "Zoomed into {name}": "已缩放到 {name}",+ "Rename directory '{current}' and its usages to:": "将目录“{current}”及其用法重命名为:",+ "Rename file '{current}' and its usages to:": "将文件“{current}”及其用法重命名为:",+ "{count} occurrence": "{count} 个匹配项",+ "{count} occurrences": "{count} 个匹配项",+ "References to update: {a} in {b}": "要更新的引用:{b}中共 {a}",+ "Save '{name}' Configuration": "保存“{name}”配置",+ "test": "测试",+ "user": "用户",+ "temporary": "临时",+ "<{count} internal line>": "<{count} 条内部行>",+ "<{count} internal lines>": "<{count} 条内部行>",+ "{count} earlier lines were discarded": "已丢弃前面的 {count} 行",+ "{count} passed": "{count} 个通过",+ "{count} ignored": "{count} 个已忽略",+ "Running…": "正在运行…",+ "No tests": "没有测试",+ "Replacing… {done}/{total} files": "正在替换… {done}/{total} 个文件",+ "changed": "已更改",+ "Start Docker (context '{context}'); this view connects automatically.": "启动 Docker(上下文“{context}”);此视图将自动连接。",+ "Start Docker; this view connects automatically.": "启动 Docker;此视图将自动连接。",+ "Could not save: {error}": "无法保存:{error}",+ "{count} modified action": "已修改 {count} 个操作",+ "{count} modified actions": "已修改 {count} 个操作",+ "Runs “<base> -m venv <location>”; the new interpreter becomes the project interpreter.": "运行“<base> -m venv <location>”;新的解释器将成为项目解释器。",+ "{vendor} {version} is unpacked into a folder of its own in {location}, where JDK detection finds it.": "{vendor} {version} 将解压到 {location} 下它自己的文件夹中,JDK 检测会在那里找到它。",+ "detected from {source}": "检测自 {source}",+ "modified": "已修改",+ "seconds": "秒",+ "columns": "列",+ "Defaults from the {lang} language definition: tab.": "“{lang}”语言定义的默认值:制表符。",+ "Defaults from the {lang} language definition: {size} spaces.": "“{lang}”语言定义的默认值:{size} 个空格。",+ "Follows the IDE theme: currently {name}.": "跟随 IDE 主题:当前为 {name}。",+ "<Project>": "<项目>",+ "<none>": "<无>",+ "Invalid pattern: {patterns}": "模式无效:{patterns}",+ "Matches of an Issue ID regular expression in commit messages (Git log, commit details) become links; $0 is the whole match, $1… the groups.": "提交消息(Git 日志、提交详情)中与问题 ID 正则表达式匹配的内容将变为链接;$0 为完整匹配,$1… 为各分组。",+ "Abbreviation for <{tag}>, e.g.": "<{tag}> 的缩写,例如",+ "caret,": "光标位置,",+ "{count} item": "{count} 项",+ "Language servers and debug adapters used by the IDE. Missing tools can be installed into the IDE's own tools folder; nothing is downloaded until you click Install.": "IDE 使用的语言服务器和调试适配器。缺少的工具可以安装到 IDE 自己的工具文件夹中;在您点击“安装”之前不会下载任何内容。",+ "Large file": "大文件",+ "Binary file": "二进制文件",+ "read-only": "只读",+ "Offset 0x{hex} ({offset})": "偏移 0x{hex}({offset})",+ "Cannot read the file: {error}": "无法读取该文件:{error}",+ "Cannot show the image: {error}": "无法显示该图像:{error}",+ "HTML preview": "HTML 预览",+ "Open a folder from disk or clone a repository from version control.": "从磁盘打开文件夹,或从版本控制克隆仓库。",+ "Open a folder from disk.": "从磁盘打开文件夹。",+ "No bookmarks yet. Toggle a line bookmark with {key}": "还没有书签。使用 {key} 切换行书签",+ "Use Find in Files ({key}) and choose “Open in Find Window”.": "使用“在文件中查找”({key}),然后选择“在查找窗口中打开”。",+ "Build message": "构建消息",+ "Ignored lines": "已忽略的行",+ "Open in browser": "在浏览器中打开",+ "Plan node properties": "计划节点属性",+ "Values": "值",+ "Vim rc file": "Vim rc 文件",+ "Decompiled .class file: sources are not available.": "已反编译的 .class 文件:没有可用的源代码。",+ "No column of the file matches the table": "文件中没有与该表匹配的列",+ "Not a URL of PostgreSQL, MySQL, SQLite or a compatible database": "不是 PostgreSQL、MySQL、SQLite 或兼容数据库的 URL",+ "The Database tree shows only the checked names and patterns (* and ?); the connected database always shows.": "数据库树只显示选中的名称和模式(* 和 ?);已连接的数据库始终显示。",+ "Save the data source to pick from the server's names; patterns (* and ?) work any time.": "保存数据源后可从服务器上的名称中选取;模式(* 和 ?)随时可用。",+ "Read-only data source.": "只读数据源。",+ "Read-only: the table has no primary key to identify rows.": "只读:该表没有可用于标识行的主键。",+ "The session has finished.": "会话已结束。",+ "Variables are available while suspended.": "变量仅在挂起时可用。",+ "Verified": "已验证",+ "Press Enter to evaluate": "按 Enter 键求值",+ "Evaluation is available while the program is suspended": "求值仅在程序挂起时可用",+ "unknown type": "未知类型",+ "Dev plugin loaded": "已加载开发插件",+ "WebAssembly component (sandboxed)": "WebAssembly 组件(沙盒)",+ "None — contributions only": "无 — 仅提供贡献项",+ "Dark": "深色",+ "Light": "浅色",+ "No plugins installed.": "尚未安装任何插件。",+ "No plugins match.": "没有匹配的插件。",+ "No local plugin packages.": "没有本地插件包。",+ "Waiting for test results…": "正在等待测试结果…",+ "No test results": "没有测试结果",+ "Passed tests are hidden": "已隐藏通过的测试",+ "Search failed": "搜索失败",+ "No edited files": "没有已编辑的文件",+ "No matching files": "没有匹配的文件",+ "No recent files": "没有最近的文件",+ "Recently Changed Locations": "最近更改的位置",+ "No changed locations": "没有已更改的位置",+ "No recent locations": "没有最近的位置",+ "Open a file first": "请先打开一个文件",+ "1 detected folder is unmarked.": "有 1 个检测到的文件夹未标记。",+ "No packages match": "没有匹配的软件包",+ "No packages installed": "未安装软件包",+ "Installing": "正在安装",+ "Upgrading": "正在升级",+ "Uninstalling": "正在卸载",+ "Contents are identical": "内容完全一致",+ "working copy": "工作副本",+ "No commits match the filters": "没有与筛选条件匹配的提交",+ "No commits yet": "还没有提交",+ " · commit to conclude": " · 提交以完成",+ "Abort": "中止",+ "The current branch has no tracked branch; git pull may fail.": "当前分支没有跟踪分支;git pull 可能会失败。",+ "HEAD is detached; check out a branch to push.": "HEAD 处于分离状态;请签出一个分支后再推送。",+ "No shelved changes": "没有已搁置的更改",+ "No recent projects": "没有最近的项目",+ "Current position {line}:{col}": "当前位置 {line}:{col}",+ "{count} detected folders are unmarked.": "有 {count} 个检测到的文件夹未标记。",+ "Rebase commits of {head} not on:": "变基 {head} 中不在以下分支上的提交:",+ "{head} has no upstream: commits up to {revision} will be pushed as a new branch:": "{head} 没有上游分支:截至 {revision} 的提交将作为新分支推送:",+ "{head} has no upstream: it will be pushed as a new branch and tracked:": "{head} 没有上游分支:它将作为新分支推送并被跟踪:",+ "{count} matches in {files} files": "{files} 个文件中有 {count} 个匹配项",+ "{count} excluded": "已排除 {count} 项",+ "{count} file with conflicts": "{count} 个文件存在冲突",+ "{count} files with conflicts": "{count} 个文件存在冲突",+ "Clear {label} filter": "清除{label}筛选器",+ "in {count} commits": "(共 {count} 个提交)",+ "Callers": "调用方",+ "Callees": "被调用方",+ "Supertypes": "超类型",+ "Subtypes": "子类型",+ "Callers of {name}": "{name} 的调用方",+ "Callees of {name}": "{name} 的被调用方",+ "Supertypes of {name}": "{name} 的超类型",+ "Subtypes of {name}": "{name} 的子类型",+ "Approved": "已批准",+ "Changes requested": "已请求更改",+ "Review required": "需要审查",+ "approved": "已批准",+ "requested changes": "已请求更改",+ "reviewed": "已审查",+ "review dismissed": "审查已撤销",+ "review requested": "已请求审查",+ "{n} year ago": "{n} 年前",+ "{n} years ago": "{n} 年前",+ "{n} month ago": "{n} 个月前",+ "{n} months ago": "{n} 个月前",+ "{n} day ago": "{n} 天前",+ "{n} days ago": "{n} 天前",+ "{n} hour ago": "{n} 小时前",+ "{n} hours ago": "{n} 小时前",+ "{n} minute ago": "{n} 分钟前",+ "{n} minutes ago": "{n} 分钟前",+ "just now": "刚刚"}diff --git a/src/platform/locales/textCatalog.test.ts b/src/platform/locales/textCatalog.test.tsindex e24475c49..a31125dfd 100644--- a/src/platform/locales/textCatalog.test.ts+++ b/src/platform/locales/textCatalog.test.ts@@ -417,7 +417,9 @@ function scanTypeScript(): Scan {const where = (node: ts.Node) => `${path}:${sf.getLineAndCharacterOfPosition(node.getStart()).line + 1}`;const visit = (node: ts.Node) => {if (checked && ts.isTaggedTemplateExpression(node) && ts.isIdentifier(node.tag) && exact.has(node.tag.text)) {- const use: Use = { text: tagText(node.template), at: where(node), match: "shape" };+ // Without `${}` the tag looks its text up as written.+ const match = ts.isNoSubstitutionTemplateLiteral(node.template) ? "exact" : "shape";+ const use: Use = { text: tagText(node.template), at: where(node), match };translated.push(use);if (ts.isTemplateExpression(node.template) &&diff --git a/src/platform/locales/zh.json b/src/platform/locales/zh.jsonindex 72665c73e..1afaa7856 100644--- a/src/platform/locales/zh.json+++ b/src/platform/locales/zh.json@@ -70,6 +70,11 @@"common.close": "关闭","common.copied": "已复制","common.copy": "复制",+ "github.prState.all": "全部",+ "github.prState.closed": "已关闭",+ "github.prState.draft": "草稿",+ "github.prState.merged": "已合并",+ "github.prState.open": "开放","menu.app": "OpenIDEA","menu.app.about": "关于 OpenIDEA","menu.app.checkForUpdates": "检查更新…",diff --git a/src/ui/Dialog.tsx b/src/ui/Dialog.tsxindex d840d77a1..2d45a529f 100644--- a/src/ui/Dialog.tsx+++ b/src/ui/Dialog.tsx@@ -342,13 +342,13 @@ function DialogInner({type="button"tabIndex={-1}className={clsx(styles.light, styles.lightClose)}- aria-label="Close"+ aria-label={tx("Close")}onClick={onClose}><Icon name="close" size={10} className={styles.lightGlyph} /></button>- <button type="button" tabIndex={-1} disabled className={styles.light} aria-label="Minimize" />- <button type="button" tabIndex={-1} disabled className={styles.light} aria-label="Zoom" />+ <button type="button" tabIndex={-1} disabled className={styles.light} aria-label={tx("Minimize")} />+ <button type="button" tabIndex={-1} disabled className={styles.light} aria-label={tx("Zoom")} /></span><span className={styles.title}>{title}</span></div>@@ -383,7 +383,7 @@ function DialogInner({: hasFooter && (<div className={styles.footer} data-dialog-footer="">{onHelp && (- <button type="button" className={styles.help} aria-label="Help" onClick={onHelp}>+ <button type="button" className={styles.help} aria-label={tx("Help")} onClick={onHelp}>?</button>)}diff --git a/src/ui/SourcePreview.tsx b/src/ui/SourcePreview.tsxindex 15d0d2a75..7a42b1e91 100644--- a/src/ui/SourcePreview.tsx+++ b/src/ui/SourcePreview.tsx@@ -7,6 +7,7 @@ import { useEffect, useLayoutEffect, useRef, useState, type ReactNode } from "reimport clsx from "clsx";import { T } from "./T";import styles from "./SourcePreview.module.css";+import { tx } from "@/platform/i18n";export interface SourceHighlight {line: number;@@ -85,7 +86,7 @@ export function SourcePreview({ path, line, highlights = [], load, version = 0,);}return (- <div ref={scrollRef} className={clsx(styles.preview, className)} role="region" aria-label="Preview">+ <div ref={scrollRef} className={clsx(styles.preview, className)} role="region" aria-label={tx("Preview")}><pre className={styles.pre}>{rows}</pre></div>);diff --git a/src/ui/Tabs.tsx b/src/ui/Tabs.tsxindex 251eef50f..2188b828f 100644--- a/src/ui/Tabs.tsx+++ b/src/ui/Tabs.tsx@@ -320,11 +320,11 @@ export function Tabs({{typeof item.label === "string" ? <T>{item.label}</T> : item.label}</span>{item.trailing}- {item.modified && !closable && <span className={styles.modified} aria-label="Modified" />}+ {item.modified && !closable && <span className={styles.modified} aria-label={tx("Modified")} />}</button>{closable && (<span className={styles.closeSlot} data-tab-close>- {item.modified && <span className={styles.modified} aria-label="Modified" />}+ {item.modified && <span className={styles.modified} aria-label={tx("Modified")} />}<IconButtonicon="close"title="Close Tab"diff --git a/src/workbench/StatusBar.tsx b/src/workbench/StatusBar.tsxindex 8b01e3a2e..bc7376438 100644--- a/src/workbench/StatusBar.tsx+++ b/src/workbench/StatusBar.tsx@@ -42,7 +42,7 @@ export function StatusBar() {return (<footerclassName={styles.bar}- aria-label="Status bar"+ aria-label={tx("Status bar")}onContextMenu={(e) => {if (e.defaultPrevented) return;e.preventDefault();diff --git a/src/workbench/toolwindows/ToolWindows.tsx b/src/workbench/toolwindows/ToolWindows.tsxindex 0457eefef..b17913311 100644--- a/src/workbench/toolwindows/ToolWindows.tsx+++ b/src/workbench/toolwindows/ToolWindows.tsx@@ -440,7 +440,7 @@ function StripeMore({ windows }: { windows: ToolWindowContribution[] }) {ref={ref}type="button"className={clsx(styles.stripeButton, styles.stripeMore)}- aria-label="More Tool Windows"+ aria-label={tx("More Tool Windows")}aria-haspopup="menu"aria-expanded={open}onClick={() => setOpen((v) => !v)}