diff --git a/browser/devtools/framework/ToolDefinitions.jsm b/browser/devtools/framework/ToolDefinitions.jsm index 35f9885a50b8..e23dd1a6ac99 100644 --- a/browser/devtools/framework/ToolDefinitions.jsm +++ b/browser/devtools/framework/ToolDefinitions.jsm @@ -69,6 +69,8 @@ let webConsoleDefinition = { icon: "chrome://browser/skin/devtools/webconsole-tool-icon.png", url: "chrome://browser/content/devtools/webconsole.xul", label: l10n("ToolboxWebconsole.label", webConsoleStrings), + tooltip: l10n("ToolboxWebconsole.tooltip", webConsoleStrings), + isTargetSupported: function(target) { return true; }, @@ -88,6 +90,7 @@ let debuggerDefinition = { icon: "chrome://browser/skin/devtools/tools-icons-small.png", url: "chrome://browser/content/debugger.xul", label: l10n("ToolboxDebugger.label", debuggerStrings), + tooltip: l10n("ToolboxDebugger.tooltip", debuggerStrings), isTargetSupported: function(target) { return true; @@ -108,6 +111,7 @@ let inspectorDefinition = { icon: "chrome://browser/skin/devtools/tools-icons-small.png", url: "chrome://browser/content/devtools/inspector/inspector.xul", label: l10n("inspector.label", inspectorStrings), + tooltip: l10n("inspector.tooltip", inspectorStrings), isTargetSupported: function(target) { return !target.isRemote; @@ -127,6 +131,7 @@ let styleEditorDefinition = { modifiers: "shift", label: l10n("ToolboxStyleEditor.label", styleEditorStrings), url: "chrome://browser/content/styleeditor.xul", + tooltip: l10n("ToolboxStyleEditor.tooltip", styleEditorStrings), isTargetSupported: function(target) { return !target.isRemote && !target.isChrome; @@ -144,6 +149,7 @@ let profilerDefinition = { icon: "chrome://browser/skin/devtools/tools-icons-small.png", url: "chrome://browser/content/profiler.xul", label: l10n("profiler.label", profilerStrings), + tooltip: l10n("profiler.tooltip", profilerStrings), isTargetSupported: function (target) { if (target.isRemote || target.isChrome) { diff --git a/browser/devtools/framework/Toolbox.jsm b/browser/devtools/framework/Toolbox.jsm index 165a26d0c716..51f439851dfb 100644 --- a/browser/devtools/framework/Toolbox.jsm +++ b/browser/devtools/framework/Toolbox.jsm @@ -16,6 +16,17 @@ XPCOMUtils.defineLazyModuleGetter(this, "Hosts", "resource:///modules/devtools/ToolboxHosts.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "CommandUtils", "resource:///modules/devtools/DeveloperToolbar.jsm"); +XPCOMUtils.defineLazyGetter(this, "toolboxStrings", function() { + let bundle = Services.strings.createBundle("chrome://browser/locale/devtools/toolbox.properties"); + let l10n = function(name) { + try { + return bundle.GetStringFromName(name); + } catch (ex) { + Services.console.logStringMessage("Error reading '" + name + "'"); + } + }; + return l10n; +}); // DO NOT put Require.jsm or gcli.jsm into lazy getters as this breaks the // requisition import a few lines down. @@ -285,6 +296,8 @@ Toolbox.prototype = { let button = this.doc.createElement("toolbarbutton"); button.id = "toolbox-dock-" + position; button.className = "toolbox-dock-button"; + button.setAttribute("tooltiptext", toolboxStrings("toolboxDockButtons." + + position + ".tooltip")); button.addEventListener("command", function(position) { this.switchHost(position); }.bind(this, position)); @@ -348,6 +361,7 @@ Toolbox.prototype = { radio.className = "toolbox-tab devtools-tab"; radio.id = "toolbox-tab-" + id; radio.setAttribute("toolid", id); + radio.setAttribute("tooltiptext", toolDefinition.tooltip); let ordinal = (typeof toolDefinition.ordinal == "number") ? toolDefinition.ordinal : MAX_ORDINAL; diff --git a/browser/devtools/framework/toolbox.xul b/browser/devtools/framework/toolbox.xul index 8fa7e1ddc4da..b7c97a7b90b2 100644 --- a/browser/devtools/framework/toolbox.xul +++ b/browser/devtools/framework/toolbox.xul @@ -2,6 +2,10 @@ + + %toolboxDTD; +]> @@ -15,7 +19,9 @@ #ifdef XP_MACOSX - + #endif @@ -25,7 +31,9 @@ #ifndef XP_MACOSX - + #endif diff --git a/browser/locales/en-US/chrome/browser/devtools/debugger.properties b/browser/locales/en-US/chrome/browser/devtools/debugger.properties index 3547726e5d61..b8628fd4332b 100644 --- a/browser/locales/en-US/chrome/browser/devtools/debugger.properties +++ b/browser/locales/en-US/chrome/browser/devtools/debugger.properties @@ -186,6 +186,11 @@ globalScopeLabel=Global # displayed inside the developer tools window and in the Developer Tools Menu. ToolboxDebugger.label=Debugger +# LOCALIZATION NOTE (ToolboxDebugger.tooltip): +# This string is displayed in the tooltip of the tab when the debugger is +# displayed inside the developer tools window.. +ToolboxDebugger.tooltip=JavaScript Debugger + # LOCALIZATION NOTE (variablesEditableNameTooltip): The text that is displayed # in the variables list on an item with an editable name. variablesEditableNameTooltip=Double click to edit diff --git a/browser/locales/en-US/chrome/browser/devtools/inspector.properties b/browser/locales/en-US/chrome/browser/devtools/inspector.properties index 7379ca223bb6..bd4729c34804 100644 --- a/browser/locales/en-US/chrome/browser/devtools/inspector.properties +++ b/browser/locales/en-US/chrome/browser/devtools/inspector.properties @@ -33,6 +33,7 @@ nodeMenu.tooltiptext=Node operations inspector.label=Inspector inspector.commandkey=I inspector.accesskey=I +inspector.tooltip=DOM and Style Inspector # LOCALIZATION NOTE (markupView.more.*) # When there are too many nodes to load at once, we will offer to diff --git a/browser/locales/en-US/chrome/browser/devtools/profiler.properties b/browser/locales/en-US/chrome/browser/devtools/profiler.properties index c0254d32a6b1..e77dfabd8c26 100644 --- a/browser/locales/en-US/chrome/browser/devtools/profiler.properties +++ b/browser/locales/en-US/chrome/browser/devtools/profiler.properties @@ -13,4 +13,9 @@ # LOCALIZATION NOTE (profiler.label): # This string is displayed in the title of the tab when the profiler is # displayed inside the developer tools window and in the Developer Tools Menu. -profiler.label=Profiler \ No newline at end of file +profiler.label=Profiler + +# LOCALIZATION NOTE (profiler.tooltip): +# This string is displayed in the tooltip of the tab when the profiler is +# displayed inside the developer tools window. +profiler.tooltip=Profiler diff --git a/browser/locales/en-US/chrome/browser/devtools/styleeditor.properties b/browser/locales/en-US/chrome/browser/devtools/styleeditor.properties index dca0bc6d81c9..6ae596ca8e47 100644 --- a/browser/locales/en-US/chrome/browser/devtools/styleeditor.properties +++ b/browser/locales/en-US/chrome/browser/devtools/styleeditor.properties @@ -78,3 +78,8 @@ redo.commandkey=Z # This string is displayed in the title of the tab when the debugger is # displayed inside the developer tools window and in the Developer Tools Menu. ToolboxStyleEditor.label=Style Editor + +# LOCALIZATION NOTE (ToolboxStyleEditor.tooltip): +# This string is displayed in the tooltip of the tab when the debugger is +# displayed inside the developer tools window. +ToolboxStyleEditor.tooltip=CSS Stylesheets Editor diff --git a/browser/locales/en-US/chrome/browser/devtools/toolbox.dtd b/browser/locales/en-US/chrome/browser/devtools/toolbox.dtd index 29b63269353b..b8fb9eccf0cd 100644 --- a/browser/locales/en-US/chrome/browser/devtools/toolbox.dtd +++ b/browser/locales/en-US/chrome/browser/devtools/toolbox.dtd @@ -5,3 +5,5 @@ + + \ No newline at end of file diff --git a/browser/locales/en-US/chrome/browser/devtools/toolbox.properties b/browser/locales/en-US/chrome/browser/devtools/toolbox.properties new file mode 100644 index 000000000000..74f672b72956 --- /dev/null +++ b/browser/locales/en-US/chrome/browser/devtools/toolbox.properties @@ -0,0 +1,3 @@ +toolboxDockButtons.bottom.tooltip=Dock to bottom of browser window +toolboxDockButtons.side.tooltip=Dock to side of browser window +toolboxDockButtons.window.tooltip=Show in separate window diff --git a/browser/locales/en-US/chrome/browser/devtools/webconsole.properties b/browser/locales/en-US/chrome/browser/devtools/webconsole.properties index 75784473847f..1f8e1ad41d28 100644 --- a/browser/locales/en-US/chrome/browser/devtools/webconsole.properties +++ b/browser/locales/en-US/chrome/browser/devtools/webconsole.properties @@ -174,6 +174,11 @@ listTabs.globalConsoleActor=*Global Console* # as webConsoleWindowTitleAndURL before the '-' ToolboxWebconsole.label=Web Console +# LOCALIZATION NOTE (ToolboxWebconsole.tooltip): +# This string is displayed in the tooltip of the tab when the web console is +# displayed inside the developer tools window. +ToolboxWebconsole.tooltip=Web Console + # LOCALIZATION NOTE (longStringEllipsis): The string displayed after a long # string. This string is clickable such that the rest of the string is retrieved # from the server.