mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 279952 - add en-US to the fallback list for locale providers, preferring it to "any old locale we can find" r=darin
This commit is contained in:
parent
84cfc83215
commit
ddbd869e4c
@ -187,7 +187,15 @@ nsChromeRegistry::nsProviderArray::GetProvider(const nsACString& aPreferred, Mat
|
||||
if (aPreferred.Equals(entry->provider))
|
||||
return entry;
|
||||
|
||||
if (aType == LOCALE && !found && LanguagesMatch(aPreferred, entry->provider))
|
||||
if (aType != LOCALE)
|
||||
continue;
|
||||
|
||||
if (LanguagesMatch(aPreferred, entry->provider)) {
|
||||
found = entry;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!found && entry->provider.EqualsLiteral("en-US"))
|
||||
found = entry;
|
||||
}
|
||||
|
||||
@ -609,7 +617,7 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURI, nsIURI* *aResult)
|
||||
baseURI = entry->locales.GetBase(mSelectedLocale, nsProviderArray::LOCALE);
|
||||
}
|
||||
else if (provider.EqualsLiteral("skin")) {
|
||||
baseURI = entry->skins.GetBase(mSelectedSkin, nsProviderArray::SKIN);
|
||||
baseURI = entry->skins.GetBase(mSelectedSkin, nsProviderArray::ANY);
|
||||
}
|
||||
else {
|
||||
baseURI = entry->baseURI;
|
||||
|
@ -144,7 +144,7 @@ public:
|
||||
enum MatchType {
|
||||
EXACT = 0,
|
||||
LOCALE = 1, // "en-GB" is selected, we found "en-US"
|
||||
SKIN = 2
|
||||
ANY = 2
|
||||
};
|
||||
|
||||
ProviderEntry* GetProvider(const nsACString& aPreferred, MatchType aType);
|
||||
|
Loading…
Reference in New Issue
Block a user