зеркало из https://github.com/mozilla/gecko-dev.git
Bug 597738 - Display build architecture (32-bit or 64-bit) to the About dialog. r=dolske
This commit is contained in:
Родитель
f5298ba1b7
Коммит
7a2e464c59
|
@ -2,6 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Services = object with smart getters for common XPCOM services
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
@ -39,19 +41,30 @@ function init(aEvent)
|
|||
}
|
||||
|
||||
// Include the build ID and display warning if this is an "a#" (nightly or aurora) build
|
||||
let versionField = document.getElementById("version");
|
||||
let version = Services.appinfo.version;
|
||||
if (/a\d+$/.test(version)) {
|
||||
let buildID = Services.appinfo.appBuildID;
|
||||
let buildDate = buildID.slice(0, 4) + "-" + buildID.slice(4, 6) + "-" + buildID.slice(6, 8);
|
||||
document.getElementById("version").textContent += " (" + buildDate + ")";
|
||||
let year = buildID.slice(0, 4);
|
||||
let month = buildID.slice(4, 6);
|
||||
let day = buildID.slice(6, 8);
|
||||
versionField.textContent += ` (${year}-${month}-${day})`;
|
||||
|
||||
document.getElementById("experimental").hidden = false;
|
||||
document.getElementById("communityDesc").hidden = true;
|
||||
}
|
||||
|
||||
// Append "(32-bit)" or "(64-bit)" build architecture to the version number:
|
||||
let bundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
|
||||
let archResource = Services.appinfo.is64Bit
|
||||
? "aboutDialog.architecture.sixtyFourBit"
|
||||
: "aboutDialog.architecture.thirtyTwoBit";
|
||||
let arch = bundle.GetStringFromName(archResource);
|
||||
versionField.textContent += ` (${arch})`;
|
||||
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
gAppUpdater = new appUpdater();
|
||||
|
||||
let defaults = Services.prefs.getDefaultBranch("");
|
||||
let channelLabel = document.getElementById("currentChannel");
|
||||
let currentChannelText = document.getElementById("currentChannelText");
|
||||
channelLabel.value = UpdateUtils.UpdateChannel;
|
||||
|
|
|
@ -745,3 +745,11 @@ decoder.noHWAcceleration.message = To improve video quality, you may need to ins
|
|||
decoder.noHWAccelerationVista.message = To improve video quality, you may need to install Microsoft’s Platform Update Supplement for Windows Vista.
|
||||
|
||||
permissions.remove.tooltip = Clear this permission and ask again
|
||||
|
||||
# LOCALIZATION NOTE (aboutDialog.architecture.*):
|
||||
# The sixtyFourBit and thirtyTwoBit strings describe the architecture of the
|
||||
# current Firefox build: 32-bit or 64-bit. These strings are used in parentheses
|
||||
# between the Firefox version and the "What's new" link in the About dialog,
|
||||
# e.g.: "48.0.2 (32-bit) <What's new>" or "51.0a1 (2016-09-05) (64-bit)".
|
||||
aboutDialog.architecture.sixtyFourBit = 64-bit
|
||||
aboutDialog.architecture.thirtyTwoBit = 32-bit
|
||||
|
|
Загрузка…
Ссылка в новой задаче