diff --git a/src/App.vue b/src/App.vue index c5dce7a2..be3ba6cc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -63,9 +63,9 @@ export default { const defaultLang = await App.defaultLangage; const locale = App.getPreferenceString("hl", defaultLang); if (locale !== App.TimeAgoConfig.locale) { - const localeTime = await import( - "./../node_modules/javascript-time-ago/locale/" + locale + ".json" - ).then(module => module.default); + const localeTime = await import(`../node_modules/javascript-time-ago/locale/${locale}.json`).then( + module => module.default, + ); App.TimeAgo.addLocale(localeTime); App.TimeAgoConfig.locale = locale; } diff --git a/src/main.js b/src/main.js index 9ea9cf48..a83a8d46 100644 --- a/src/main.js +++ b/src/main.js @@ -253,7 +253,7 @@ const mixin = { const languages = window.navigator.languages; for (let i = 0; i < languages.length; i++) { try { - await import("./locales/" + languages[i] + ".json"); + await import(`./locales/${languages[i]}.json`); return languages[i]; } catch { continue;