Bug 660732 - about:support "Try updating your graphics driver" should link to instructions. r=gavin

This commit is contained in:
Blair McBride 2011-06-08 22:46:16 +12:00
parent 7804781a5b
commit ac0532ca49
3 changed files with 19 additions and 4 deletions

View File

@ -864,6 +864,9 @@ pref("breakpad.reportURL", "http://crash-stats.mozilla.com/report/index/");
// base URL for web-based support pages
pref("app.support.baseURL", "http://support.mozilla.com/1/firefox/%VERSION%/%OS%/%LOCALE%/");
// URL for web-based support page on how to upgrade a graphics driver
pref("app.support.updateGraphicsDriverURL", "http://support.mozilla.com/%LOCALE%/kb/how-do-i-upgrade-my-graphics-drivers");
// Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
pref("security.alternate_certificate_error_page", "certerror");

View File

@ -197,7 +197,7 @@ function populateGraphicsSection() {
suggestedDriverVersion = gfxInfo.getFeatureSuggestedDriverVersion(feature);
} catch(e) {}
if (suggestedDriverVersion)
errorMessage = bundle.formatStringFromName("tryNewerDriver", [suggestedDriverVersion], 1);
errorMessage = bundle.formatStringFromName("tryNewerDriver2", [suggestedDriverVersion], 1);
else
errorMessage = bundle.GetStringFromName("blockedDriver");
break;
@ -342,6 +342,17 @@ function populateGraphicsSection() {
createElement("td", msg),
])
]);
let urlFormatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"]
.getService(Ci.nsIURLFormatter);
let supportUrl = urlFormatter.formatURLPref("app.support.updateGraphicsDriverURL");
if (supportUrl != "about:blank") {
let links = graphics_tbody.querySelectorAll(".supportLink-graphicsDriver");
for (let i = 0; i < links.length; i++) {
links[i].href = supportUrl;
links[i].target = "_blank";
}
}
}
function getPrefValue(aName) {
@ -406,9 +417,9 @@ function createParentElement(tagName, childElems) {
return elem;
}
function createElement(tagName, textContent, opt_class) {
function createElement(tagName, content, opt_class) {
let elem = document.createElement(tagName);
elem.textContent = textContent;
elem.innerHTML = content;
elem.className = opt_class || "";
return elem;
}

View File

@ -12,7 +12,8 @@ acceleratedWindows = GPU Accelerated Windows
blockedDriver = Blocked for your graphics driver version.
# LOCALIZATION NOTE The %S here is a placeholder, leave unchanged, it will get replaced by the driver version string.
tryNewerDriver = Blocked for your graphics driver version. Try updating your graphics driver to version %S or newer.
# Don't translate <a class="supportLink-graphicsDriver"> - it is used to link to a support article.
tryNewerDriver2 = Blocked for your graphics driver version. Try <a class="supportLink-graphicsDriver">updating your graphics driver</a> to version %S or newer.
# LOCALIZATION NOTE The verb "blocked" here refers to a graphics feature such as "Direct2D" or "OpenGL layers".
blockedGfxCard = Blocked for your graphics card because of unresolved driver issues.