clean: respect es11

This commit is contained in:
2024-02-20 09:22:11 +01:00
parent 54ef19a340
commit c143d96443
36 changed files with 163 additions and 163 deletions

View File

@ -1,11 +1,11 @@
import { reloadView } from '../index.js'
import { reloadView } from '../index.js';
export default class LanguageManager {
constructor() {
this.availableLanguages = ['en', 'fr', 'tp', 'cr'];
this.dict = null;
this.currentLang = 'en'
this.currentLang = 'en';
this.chosenLang = localStorage.getItem('preferedLanguage') || this.currentLang;
if (this.chosenLang !== this.currentLang && this.availableLanguages.includes(this.chosenLang)) {
this.loading = this.translatePage();
@ -28,7 +28,7 @@ export default class LanguageManager {
document.querySelectorAll('[data-i18n]').forEach(el => {
let key = el.getAttribute('data-i18n');
el.innerHTML = this.dict[key];
})
});
await reloadView();
return 0;