i18n: complete audit — 55 new keys, all hardcoded strings converted to t()
- Added 4 missing keys: button.cancel, toast.dir_renamed, toast.file_deleted, toast.file_renamed
- Replaced 41 hardcoded showToast() strings with t() calls across 13 JS files
- Replaced 10 hardcoded textContent/title/innerHTML strings with t() calls
- Fixed theme labels: Sombre/Clair -> t('theme.dark')/t('theme.light')
- Fixed vault selector: Tous les vaults -> t('help.all_vaults')
- Both locale files: 983 -> 1032 keys, perfectly matched
- Bidirectional EN<->FR switching verified in browser
This commit is contained in:
+3
-3
@@ -153,7 +153,7 @@ export function applyTheme(theme) {
|
||||
if (icon) {
|
||||
icon.setAttribute("data-lucide", theme === "dark" ? "moon" : "sun");
|
||||
}
|
||||
themeLabel.textContent = theme === "dark" ? "Sombre" : "Clair";
|
||||
themeLabel.textContent = theme === "dark" ? t('theme.dark') : t('theme.light');
|
||||
safeCreateIcons();
|
||||
}
|
||||
|
||||
@@ -860,7 +860,7 @@ const FileOperations = {
|
||||
// Find the text span (.tree-item-text) — tree items use spans, not direct text nodes
|
||||
const textSpan = item.querySelector('.tree-item-text');
|
||||
if (!textSpan) {
|
||||
showToast('Impossible de renommer cet élément', 'error');
|
||||
showToast(t('ui.cannot_rename'), 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1586,7 +1586,7 @@ async function init() {
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("Failed to initialize ObsiGate:", err);
|
||||
showToast("Erreur lors de l'initialisation", "error");
|
||||
showToast(t("error.initialization"), "error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user