Closed Bug 562290 Opened 14 years ago Closed 14 years ago

Add-on properties like contributors should fall back to default locale

Categories

(Toolkit :: Add-ons Manager, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 416350

People

(Reporter: jwkbugzilla, Unassigned)

References

Details

(Whiteboard: [rewrite])

AddonWrapper in XPIProvider.jsm will currently only expose the contributors and translators from the selected locale. For Adblock Plus development builds this results in both properties being undefined - install.rdf wasn't listing en-US locale at all so far (relying on fallback), and all the contributors were listed in the main section of install.rdf anyway. It doesn't make much sense to list contributors for each locale (these are names, not much to translate), so the add-on manager should clearly be using the default locale as fallback. From what I can tell, this change to PROP_LOCALE_MULTI handling would do the trick:

> -      return aAddon.selectedLocale[aProp];
> +      if (aAddon.selectedLocale[aProp] instanceof Array && aAddon.selectedLocale[aProp].length)
> +        return aAddon.selectedLocale[aProp];
> +      else
> +        return aAddon.defaultLocale[aProp];

And probably a similar change to PROP_LOCALE_SINGLE handling:

> -      return aAddon.selectedLocale[aProp];
> +      if (typeof aAddon.selectedLocale[aProp] == "string" && aAddon.selectedLocale[aProp].length)
> +        return aAddon.selectedLocale[aProp];
> +      else
> +        return aAddon.defaultLocale[aProp];
Is this a regression compared to current trunk builds?
Priority: -- → P2
I think it's not - current extension manager implementation is similarly inconsistent (which forced me to read install.rdf "manually"). If you have localized sections you have to duplicate all data.
Seems to be bug 416350 then.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.