mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
Fix "unknown localization message"
This commit is contained in:
parent
dbc2b42c7f
commit
bb1928da05
1 changed files with 7 additions and 0 deletions
|
|
@ -434,6 +434,13 @@ LocaleData.prototype = {
|
||||||
|
|
||||||
options = Object.assign(defaultOptions, options);
|
options = Object.assign(defaultOptions, options);
|
||||||
|
|
||||||
|
// Some extensions probe optional localization attributes with an empty
|
||||||
|
// value. There is no message to look up in that case; avoid turning the
|
||||||
|
// probe into a misleading "Unknown localization message" warning.
|
||||||
|
if (message == null || message === "") {
|
||||||
|
return options.defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
let locales = new Set([this.BUILTIN, options.locale, this.defaultLocale]
|
let locales = new Set([this.BUILTIN, options.locale, this.defaultLocale]
|
||||||
.filter(locale => this.messages.has(locale)));
|
.filter(locale => this.messages.has(locale)));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue