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:
@@ -235,7 +235,7 @@ async function previewBackup(fpath) {
|
||||
async function restoreBackup(vault, file) {
|
||||
// Find the backup timestamp from the currently selected backup
|
||||
var item = document.querySelector('.bm-backup-item.active');
|
||||
if (!item) { showToast('Selectionnez un backup a restaurer', 'error'); return; }
|
||||
if (!item) { showToast(t('backup.select_to_restore'), 'error'); return; }
|
||||
|
||||
var backupPath = item.dataset.path;
|
||||
// Extract timestamp from the filename
|
||||
@@ -248,7 +248,7 @@ async function restoreBackup(vault, file) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!ts) { showToast('Impossible de trouver le timestamp du backup', 'error'); return; }
|
||||
if (!ts) { showToast(t('backup.timestamp_not_found'), 'error'); return; }
|
||||
|
||||
if (!confirm('Restaurer "' + file + '" a la version du backup selectionne ?\nLa version actuelle sera sauvegardee.')) return;
|
||||
|
||||
@@ -259,7 +259,7 @@ async function restoreBackup(vault, file) {
|
||||
body: JSON.stringify({ version: ts }),
|
||||
});
|
||||
if (resp && resp.success) {
|
||||
showToast('Fichier restaure avec succes', 'success');
|
||||
showToast(t('backup.file_restored'), 'success');
|
||||
load();
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user