M1.11: English message catalog for every UI string
ui/src/i18n: en.json (20 flat dotted keys) and t(key, params?) with
{name} interpolation; a missing key warns in dev and returns the key.
All template text, title/aria-label attributes, notices and frontend
error texts go through t. ESLint vue/no-bare-strings-in-template is an
error. Catalog tests: interpolation, missing key, every t() key exists,
no unused keys. Engine messages stay English (G14). Docs updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
851d438e2a
commit
7c0fb312f6
21 changed files with 273 additions and 37 deletions
|
|
@ -7,6 +7,7 @@
|
|||
* with context (the active buffer): saving, saving all and closing a tab.
|
||||
* Nothing here hard-codes a key.
|
||||
*/
|
||||
import { t } from "../../i18n";
|
||||
import { listCommands, type CommandInfo, type RunResult } from "../../ipc";
|
||||
|
||||
/** Engine commands the editor area runs with the active buffer as context. */
|
||||
|
|
@ -126,7 +127,7 @@ export async function loadEditorKeymap(mac = isMac()): Promise<RunResult<EditorK
|
|||
}
|
||||
const list: unknown = result.value;
|
||||
if (!Array.isArray(list)) {
|
||||
return { ok: false, error: { code: "ipc", message: "unexpected result of listCommands" } };
|
||||
return { ok: false, error: { code: "ipc", message: t("common.error.unexpectedResult", { command: "listCommands" }) } };
|
||||
}
|
||||
const commands = (list as unknown[]).filter(
|
||||
(c): c is CommandInfo => typeof c === "object" && c !== null && "id" in c,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue