Fix: re-appliquer i18n apres chargement dynamique sidebar/topbar
Les textes data-i18n de la sidebar etaient vides car les traductions s'appliquaient avant que la sidebar soit chargee via fetch. topbar-logo.js re-applique maintenant les traductions via son MutationObserver, ce qui corrige le probleme sur toutes les pages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -70,5 +70,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
document.querySelectorAll('.sidebar-hotspot-badge').forEach(badge => {
|
||||
badge.style.display = (config.WIFI_status === 'hotspot') ? '' : 'none';
|
||||
});
|
||||
|
||||
// 5. Re-apply i18n translations for dynamically loaded elements (sidebar, topbar)
|
||||
if (window.i18n && typeof window.i18n.applyTranslations === 'function') {
|
||||
window.i18n.applyTranslations();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user