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,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { t } from "$lib/i18n";
|
||||
import { onMount } from "svelte";
|
||||
import { isTauri } from "@tauri-apps/api/core";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
@@ -11,7 +12,7 @@
|
||||
let error = $state("");
|
||||
function read() {
|
||||
try { settings = readSettings(); }
|
||||
catch { error = "Could not read your settings. Default settings apply until you save new settings."; }
|
||||
catch { error = $t("Could not read your settings. Default settings apply until you save new settings."); }
|
||||
}
|
||||
onMount(() => {
|
||||
read();
|
||||
@@ -27,7 +28,7 @@
|
||||
async function close() {
|
||||
if (!isTauri()) { window.location.assign("/"); return; }
|
||||
try { await getCurrentWindow().close(); }
|
||||
catch (reason) { error = `Could not close settings: ${String(reason)}`; }
|
||||
catch (reason) { error = $t("Could not close settings: {reason}", { reason: String(reason) }); }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user