i18n: fix hardcoded French in Statistics and Shortcuts panel
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 10s

- dashboard.js: Fichiers/Tags uniques/Taille totale/Vaults -> t() calls
- config.js: Tags uniques/Vaults in About -> t() calls
- index.html: Raccourcis & Astuces -> data-i18n
- Added 5 new keys: dashboard.stats_*, help.shortcuts_title
This commit is contained in:
2026-06-18 23:04:10 -04:00
parent 4b9a450be3
commit 8db9f4447f
5 changed files with 19 additions and 9 deletions
+1 -1
View File
@@ -999,7 +999,7 @@
data-lucide="keyboard"
style="width: 16px; height: 16px"
></i>
<span>Raccourcis &amp; Astuces</span>
<span data-i18n="help.shortcuts_title">Raccourcis &amp; Astuces</span>
<button
class="qh-toggle"
id="qh-toggle"
+2 -2
View File
@@ -876,8 +876,8 @@ function renderDiagnostics(container, data) {
title: "Index",
rows: [
[t("about.files_indexed"), data.index.total_files],
["Tags uniques", data.index.total_tags],
["Vaults", Object.keys(data.index.vaults).join(", ")],
[t("dashboard.stats_tags"), data.index.total_tags],
[t("dashboard.stats_vaults"), Object.keys(data.index.vaults).join(", ")],
],
},
{
+4 -4
View File
@@ -34,10 +34,10 @@ const DashboardStatsWidget = {
if (!grid) return;
const fmtSize = (bytes) => bytes < 1024 ? `${bytes} o` : bytes < 1048576 ? `${(bytes/1024).toFixed(1)} Ko` : bytes < 1073741824 ? `${(bytes/1048576).toFixed(1)} Mo` : `${(bytes/1073741824).toFixed(1)} Go`;
const items = [
{ icon: "files", label: "Fichiers", value: data.total_files.toLocaleString() },
{ icon: "tags", label: "Tags uniques", value: data.total_tags.toLocaleString() },
{ icon: "hard-drive", label: "Taille totale", value: fmtSize(data.total_size_bytes) },
{ icon: "folder-open", label: "Vaults", value: data.vaults.length.toString() },
{ icon: "files", label: t('dashboard.stats_files'), value: data.total_files.toLocaleString() },
{ icon: "tags", label: t('dashboard.stats_tags'), value: data.total_tags.toLocaleString() },
{ icon: "hard-drive", label: t('dashboard.stats_size'), value: fmtSize(data.total_size_bytes) },
{ icon: "folder-open", label: t('dashboard.stats_vaults'), value: data.vaults.length.toString() },
];
grid.innerHTML = items.map(i => `
<div class="stat-card">
+6 -1
View File
@@ -1035,5 +1035,10 @@
"config.force_reindex": "Force reindex",
"search.previous": "← Previous",
"viewer.copied": "Copied!",
"viewer.shared_doc_title": "Shared document — click to manage"
"viewer.shared_doc_title": "Shared document — click to manage",
"dashboard.stats_files": "Files",
"dashboard.stats_size": "Total size",
"dashboard.stats_tags": "Unique tags",
"dashboard.stats_vaults": "Vaults",
"help.shortcuts_title": "Shortcuts & Tips"
}
+6 -1
View File
@@ -1035,5 +1035,10 @@
"config.force_reindex": "Forcer réindexation",
"search.previous": "← Précédent",
"viewer.copied": "Copié !",
"viewer.shared_doc_title": "Document partagé — cliquer pour gérer"
"viewer.shared_doc_title": "Document partagé — cliquer pour gérer",
"dashboard.stats_files": "Fichiers",
"dashboard.stats_size": "Taille totale",
"dashboard.stats_tags": "Tags uniques",
"dashboard.stats_vaults": "Vaults",
"help.shortcuts_title": "Raccourcis & Astuces"
}