Don't throw from getString() for missing strings in non-English locales
Just show the key We still merge strings before pushing betas, but this means it won't crash for source builds, or if we forget. Not sure why we didn't do this 15 years ago.
This commit is contained in:
parent
1d1adbca70
commit
91faa73b19
1 changed files with 7 additions and 1 deletions
|
@ -128,7 +128,13 @@ Zotero.Intl = new function () {
|
|||
else if (e.name != 'NS_ERROR_FAILURE') {
|
||||
Zotero.logError(e);
|
||||
}
|
||||
throw new Error('Localized string not available for ' + name);
|
||||
let msg = 'Localized string not available for ' + name;
|
||||
if (Zotero.locale == 'en-US') {
|
||||
throw new Error(msg);
|
||||
}
|
||||
// In non-English locales, just return key if string is unavailable
|
||||
Zotero.debug(msg, 1);
|
||||
return name;
|
||||
}
|
||||
return l10n;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue