i18n: complete audit — 55 new keys, all hardcoded strings converted to t()
CI / lint (push) Failing after 22s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Failing after 9s

- 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:
2026-06-18 22:49:19 -04:00
parent 01dec0a0ec
commit 659c227e6a
17 changed files with 163 additions and 61 deletions
+6 -6
View File
@@ -360,7 +360,7 @@ export async function openFile(vaultName, filePath) {
offline: true
};
renderFile(fakeData);
showToast('Fichier charge depuis le cache hors-ligne', 'info');
showToast(t('viewer.loaded_from_cache'), 'info');
} else {
area.innerHTML = '<div class="welcome"><p style="color:var(--text-muted)">Impossible de charger le fichier — vous etes hors-ligne et ce fichier n\'est pas en cache.</p></div>';
}
@@ -488,11 +488,11 @@ export function renderFile(data) {
document.execCommand("copy");
document.body.removeChild(ta);
}
copyBtn.lastChild.textContent = "Copié !";
setTimeout(() => (copyBtn.lastChild.textContent = "Copier"), 1500);
copyBtn.lastChild.textContent = t('viewer.copied');
setTimeout(() => (copyBtn.lastChild.textContent = t('viewer.copy')), 1500);
} catch (err) {
console.error("Copy error:", err);
showToast("Erreur lors de la copie", "error");
showToast(t("viewer.copy_error"), "error");
}
});
@@ -567,7 +567,7 @@ export function renderFile(data) {
const shares = await api("/api/shares");
if (shares.some(s => s.vault === data.vault && s.path === data.path)) {
shareBtn.classList.add("shared");
shareBtn.title = "Document partagé — cliquer pour gérer";
shareBtn.title = t('viewer.shared_doc_title');
}
} catch (e) { /* ignore */ }
})();
@@ -1331,7 +1331,7 @@ const IndexUpdateManager = (() => {
async function _onIndexReloaded(data) {
connectionState = "syncing";
_updateBadge();
showToast("Index complet rechargé", "info");
showToast(t("sync.index_reloaded"), "info");
try {
await Promise.all([loadVaults(), loadTags()]);
} catch (err) {