File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 5656 "editor.defaultFormatter" : " esbenp.prettier-vscode"
5757 },
5858 "[jsonc]" : {
59- "editor.defaultFormatter" : " esbenp.prettier-vscode "
59+ "editor.defaultFormatter" : " vscode.json-language-features "
6060 },
6161 "[vue]" : {
6262 "editor.defaultFormatter" : " esbenp.prettier-vscode"
Original file line number Diff line number Diff line change @@ -113,7 +113,10 @@ class I18n {
113113 }
114114 this . logger . warn ( `[i18n] Key not found: ${ key } ` ) ;
115115 }
116- return ( i18next . t ( key , options ) || key ) as string ;
116+ return ( i18next . t ( key , {
117+ ...options ,
118+ lng : lang || DEFAULT_LNG ,
119+ } ) || key ) as string ;
117120 }
118121
119122 /**
@@ -126,7 +129,10 @@ class I18n {
126129 if ( ! key ) return false ;
127130 const lang = reactiveLang . value ;
128131 if ( i18next . exists ( key ) ) {
129- return i18next . t ( key , options ) as string ;
132+ return i18next . t ( key , {
133+ ...options ,
134+ lng : lang || DEFAULT_LNG ,
135+ } ) as string ;
130136 } else if ( lang ) {
131137 const obj = i18next . getResourceBundle ( lang , 'translation' ) ;
132138 if ( obj && obj [ key ] ) {
You can’t perform that action at this time.
0 commit comments