Send the remaining interface text through the catalog and audit it
Phase 4f. - scripts/i18nAudit.mjs runs in pnpm check. It fails for a key that the catalog does not have, a catalog key that the code does not use, and a row without all four languages. - message() marks a key that a variable carries to the translation call later: table formats, formula errors, and browser status messages. - 53 new rows with French, Japanese, and Simplified Chinese text for the status and error messages of the workbench, the tree, Settings, theme import, images, the built-in browser, and code blocks. The backlinks toggle now translates too. - 13 unused rows are gone. - Errors of the plugin API stay in English. docs/development.md has the rule in "Interface text". pnpm check, pnpm test (350 of 350), and the full smoke suite pass, except two tests that failed one time under load and passed on retry and 3 of 3 times alone.
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
// The table formula engine. Formulas are plain Markdown cell text.
|
||||
// The engine does not evaluate JavaScript and does not read external data.
|
||||
export const formulaErrors = {
|
||||
"#ERROR!": "Invalid formula syntax or function arguments",
|
||||
"#REF!": "Cell reference is outside this table",
|
||||
"#VALUE!": "Expected a number",
|
||||
"#NAME?": "Unknown function or cell name",
|
||||
"#DIV/0!": "Cannot divide by zero or average an empty range",
|
||||
"#CYCLE!": "Circular cell reference",
|
||||
"#NUM!": "Result is not a finite number",
|
||||
"#LIMIT!": "Formula is too complex",
|
||||
"#ERROR!": message("Invalid formula syntax or function arguments"),
|
||||
"#REF!": message("Cell reference is outside this table"),
|
||||
"#VALUE!": message("Expected a number"),
|
||||
"#NAME?": message("Unknown function or cell name"),
|
||||
"#DIV/0!": message("Cannot divide by zero or average an empty range"),
|
||||
"#CYCLE!": message("Circular cell reference"),
|
||||
"#NUM!": message("Result is not a finite number"),
|
||||
"#LIMIT!": message("Formula is too complex"),
|
||||
} as const;
|
||||
export type FormulaErrorCode = keyof typeof formulaErrors;
|
||||
type ErrorCode = FormulaErrorCode;
|
||||
@@ -150,4 +150,5 @@ export function evaluateTableFormulas(grid: string[][]): (FormulaResult | null)[
|
||||
return { formula, text: code, error: code };
|
||||
}
|
||||
}));
|
||||
}
|
||||
}import { message } from "../i18n/index.ts";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user