diff --git a/extension/content/firebug/css/selectorPanel.js b/extension/content/firebug/css/selectorPanel.js index 89cf5ed33a..4a1b6502b2 100644 --- a/extension/content/firebug/css/selectorPanel.js +++ b/extension/content/firebug/css/selectorPanel.js @@ -360,24 +360,34 @@ var SelectorTemplate = domplate(BaseRep, var WarningTemplate = domplate(Firebug.Rep, { noSelectionTag: - TR({"class": "selectbugWarning "}, + TR({"class": "selectorWarning"}, TD({"class": "selectionElement"}, Locale.$STR("css.selector.noSelection")) ), noSelectionResultsTag: - TR({"class": "selectbugWarning "}, + TR({"class": "selectorWarning"}, TD({"class": "selectionElement"}, Locale.$STR("css.selector.noSelectionResults")) ), selectErrorTag: - TR({"class": "selectbugWarning"}, + TR({"class": "selectorWarning"}, TD({"class": "selectionElement"}, Locale.$STR("css.selector.selectorError")) ), selectErrorTextTag: - TR({"class": "selectbugWarning"}, - TD({"class": "selectionErrorText selectionElement"}, SPAN("$object")) + TR({"class": "selectorWarning"}, + TD({"class": "selectionErrorText selectionElement"}, + SPAN("$object|getErrorMessage") + ) ), + + getErrorMessage: function(object) + { + if (object.message) + return object.message; + + return Locale.$STR("css.selector.unknownErrorMessage"); + } }); // ********************************************************************************************* // diff --git a/extension/locale/en-US/firebug.properties b/extension/locale/en-US/firebug.properties index 685313702d..7f00ca3f39 100644 --- a/extension/locale/en-US/firebug.properties +++ b/extension/locale/en-US/firebug.properties @@ -1674,3 +1674,7 @@ css.selector.Selection=Selection panel.tip.selector=Displays elements matching a CSS selector css.selector.TryASelector=Try a selector... +# LOCALIZATION NOTE (css.selector.unknownErrorMessage): An error message displayed +# to the user if querySelectorAll (used by the Selector side panel) fails and there is no +# explanantion coming from the platform. +css.selector.unknownErrorMessage=Failed to execute specified selector string diff --git a/extension/skin/classic/selector.css b/extension/skin/classic/selector.css index d248e10c2e..bbfb3b0e7f 100644 --- a/extension/skin/classic/selector.css +++ b/extension/skin/classic/selector.css @@ -1,4 +1,5 @@ -/* Rules for selectbug's Selector panel elements */ +/* Rules for Selector panel elements */ + .cssSelectionTable { width: 100%; } @@ -6,7 +7,7 @@ padding: 0 0 0 1ex; } -.selectbugWarning { +.selectorWarning { font-size: 11px; color: gray; padding: 2px 0 0 1ex; @@ -18,7 +19,7 @@ background-color: #FFEBEB; } -/* Rules for selectbug's effect on CSS stylesheet panel */ +/* Rules for select panel's effect on CSS stylesheet panel */ .selectedSelectorRule { border-color: Highlight !important; background-color: #EBF5FF !important;