File tree 2 files changed +7
-2
lines changed 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ export class DataProvider {
65
65
66
66
if ( ! this . defaultLanguage ) {
67
67
this . defaultLanguage = this . languages . keys ( ) . next ( ) . value ;
68
- this . logger . warn ( `No file found with the .default extension: default langage set to '${ this . defaultLanguage } '` ) ;
68
+ this . logger . warn ( `No file found with the .default extension: default language set to '${ this . defaultLanguage } '` ) ;
69
69
}
70
70
71
71
const defaultLanguageI18nEntries = this . languages . get ( this . defaultLanguage ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,12 @@ const getBundle = (function () {
16
16
} ) ( ) ;
17
17
18
18
export function localize ( key : string , ...args : string [ ] ) : string {
19
- const localizedString = getBundle ( ) . localizedStringForKeyValueTable ( encodeKey ( key ) , key , null ) ;
19
+ let localizedString ;
20
+ try {
21
+ localizedString = getBundle ( ) . localizedStringForKeyValueTable ( encodeKey ( key ) , key , null ) ;
22
+ } catch ( error ) {
23
+ localizedString = key ;
24
+ }
20
25
return vsprintf ( convertAtSignToStringSign ( localizedString ) , args ) ;
21
26
}
22
27
You can’t perform that action at this time.
0 commit comments