clean: respect es11
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user