i18n: complete remaining roadmap tasks
JS files: - ai.js: add t() import, replace 10 hardcoded French strings - sync.js: add t() import, replace 20 hardcoded French strings (toasts, status labels, events, AI panel) - graph.js: add t() import, replace 6 hardcoded French strings (tooltips, badges) Locales: - +36 new keys for ai.js, sync.js, graph.js - 1206 keys in each locale file (perfectly synchronized) - 0 French characters remaining in en.json Documentation: - README.fr.md created (French version) - ROADMAP.md point #63 updated to 100% complete
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/* ObsiGate — Graph View: interactive file/folder relationship visualization.
|
||||
Phase 2: theme colors, tooltips, depth slider, full-vault, search, backlinks. */
|
||||
import { api } from './auth.js';
|
||||
import { t } from './i18n.js';
|
||||
import { safeCreateIcons } from './utils.js';
|
||||
import { openFile } from './viewer.js';
|
||||
|
||||
@@ -624,8 +625,8 @@ export const GraphViewManager = {
|
||||
if (fm.auteur) rows.push(`<div><span style="color:var(--text-muted)">✍️ Auteur</span> <span>${fm.auteur}</span></div>`);
|
||||
if (fm.date || fm.creation_date) rows.push(`<div><span style="color:var(--text-muted)">📅 Date</span> <span>${fm.date || fm.creation_date}</span></div>`);
|
||||
if (fm.statut) rows.push(`<div><span style="color:var(--text-muted)">📌 Statut</span> <span>${fm.statut}</span></div>`);
|
||||
if (fm.catégorie || fm.categorie) rows.push(`<div><span style="color:var(--text-muted)">📂 Catégorie</span> <span>${fm.catégorie || fm.categorie}</span></div>`);
|
||||
if (fm.publish) rows.push('<div><span style="color:var(--text-muted)">✅</span> <span>Publié</span></div>');
|
||||
if (fm.catégorie || fm.categorie) rows.push(`<div><span style="color:var(--text-muted)">${t('graph.category')}</span> <span>${fm.catégorie || fm.categorie}</span></div>`);
|
||||
if (fm.publish) rows.push('<div><span style="color:var(--text-muted)">✅</span> <span>${t('graph.published')}</span></div>');
|
||||
if (fm.favoris) rows.push('<div><span style="color:var(--text-muted)">⭐</span> <span>Favoris</span></div>');
|
||||
if (rows.length > 0) metaRows = rows.join('');
|
||||
}
|
||||
@@ -649,7 +650,7 @@ export const GraphViewManager = {
|
||||
</div>
|
||||
${metaRows ? `<div style="font-size:0.72rem;display:flex;flex-direction:column;gap:2px;padding:6px 0;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);margin-bottom:6px">${metaRows}</div>` : ''}
|
||||
${tags.length > 0 ? `<div style="display:flex;gap:4px;flex-wrap:wrap">${tags.map(t => `<span style="font-size:0.65rem;background:var(--accent-color);color:#fff;padding:1px 6px;border-radius:3px;opacity:0.8">#${t}</span>`).join('')}</div>` : ''}
|
||||
${node.type === 'file' ? '<div style="font-size:0.6rem;color:var(--text-muted);margin-top:6px;opacity:0.6">Ctrl+survol = aperçu complet</div>' : ''}
|
||||
${node.type === 'file' ? '<div style="font-size:0.6rem;color:var(--text-muted);margin-top:6px;opacity:0.6">${t('graph.ctrl_hover_preview')}</div>' : ''}
|
||||
`;
|
||||
this._infoPanel.style.display = 'block';
|
||||
},
|
||||
@@ -671,7 +672,7 @@ export const GraphViewManager = {
|
||||
if (fm.auteur) items.push(`✍️ ${fm.auteur}`);
|
||||
if (fm.date || fm.creation_date) items.push(`📅 ${fm.date || fm.creation_date}`);
|
||||
if (fm.statut) items.push(`📌 ${fm.statut}`);
|
||||
if (fm.publish) items.push('✅ publié');
|
||||
if (fm.publish) items.push('${t('graph.published_badge')}');
|
||||
if (fm.favoris) items.push('⭐ favoris');
|
||||
if (items.length > 0) fmSummary = `<div style="font-size:0.7rem;color:var(--text-muted);margin:4px 0">${items.join(' · ')}</div>`;
|
||||
}
|
||||
@@ -764,7 +765,7 @@ export const GraphViewManager = {
|
||||
if (hit) {
|
||||
this._canvas.style.cursor = 'pointer';
|
||||
this._canvas.title = hit.node.type === 'file'
|
||||
? `📄 ${hit.node.name} (cliquer pour ouvrir${e.ctrlKey ? ', Ctrl+survol = aperçu' : ''})`
|
||||
? `📄 ${hit.node.name} (${t('graph.click_to_open')}${e.ctrlKey ? ', ${t('graph.ctrl_hover_preview_short')}' : ''})`
|
||||
: `📁 ${hit.node.name} (cliquer pour explorer)`;
|
||||
|
||||
// Ctrl+hover: fetch content preview for file nodes
|
||||
|
||||
Reference in New Issue
Block a user