Closed
Bug 391120
Opened 18 years ago
Closed 18 years ago
Non supported general.useragent.locale causes update manager to fail
Categories
(Toolkit :: Application Update, defect)
Toolkit
Application Update
Tracking
()
VERIFIED
DUPLICATE
of bug 334136
People
(Reporter: extensions, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
If the general.useragent.locale preference contains a locale of which there is no localized version of Firefox/Thunderbird available, the update manager will fail to find an update. For example if the general.useragent.locale pref is set to "de-AT", the update manager will fail to find an update since only "de" is available.
Reproducible: Always
Steps to Reproduce:
0. (Optionally for 100% same result) Install a slightly older version of your Mozilla application.
1. Change general.useragent.locale preference to e.g. de-AT
2. Check for updates using the Help/Check for Updates... option
Actual Results:
No update will be found cause only a "de" version is available, and not a de-AT.
Expected Results:
The update manager should not check for updates using the current value in general.useragent.locale, but using the original locale the application was installed in.
As a add-on developer/translator you may need to switch your general.useragent.locale to test how a localized add-on looks. And since add-ons are usually not translated in e.g. de/fr but in de-DE/fr-FR, this will result in the above problem. IMHO it is also just not logical to check for updates using the current value of the preference, cause even if the update is available, you might then install your Mozilla application in a different locale then the one you originally chose (e.g. If you have a nl-NL Firefox, set the pref to en-GB, the update manager will offer you a en-GB installation). So I think it would be more logical to check for updates using the default value of general.useragent.locale, just as the update manager get's the default value of app.update.url and not the current.
Locations in Mozilla code that apply to this bug:
nsUpdateService.js
prototype Checker.getUpdateURL()
url = url.replace(/%LOCALE%/g, getLocale());
function getLocale() {
try {
return gPref.getComplexValue(PREF_GENERAL_USERAGENT_LOCALE,
nsIPrefLocalizedString).data;
} catch (e) {}
return gPref.getCharPref(PREF_GENERAL_USERAGENT_LOCALE);
}
Function getLocale could be changed to:
function getLocale() {
var defaults =
gPref.QueryInterface(Components.interfaces.nsIPrefService).
getDefaultBranch(null);
try {
return defaults.getComplexValue(PREF_GENERAL_USERAGENT_LOCALE,
nsIPrefLocalizedString).data;
} catch (e) {}
return defaults.getCharPref(PREF_GENERAL_USERAGENT_LOCALE);
}
Updated•18 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Version: unspecified → Trunk
Comment 1•18 years ago
|
||
That's exactly what bug 334136 does, :-).
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•17 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•