File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ export const DEFAULT_APP_SETTINGS = {
14
14
showMessageBadgeWhenMuted : true ,
15
15
enableSpellchecking : true ,
16
16
// spellcheckingLanguage: 'auto',
17
- locale : 'en-US' ,
17
+ locale : '' ,
18
+ fallbackLocale : 'en-US' ,
18
19
beta : false ,
19
20
isAppMuted : false ,
20
21
} ;
Original file line number Diff line number Diff line change @@ -255,8 +255,10 @@ export default class AppStore extends Store {
255
255
_setLocale ( ) {
256
256
const locale = this . stores . settings . all . locale ;
257
257
258
- if ( locale && locale !== this . locale ) {
258
+ if ( locale && Object . prototype . hasOwnProperty . call ( locales , locale ) && locale !== this . locale ) {
259
259
this . locale = locale ;
260
+ } else if ( ! locale ) {
261
+ this . locale = this . _getDefaultLocale ( ) ;
260
262
}
261
263
}
262
264
@@ -281,6 +283,10 @@ export default class AppStore extends Store {
281
283
locale = defaultLocale ;
282
284
}
283
285
286
+ if ( ! locale ) {
287
+ locale = DEFAULT_APP_SETTINGS . fallbackLocale ;
288
+ }
289
+
284
290
return locale ;
285
291
}
286
292
You can’t perform that action at this time.
0 commit comments