File tree 2 files changed +12
-6
lines changed
2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,17 @@ export const getProgressQuery = (item: ListScrollSourceItem): ListScrollItem['ge
92
92
} ) ;
93
93
} ;
94
94
95
- const i18n = useI18n ( 'common' ) ;
95
+ let i18n : ReturnType < typeof useI18n > ;
96
96
97
- const i18nEpisode = ( ) => i18n ( 'episode' , 'common' , 'tag' ) ;
98
- const i18nSeason = ( ) => i18n ( 'season' , 'common' , 'tag' ) ;
99
- const openInEpisode = ( ) => i18n ( 'open_episode_in_trakt' , 'common' , 'tooltip' ) ;
100
- const openInSeason = ( ) => i18n ( 'open_season_in_trakt' , 'common' , 'tooltip' ) ;
97
+ const getI18n = ( ) => {
98
+ if ( ! i18n ) i18n = useI18n ( 'common' ) ;
99
+ return i18n ;
100
+ } ;
101
+
102
+ const i18nEpisode = ( ) => getI18n ( ) ( 'episode' , 'common' , 'tag' ) ;
103
+ const i18nSeason = ( ) => getI18n ( ) ( 'season' , 'common' , 'tag' ) ;
104
+ const openInEpisode = ( ) => getI18n ( ) ( 'open_episode_in_trakt' , 'common' , 'tooltip' ) ;
105
+ const openInSeason = ( ) => getI18n ( ) ( 'open_season_in_trakt' , 'common' , 'tooltip' ) ;
101
106
102
107
const getEpisodeTypeTag = ( episode : ListScrollSourceItem [ 'episode' ] ) : ListScrollItemTag | undefined => {
103
108
if ( ! episode ) return ;
Original file line number Diff line number Diff line change @@ -62,10 +62,11 @@ export const initServices = async () => {
62
62
useExtensionSettingsStore ( ) . initExtensionSettingsStore ( ) ,
63
63
] ) ;
64
64
65
+ await initLocalI18n ( ) . promise ;
66
+
65
67
await useActivityStore ( ) . initActivityStore ( ) ;
66
68
67
69
await Promise . all ( [
68
- initLocalI18n ( ) . promise ,
69
70
syncRestoreAllUsers ( ) ,
70
71
useImageStore ( ) . initImageStore ( ) ,
71
72
useListsStore ( ) . initListsStore ( ) ,
You can’t perform that action at this time.
0 commit comments