mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 386322: Localized metadata fails for multiple properties (contributor,
translator, developer). r=robstrong
This commit is contained in:
parent
2453a15612
commit
ce254264e1
@ -8046,12 +8046,6 @@ ExtensionsDataSource.prototype = {
|
||||
* to specify localized text for each of these properties.
|
||||
*/
|
||||
_getLocalizablePropertyValue: function(item, property) {
|
||||
var localized = this._getLocalizedResource(item);
|
||||
if (localized) {
|
||||
var value = this._inner.GetTarget(localized, property, true);
|
||||
return value ? value : EM_L("");
|
||||
}
|
||||
|
||||
// These are localizable properties that a language pack supplied by the
|
||||
// Extension may override.
|
||||
var prefName = PREF_EM_EXTENSION_FORMAT.replace(/%UUID%/,
|
||||
@ -8065,6 +8059,12 @@ ExtensionsDataSource.prototype = {
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
|
||||
var localized = this._getLocalizedResource(item);
|
||||
if (localized) {
|
||||
var value = this._inner.GetTarget(localized, property, true);
|
||||
return value ? value : EM_L("");
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
@ -8166,10 +8166,6 @@ ExtensionsDataSource.prototype = {
|
||||
* to specify localized text for each of these properties.
|
||||
*/
|
||||
_getLocalizablePropertyValues: function(item, property) {
|
||||
var localized = this._getLocalizedResource(item);
|
||||
if (localized)
|
||||
return this._inner.GetTargets(localized, property, true);
|
||||
|
||||
// These are localizable properties that a language pack supplied by the
|
||||
// Extension may override.
|
||||
var values = [];
|
||||
@ -8196,7 +8192,17 @@ ExtensionsDataSource.prototype = {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return values.length > 0 ? values : null;
|
||||
if (values.length > 0)
|
||||
return values;
|
||||
|
||||
var localized = this._getLocalizedResource(item);
|
||||
if (localized) {
|
||||
var targets = this._inner.GetTargets(localized, property, true);
|
||||
while (targets.hasMoreElements())
|
||||
values.push(targets.getNext());
|
||||
return values;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user