diff --git a/devtools/client/responsivedesign/resize-commands.js b/devtools/client/responsivedesign/resize-commands.js index b2f884df871b..824bb8aa7819 100644 --- a/devtools/client/responsivedesign/resize-commands.js +++ b/devtools/client/responsivedesign/resize-commands.js @@ -13,6 +13,8 @@ const BRAND_SHORT_NAME = Cc["@mozilla.org/intl/stringbundle;1"]. createBundle("chrome://branding/locale/brand.properties"). GetStringFromName("brandShortName"); +const Services = require("Services"); +const osString = Services.appinfo.OS; const l10n = require("gcli/l10n"); exports.items = [ @@ -42,7 +44,8 @@ exports.items = [ name: "resize toggle", buttonId: "command-button-responsive", 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"), manual: l10n.lookupFormat("resizeModeManual2", [BRAND_SHORT_NAME]), state: { diff --git a/devtools/client/webconsole/console-commands.js b/devtools/client/webconsole/console-commands.js index 0bc9e8edb555..52e85a77e7a1 100644 --- a/devtools/client/webconsole/console-commands.js +++ b/devtools/client/webconsole/console-commands.js @@ -18,7 +18,7 @@ exports.items = [ hidden: true, buttonId: "command-button-splitconsole", buttonClass: "command-button command-button-invertable", - tooltipText: l10n.lookup("splitconsoleTooltip"), + tooltipText: l10n.lookupFormat("splitconsoleTooltip2", ["Esc"]), isRemoteSafe: true, state: { isChecked: function (target) { diff --git a/devtools/shared/locales/en-US/gclicommands.properties b/devtools/shared/locales/en-US/gclicommands.properties index 06a34e42b7d7..ec3d400692f2 100644 --- a/devtools/shared/locales/en-US/gclicommands.properties +++ b/devtools/shared/locales/en-US/gclicommands.properties @@ -546,7 +546,8 @@ resizeModeToggleDesc=Toggle Responsive Design Mode # LOCALIZATION NOTE (resizeModeToggleTooltip) A string displayed as the # 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 # '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 # 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 # function of the "appcache" command