Bug 1316855 - Tooltip of "Toolbox Buttons" should show their shortcut. r=jryans
This commit is contained in:
@@ -13,6 +13,8 @@ const BRAND_SHORT_NAME = Cc["@mozilla.org/intl/stringbundle;1"].
|
|||||||
createBundle("chrome://branding/locale/brand.properties").
|
createBundle("chrome://branding/locale/brand.properties").
|
||||||
GetStringFromName("brandShortName");
|
GetStringFromName("brandShortName");
|
||||||
|
|
||||||
|
const Services = require("Services");
|
||||||
|
const osString = Services.appinfo.OS;
|
||||||
const l10n = require("gcli/l10n");
|
const l10n = require("gcli/l10n");
|
||||||
|
|
||||||
exports.items = [
|
exports.items = [
|
||||||
@@ -42,7 +44,8 @@ exports.items = [
|
|||||||
name: "resize toggle",
|
name: "resize toggle",
|
||||||
buttonId: "command-button-responsive",
|
buttonId: "command-button-responsive",
|
||||||
buttonClass: "command-button command-button-invertable",
|
buttonClass: "command-button command-button-invertable",
|
||||||
tooltipText: l10n.lookup("resizeModeToggleTooltip"),
|
tooltipText: l10n.lookupFormat("resizeModeToggleTooltip2",
|
||||||
|
[(osString == "Darwin" ? "Cmd+Opt+M" : "Ctrl+Shift+M")]),
|
||||||
description: l10n.lookup("resizeModeToggleDesc"),
|
description: l10n.lookup("resizeModeToggleDesc"),
|
||||||
manual: l10n.lookupFormat("resizeModeManual2", [BRAND_SHORT_NAME]),
|
manual: l10n.lookupFormat("resizeModeManual2", [BRAND_SHORT_NAME]),
|
||||||
state: {
|
state: {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ exports.items = [
|
|||||||
hidden: true,
|
hidden: true,
|
||||||
buttonId: "command-button-splitconsole",
|
buttonId: "command-button-splitconsole",
|
||||||
buttonClass: "command-button command-button-invertable",
|
buttonClass: "command-button command-button-invertable",
|
||||||
tooltipText: l10n.lookup("splitconsoleTooltip"),
|
tooltipText: l10n.lookupFormat("splitconsoleTooltip2", ["Esc"]),
|
||||||
isRemoteSafe: true,
|
isRemoteSafe: true,
|
||||||
state: {
|
state: {
|
||||||
isChecked: function (target) {
|
isChecked: function (target) {
|
||||||
|
|||||||
@@ -546,7 +546,8 @@ resizeModeToggleDesc=Toggle Responsive Design Mode
|
|||||||
|
|
||||||
# LOCALIZATION NOTE (resizeModeToggleTooltip) A string displayed as the
|
# LOCALIZATION NOTE (resizeModeToggleTooltip) A string displayed as the
|
||||||
# tooltip of button in devtools toolbox which toggles Responsive Design Mode.
|
# tooltip of button in devtools toolbox which toggles Responsive Design Mode.
|
||||||
resizeModeToggleTooltip=Responsive Design Mode
|
# Keyboard shortcut will be shown inside brackets.
|
||||||
|
resizeModeToggleTooltip2=Responsive Design Mode (%S)
|
||||||
|
|
||||||
# LOCALIZATION NOTE (resizeModeToDesc) A very short string to describe the
|
# LOCALIZATION NOTE (resizeModeToDesc) A very short string to describe the
|
||||||
# 'resize to' command. This string is designed to be shown in a menu
|
# 'resize to' command. This string is designed to be shown in a menu
|
||||||
@@ -1230,7 +1231,8 @@ paintflashingToggleDesc=Toggle paint flashing
|
|||||||
|
|
||||||
# LOCALIZATION NOTE (splitconsoleTooltip) A string displayed as the
|
# LOCALIZATION NOTE (splitconsoleTooltip) A string displayed as the
|
||||||
# tooltip of button in devtools toolbox which toggles the split webconsole.
|
# tooltip of button in devtools toolbox which toggles the split webconsole.
|
||||||
splitconsoleTooltip=Toggle split console
|
# Keyboard shortcut will be shown inside brackets.
|
||||||
|
splitconsoleTooltip2=Toggle split console (%S)
|
||||||
|
|
||||||
# LOCALIZATION NOTE (appCacheDesc) A very short string used to describe the
|
# LOCALIZATION NOTE (appCacheDesc) A very short string used to describe the
|
||||||
# function of the "appcache" command
|
# function of the "appcache" command
|
||||||
|
|||||||
Reference in New Issue
Block a user