Skip to content

Commit 002b7b9

Browse files
committed
fix(test): fix logging issues for i18n
1 parent 9b7c866 commit 002b7b9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/utils/i18n.utils.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { Locale, Locales } from '~/models/i18n.model';
22

33
import { useI18nStore } from '~/stores/i18n.store';
44
import { useRouterStore } from '~/stores/router.store';
5-
import { logger } from '~/stores/settings/log.store';
65
import { useI18nTranslate } from '~/utils/browser/browser-i18n.utils';
76
import { chromeI18n } from '~/utils/browser/browser.utils';
87

@@ -11,7 +10,7 @@ export const initLocalI18n = () => {
1110
const router = useRouterStore();
1211
let promise: Promise<Locales | void> | undefined;
1312
if (import.meta.hot) {
14-
logger.debug('Listening to i18n HMR changes');
13+
console.debug('Listening to i18n HMR changes');
1514
import.meta.hot.send('fetch:i18n');
1615
import.meta.hot.on('update:i18n', (data: { lang: string; locale: Locale }[]) => {
1716
data?.forEach(({ lang, locale }) => store.addLocale(locale, lang, true));
@@ -20,7 +19,7 @@ export const initLocalI18n = () => {
2019
promise = fetch(new URL(`${router.baseUrl ?? './'}_locales/${store.lang}/messages.json`, new URL(import.meta.url).origin))
2120
.then(r => r.json())
2221
.then((locale: Locale) => store.addLocale(locale))
23-
.catch(err => logger.error(`Failed to fetch locale '${store.lang}'`, err));
22+
.catch(err => console.error(`Failed to fetch locale '${store.lang}'`, err));
2423
}
2524

2625
return { store, router, promise };

0 commit comments

Comments
 (0)