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:
Knotty Wyvern
2026-10-28 12:00:24 -07:00
parent 3e6bc5f088
commit e9c59f28de
28 changed files with 249 additions and 171 deletions
+54 -79
View File
@@ -653,12 +653,6 @@ export const messageRows: [string, string, string, string][] = [
"一致するファイルはありません。",
"没有匹配的文件。"
],
[
"{count} files",
"{count} fichiers",
"{count}個のファイル",
"{count} 个文件"
],
[
" · indexing…",
" · indexation…",
@@ -671,12 +665,6 @@ export const messageRows: [string, string, string, string][] = [
"↑ ↓ 選択 · Enter {action} · Esc 閉じる",
"↑ ↓ 选择 · Enter {action} · Esc 关闭"
],
[
"open",
"ouvrir",
"開く",
"打开"
],
[
"Window controls",
"Commandes de la fenêtre",
@@ -1697,12 +1685,6 @@ export const messageRows: [string, string, string, string][] = [
"再読み込み",
"重新加载"
],
[
"Stop",
"Arrêter",
"停止",
"停止"
],
[
"Address or search",
"Adresse ou recherche",
@@ -2489,30 +2471,6 @@ export const messageRows: [string, string, string, string][] = [
"書式をクリア",
"清除格式"
],
[
"Superscript",
"Exposant",
"上付き文字",
"上标"
],
[
"Subscript",
"Indice",
"下付き文字",
"下标"
],
[
"Underline",
"Souligner",
"下線",
"下划线"
],
[
"Style",
"Style",
"スタイル",
"样式"
],
[
"Change all occurrences",
"Modifier toutes les occurrences",
@@ -2681,18 +2639,6 @@ export const messageRows: [string, string, string, string][] = [
"右に列を追加",
"在右侧插入列"
],
[
"Add column left",
"Ajouter une colonne à gauche",
"左に列を追加",
"在左侧插入列"
],
[
"Add column right",
"Ajouter une colonne à droite",
"右に列を追加",
"在右侧插入列"
],
[
"Move column left",
"Déplacer la colonne à gauche",
@@ -2729,18 +2675,6 @@ export const messageRows: [string, string, string, string][] = [
"列で降順に並べ替え",
"按列降序排序"
],
[
"Delete table",
"Supprimer le tableau",
"表を削除",
"删除表格"
],
[
"Insert table",
"Insérer un tableau",
"表を挿入",
"插入表格"
],
[
"Clear selected values and keep the cells.",
"Effacer les valeurs sélectionnées et conserver les cellules.",
@@ -2855,18 +2789,6 @@ export const messageRows: [string, string, string, string][] = [
"{name}をアンインストールしますか?",
"卸载 {name}?"
],
[
"{name} installed.",
"{name} installé.",
"{name}をインストールしました。",
"已安装 {name}。"
],
[
"{name} installed and enabled.",
"{name} installé et activé.",
"{name}をインストールして有効にしました。",
"已安装并启用 {name}。"
],
[
"{name} uninstalled. Settings and workspace documents were kept.",
"{name} désinstallé. Les paramètres et documents ont été conservés.",
@@ -3490,7 +3412,60 @@ export const messageRows: [string, string, string, string][] = [
["Tables", "Tableaux", "表", "表格"],
["Table formulas", "Formules de tableau", "表の数式", "表格公式"],
["Calculate table cells that start with =. When this is off, formulas show as text.", "Calculer les cellules de tableau qui commencent par =. Désactivé, les formules s’affichent comme du texte.", "=で始まる表のセルを計算します。オフにすると、数式は文字列として表示されます。", "计算以 = 开头的表格单元格。关闭后,公式显示为文本。"],
["Table Formulas is now built in. You can remove this old package. Your formulas stay in your files. To turn formulas on or off, go to Settings → General.", "Les formules de tableau sont maintenant intégrées. Vous pouvez supprimer cet ancien paquet. Vos formules restent dans vos fichiers. Pour activer ou désactiver les formules, ouvrez Paramètres → Général.", "表の数式は内蔵されました。この古いパッケージは削除できます。数式はファイルに残ります。数式のオン/オフは「設定 → 一般」で切り替えます。", "表格公式现已内置。可以移除此旧包。公式保留在文件中。要打开或关闭公式,请前往“设置 → 常规”。"]
["Table Formulas is now built in. You can remove this old package. Your formulas stay in your files. To turn formulas on or off, go to Settings → General.", "Les formules de tableau sont maintenant intégrées. Vous pouvez supprimer cet ancien paquet. Vos formules restent dans vos fichiers. Pour activer ou désactiver les formules, ouvrez Paramètres → Général.", "表の数式は内蔵されました。この古いパッケージは削除できます。数式はファイルに残ります。数式のオン/オフは「設定 → 一般」で切り替えます。", "表格公式现已内置。可以移除此旧包。公式保留在文件中。要打开或关闭公式,请前往“设置 → 常规”。"],
["Could not close settings: {reason}", "Impossible de fermer les paramètres : {reason}", "設定を閉じられませんでした: {reason}", "无法关闭设置:{reason}"],
["Could not read your settings. Default settings apply until you save new settings.", "Impossible de lire vos paramètres. Les paramètres par défaut s’appliquent jusqu’à ce que vous en enregistriez de nouveaux.", "設定を読み込めませんでした。新しい設定を保存するまで既定の設定が適用されます。", "无法读取您的设置。在您保存新设置之前,将使用默认设置。"],
["The new window did not accept the tab. The source tab remains open.", "La nouvelle fenêtre n’a pas accepté l’onglet. L’onglet d’origine reste ouvert.", "新しいウィンドウがタブを受け付けませんでした。元のタブは開いたままです。", "新窗口未接受该标签页。原标签页保持打开。"],
["Could not read your layout. Default layout applies for this window.", "Impossible de lire votre disposition. La disposition par défaut s’applique à cette fenêtre.", "レイアウトを読み込めませんでした。このウィンドウには既定のレイアウトが適用されます。", "无法读取您的布局。此窗口将使用默认布局。"],
["Could not save your layout. Layout changes apply for this window only.", "Impossible d’enregistrer votre disposition. Les modifications ne s’appliquent qu’à cette fenêtre.", "レイアウトを保存できませんでした。変更はこのウィンドウにのみ適用されます。", "无法保存您的布局。布局更改仅适用于此窗口。"],
["Invalid tab transfer.", "Transfert d’onglet non valide.", "タブの移動が無効です。", "标签页转移无效。"],
["Move tabs only between windows of the same workspace.", "Déplacez les onglets uniquement entre les fenêtres du même espace de travail.", "タブは同じワークスペースのウィンドウ間でのみ移動できます。", "只能在同一工作区的窗口之间移动标签页。"],
["This tab is already open in this window. The source tab remains open.", "Cet onglet est déjà ouvert dans cette fenêtre. L’onglet d’origine reste ouvert.", "このタブはこのウィンドウですでに開いています。元のタブは開いたままです。", "此标签页已在此窗口中打开。原标签页保持打开。"],
["Enable this tab's plugin before moving it to this window.", "Activez le plug-in de cet onglet avant de le déplacer vers cette fenêtre.", "このウィンドウに移動する前に、このタブのプラグインを有効にしてください。", "将此标签页移到此窗口之前,请先启用其插件。"],
["The plugin did not open this tab.", "Le plug-in n’a pas ouvert cet onglet.", "プラグインがこのタブを開きませんでした。", "插件未打开此标签页。"],
["The plugin did not open this document.", "Le plug-in n’a pas ouvert ce document.", "プラグインがこのドキュメントを開きませんでした。", "插件未打开此文档。"],
["This note is no longer available.", "Cette note n’est plus disponible.", "このノートは利用できなくなりました。", "此笔记已不可用。"],
["The workspace changed. Open the link menu again.", "L’espace de travail a changé. Ouvrez de nouveau le menu du lien.", "ワークスペースが変更されました。リンクメニューをもう一度開いてください。", "工作区已更改。请重新打开链接菜单。"],
["Enter a relative workspace path without reserved characters.", "Saisissez un chemin relatif dans l’espace de travail, sans caractères réservés.", "予約文字を含まないワークスペースの相対パスを入力してください。", "请输入不含保留字符的工作区相对路径。"],
["Open a workspace before renaming a document.", "Ouvrez un espace de travail avant de renommer un document.", "ドキュメント名を変更する前にワークスペースを開いてください。", "重命名文档前,请先打开工作区。"],
["The workspace changed. Reopen the document.", "L’espace de travail a changé. Rouvrez le document.", "ワークスペースが変更されました。ドキュメントを開き直してください。", "工作区已更改。请重新打开文档。"],
["Could not open the app browser.", "Impossible d’ouvrir le navigateur de l’application.", "アプリのブラウザーを開けませんでした。", "无法打开应用内浏览器。"],
["Could not add the word to the dictionary.", "Impossible d’ajouter le mot au dictionnaire.", "単語を辞書に追加できませんでした。", "无法将该词添加到词典。"],
["Copied workspace paths", "Chemins dans l’espace de travail copiés", "ワークスペースのパスをコピーしました", "已复制工作区路径"],
["Copied system paths", "Chemins système copiés", "システムのパスをコピーしました", "已复制系统路径"],
["Created {path}", "{path} créé", "{path} を作成しました", "已创建 {path}"],
["Moved {count} of {total} items", "{count} élément(s) sur {total} déplacé(s)", "{total} 個中 {count} 個の項目を移動しました", "已移动 {count}/{total} 个项目"],
["Copied {count} of {total} items", "{count} élément(s) sur {total} copié(s)", "{total} 個中 {count} 個の項目をコピーしました", "已复制 {count}/{total} 个项目"],
["The workspace changed. File moves stopped.", "L’espace de travail a changé. Les déplacements de fichiers sont arrêtés.", "ワークスペースが変更されました。ファイルの移動を停止しました。", "工作区已更改。文件移动已停止。"],
["The workspace changed. Paste stopped.", "L’espace de travail a changé. Le collage est arrêté.", "ワークスペースが変更されました。貼り付けを停止しました。", "工作区已更改。粘贴已停止。"],
["Move to new window", "Déplacer vers une nouvelle fenêtre", "新しいウィンドウに移動", "移到新窗口"],
["Split right", "Scinder à droite", "右に分割", "向右拆分"],
["Split down", "Scinder vers le bas", "下に分割", "向下拆分"],
["Find…", "Rechercher…", "検索…", "查找…"],
["Open in default browser", "Ouvrir dans le navigateur par défaut", "既定のブラウザーで開く", "在默认浏览器中打开"],
["Invalid browser tab transfer.", "Transfert d’onglet de navigateur non valide.", "ブラウザータブの移動が無効です。", "浏览器标签页转移无效。"],
["The browser tab is unavailable.", "L’onglet du navigateur n’est pas disponible.", "ブラウザータブを利用できません。", "浏览器标签页不可用。"],
["Web page rendered by the browser", "Page web affichée par le navigateur", "ブラウザーが表示したウェブページ", "由浏览器呈现的网页"],
["Mermaid diagram", "Diagramme Mermaid", "Mermaid 図", "Mermaid 图表"],
["Diagram source", "Source du diagramme", "図のソース", "图表源代码"],
["The runtime restarted twice while opening this tab.", "Le moteur a redémarré deux fois pendant l’ouverture de cet onglet.", "このタブを開く間にランタイムが2回再起動しました。", "打开此标签页时运行时重启了两次。"],
["Could not find this image in the workspace.", "Impossible de trouver cette image dans l’espace de travail.", "この画像がワークスペースに見つかりません。", "在工作区中找不到此图像。"],
["Choose an image that exists in the workspace.", "Choisissez une image qui existe dans l’espace de travail.", "ワークスペースにある画像を選択してください。", "请选择工作区中已有的图像。"],
["Image clipboard is unavailable.", "Le presse-papiers d’images n’est pas disponible.", "画像のクリップボードを利用できません。", "图像剪贴板不可用。"],
["Choose an image of 50 MiB or less.", "Choisissez une image de 50 Mio au plus.", "50 MiB 以下の画像を選択してください。", "请选择 50 MiB 或更小的图像。"],
["Choose a RuneStone theme JSON file.", "Choisissez un fichier de thème RuneStone au format JSON.", "RuneStone のテーマ JSON ファイルを選択してください。", "请选择 RuneStone 主题 JSON 文件。"],
["The theme needs schema 2, an ID, and a name.", "Le thème nécessite le schéma 2, un identifiant et un nom.", "テーマにはスキーマ 2、ID、名前が必要です。", "主题需要架构 2、ID 和名称。"],
["The theme needs {mode} colors.", "Le thème nécessite des couleurs {mode}.", "テーマには {mode} の色が必要です。", "主题需要 {mode} 颜色。"],
["Unknown theme color: {key}", "Couleur de thème inconnue : {key}", "不明なテーマの色: {key}", "未知的主题颜色:{key}"],
["Use a hexadecimal color for {key}.", "Utilisez une couleur hexadécimale pour {key}.", "{key} には16進数の色を使用してください。", "请为 {key} 使用十六进制颜色。"],
["The {mode} palette needs bg, text, and accent.", "La palette {mode} nécessite bg, text et accent.", "{mode} パレットには bg、text、accent が必要です。", "{mode} 调色板需要 bg、text 和 accent。"],
["Use an object for theme fonts.", "Utilisez un objet pour les polices du thème.", "テーマのフォントにはオブジェクトを使用してください。", "主题字体请使用对象。"],
["Unknown theme font: {role}", "Police de thème inconnue : {role}", "不明なテーマのフォント: {role}", "未知的主题字体:{role}"],
["Use a font family stack for {role}.", "Utilisez une liste de familles de polices pour {role}.", "{role} にはフォントファミリーのリストを使用してください。", "请为 {role} 使用字体系列列表。"],
["Resolve the disk changes before saving.", "Résolvez les modifications sur le disque avant d’enregistrer.", "保存する前にディスク上の変更を解決してください。", "保存前请先处理磁盘上的更改。"],
["Open a workspace first.", "Ouvrez d’abord un espace de travail.", "先にワークスペースを開いてください。", "请先打开工作区。"],
["Collapse backlinks", "Réduire les liens entrants", "バックリンクを折りたたむ", "折叠反向链接"],
["Expand backlinks", "Développer les liens entrants", "バックリンクを展開", "展开反向链接"]
];
export const catalogs: Record<Exclude<Locale, 'en'>, Record<string, string>> = {
fr: Object.fromEntries(messageRows.map(row => [row[0], row[1]])),