@@ -2,7 +2,6 @@ import type { Locale, Locales } from '~/models/i18n.model';
2
2
3
3
import { useI18nStore } from '~/stores/i18n.store' ;
4
4
import { useRouterStore } from '~/stores/router.store' ;
5
- import { logger } from '~/stores/settings/log.store' ;
6
5
import { useI18nTranslate } from '~/utils/browser/browser-i18n.utils' ;
7
6
import { chromeI18n } from '~/utils/browser/browser.utils' ;
8
7
@@ -11,7 +10,7 @@ export const initLocalI18n = () => {
11
10
const router = useRouterStore ( ) ;
12
11
let promise : Promise < Locales | void > | undefined ;
13
12
if ( import . meta. hot ) {
14
- logger . debug ( 'Listening to i18n HMR changes' ) ;
13
+ console . debug ( 'Listening to i18n HMR changes' ) ;
15
14
import . meta. hot . send ( 'fetch:i18n' ) ;
16
15
import . meta. hot . on ( 'update:i18n' , ( data : { lang : string ; locale : Locale } [ ] ) => {
17
16
data ?. forEach ( ( { lang, locale } ) => store . addLocale ( locale , lang , true ) ) ;
@@ -20,7 +19,7 @@ export const initLocalI18n = () => {
20
19
promise = fetch ( new URL ( `${ router . baseUrl ?? './' } _locales/${ store . lang } /messages.json` , new URL ( import . meta. url ) . origin ) )
21
20
. then ( r => r . json ( ) )
22
21
. 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 ) ) ;
24
23
}
25
24
26
25
return { store, router, promise } ;
0 commit comments