feat: comprehensive i18n coverage — all static text + auto-translate toasts
CI / lint (push) Failing after 18s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Failing after 9s

Locale files expanded to 300+ keys covering all sections:
- Header menu, sidebar, search, viewer, editor, AI toolbar
- Config modal (all sections), help modal, dashboard, graph, mermaid
- Context menus, offline UI, palette, auth, shares, backups
- All toasts and confirmations

Automatic data-i18n tagging in index.html (177 attributes)
via Python script — handles all user-facing static text nodes.
Zero concatenation errors verified.

i18n.js: added tr() reverse-lookup function
(French text → key → current locale translation)

ui.js: showToast() now auto-translates via tr()
— all 24 existing toast call sites benefit automatically
This commit is contained in:
2026-06-18 14:01:37 -04:00
parent f85482214e
commit f91a386566
5 changed files with 774 additions and 198 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ import { safeCreateIcons, getFileIcon, escapeHtml } from './utils.js';
import { syncActiveFileTreeItem, refreshSidebarTreePreservingState } from './sidebar.js';
import { GraphViewManager } from './graph.js';
import { DashboardConflictsWidget } from './dashboard.js';
import { t, tr } from './i18n.js';
// ---------------------------------------------------------------------------
// Right Sidebar Manager
// ---------------------------------------------------------------------------
@@ -347,7 +348,8 @@ export function populateCustomDropdown(dropdownId, optionsList, defaultValue) {
/** Display a brief toast message at the bottom of the viewport. */
export function showToast(message, type) {
console.log("showToast called with:", message, type);
// Auto-translate French messages via reverse lookup
message = tr(message);
type = type || "info";
let container = document.getElementById("toast-container");
if (!container) {