Bug 812762 - Use &brandShortName; instead of Firefox; r=jwalker

This commit is contained in:
Raymond Heldt 2013-02-22 16:37:48 +00:00
Родитель 40abf1ce6f
Коммит 6d358331e7
4 изменённых файлов: 37 добавлений и 21 удалений

Просмотреть файл

@ -4,6 +4,11 @@
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const BRAND_SHORT_NAME = Cc["@mozilla.org/intl/stringbundle;1"]
.getService(Ci.nsIStringBundleService)
.createBundle("chrome://branding/locale/brand.properties")
.GetStringFromName("brandShortName");
this.EXPORTED_SYMBOLS = [ "CmdAddonFlags", "CmdCommands" ];
Cu.import("resource:///modules/devtools/gcli.jsm");
@ -1791,14 +1796,15 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
* >> restart --nocache
* - restarts immediately and starts Firefox without using cache
*/
gcli.addCommand({
name: "restart",
description: gcli.lookup("restartFirefoxDesc"),
description: gcli.lookupFormat("restartBrowserDesc", [BRAND_SHORT_NAME]),
params: [
{
name: "nocache",
type: "boolean",
description: gcli.lookup("restartFirefoxNocacheDesc")
description: gcli.lookup("restartBrowserNocacheDesc")
}
],
returnType: "string",
@ -1807,7 +1813,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
.createInstance(Ci.nsISupportsPRBool);
Services.obs.notifyObservers(canceled, "quit-application-requested", "restart");
if (canceled.data) {
return gcli.lookup("restartFirefoxRequestCancelled");
return gcli.lookup("restartBrowserRequestCancelled");
}
// disable loading content from cache.
@ -1819,7 +1825,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
Cc['@mozilla.org/toolkit/app-startup;1']
.getService(Ci.nsIAppStartup)
.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
return gcli.lookup("restartFirefoxRestarting");
return gcli.lookupFormat("restartBrowserRestarting", [BRAND_SHORT_NAME]);
}
});
}(this));
@ -1862,8 +1868,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
{
name: "chrome",
type: "boolean",
description: gcli.lookup("screenshotChromeDesc"),
manual: gcli.lookup("screenshotChromeManual")
description: gcli.lookupFormat("screenshotChromeDesc", [BRAND_SHORT_NAME]),
manual: gcli.lookupFormat("screenshotChromeManual", [BRAND_SHORT_NAME])
},
{
name: "delay",

Просмотреть файл

@ -4,6 +4,11 @@
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const BRAND_SHORT_NAME = Cc["@mozilla.org/intl/stringbundle;1"].
getService(Ci.nsIStringBundleService).
createBundle("chrome://branding/locale/brand.properties").
GetStringFromName("brandShortName");
this.EXPORTED_SYMBOLS = [ ];
Cu.import("resource:///modules/devtools/gcli.jsm");
@ -17,14 +22,14 @@ gcli.addCommand({
gcli.addCommand({
name: 'resize on',
description: gcli.lookup('resizeModeOnDesc'),
manual: gcli.lookup('resizeModeManual'),
manual: gcli.lookupFormat('resizeModeManual', [BRAND_SHORT_NAME]),
exec: gcli_cmd_resize
});
gcli.addCommand({
name: 'resize off',
description: gcli.lookup('resizeModeOffDesc'),
manual: gcli.lookup('resizeModeManual'),
manual: gcli.lookupFormat('resizeModeManual', [BRAND_SHORT_NAME]),
exec: gcli_cmd_resize
});
@ -34,7 +39,7 @@ gcli.addCommand({
buttonClass: "command-button",
tooltipText: gcli.lookup("resizeModeToggleTooltip"),
description: gcli.lookup('resizeModeToggleDesc'),
manual: gcli.lookup('resizeModeManual'),
manual: gcli.lookupFormat('resizeModeManual', [BRAND_SHORT_NAME]),
state: {
isChecked: function(aTarget) {
let browserWindow = aTarget.tab.ownerDocument.defaultView;

Просмотреть файл

@ -337,7 +337,7 @@ introManual=Redisplay the message that is shown to new users until they click th
# first opens the developer toolbar to explain the command line, and is shown
# each time it is opened until the user clicks the 'Got it!' button. This
# string is the opening paragraph of the intro text.
introTextOpening=The Firefox command line is designed for developers. It focuses on speed of input over JavaScript syntax and a rich display over monospace output.
introTextOpening=This command line is designed for developers. It focuses on speed of input over JavaScript syntax and a rich display over monospace output.
# LOCALIZATION NOTE (introTextCommands): For information about the 'intro
# text' see introTextOpening. The second paragraph is in 2 sections, the first

Просмотреть файл

@ -73,12 +73,14 @@ screenshotClipboardManual=True if you want to copy the screenshot instead of sav
# LOCALIZATION NOTE (screenshotChromeDesc) A very short string to describe
# the 'chrome' parameter to the 'screenshot' command, which is displayed in
# a dialog when the user is using this command.
screenshotChromeDesc=Capture Firefox chrome window? (true/false)
# The argument (%1$S) is the browser name.
screenshotChromeDesc=Capture %1$S chrome window? (true/false)
# LOCALIZATION NOTE (screenshotChromeManual) A fuller description of the
# 'chrome' parameter to the 'screenshot' command, displayed when the user
# asks for help on what it does.
screenshotChromeManual=True if you want to take the screenshot of the Firefox window rather than the web page's content window.
# The argument (%1$S) is the browser name.
screenshotChromeManual=True if you want to take the screenshot of the %1$S window rather than the web page's content window.
# LOCALIZATION NOTE (screenshotGroupOptions) A label for the optional options of
# the screenshot command.
@ -131,23 +133,25 @@ screenshotErrorCopying=Error occurred while copying to clipboard.
# screenshot is successfully copied to the clipboard.
screenshotCopied=Copied to clipboard.
# LOCALIZATION NOTE (restartFirefoxDesc) A very short description of the
# LOCALIZATION NOTE (restartBrowserDesc) A very short description of the
# 'restart' command. This string is designed to be shown in a menu alongside the
# command name, which is why it should be as short as possible.
restartFirefoxDesc=Restart Firefox
# The argument (%1$S) is the browser name.
restartBrowserDesc=Restart %1$S
# LOCALIZATION NOTE (restartFirefoxNocacheDesc) A very short string to
# LOCALIZATION NOTE (restartBrowserNocacheDesc) A very short string to
# describe the 'nocache' parameter to the 'restart' command, which is
# displayed in a dialog when the user is using this command.
restartFirefoxNocacheDesc=Disables loading content from cache upon restart
restartBrowserNocacheDesc=Disables loading content from cache upon restart
# LOCALIZATION NOTE (restartFirefoxRequestCancelled) A string displayed to the
# LOCALIZATION NOTE (restartBrowserRequestCancelled) A string displayed to the
# user when a scheduled restart has been aborted by the user.
restartFirefoxRequestCancelled=Restart request cancelled by user.
restartBrowserRequestCancelled=Restart request cancelled by user.
# LOCALIZATION NOTE (restartFirefoxRestarting) A string displayed to the
# LOCALIZATION NOTE (restartBrowserRestarting) A string displayed to the
# user when a restart has been initiated without a delay.
restartFirefoxRestarting=Restarting Firefox…
# The argument (%1$S) is the browser name.
restartBrowserRestarting=Restarting %1$S…
# LOCALIZATION NOTE (inspectDesc) A very short description of the 'inspect'
# command. See inspectManual for a fuller description of what it does. This
@ -504,7 +508,8 @@ resizeModeDesc=Control Responsive Design Mode
# LOCALIZATION NOTE (resizeModeManual) A fuller description of the 'resize'
# command, displayed when the user asks for help on what it does.
resizeModeManual=Responsive websites respond to their environment, so they look good on a mobile display, a cinema display and everything in-between. Responsive Design Mode allows you to easily test a variety of page sizes in Firefox without needing to resize your whole browser.
# The argument (%1$S) is the browser name.
resizeModeManual=Responsive websites respond to their environment, so they look good on a mobile display, a cinema display and everything in-between. Responsive Design Mode allows you to easily test a variety of page sizes in %1$S without needing to resize your whole browser.
# LOCALIZATION NOTE (cmdDesc) A very short description of the 'cmd'
# command. This string is designed to be shown in a menu alongside the command