Title: [196692] trunk/Source/WebInspectorUI
- Revision
- 196692
- Author
- [email protected]
- Date
- 2016-02-17 08:01:23 -0800 (Wed, 17 Feb 2016)
Log Message
Web Inspector: Add singular and plural cases for "Ignore n times before stopping" label in breakpoint editor
https://bugs.webkit.org/show_bug.cgi?id=154335
<rdar://problem/24655491>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
Added string for singular ignore count.
* UserInterface/Controllers/BreakpointPopoverController.js:
(WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
Remove unused variable "this._ignoreCount" and update ignore count text.
(WebInspector.BreakpointPopoverController.prototype._popoverIgnoreInputChanged):
Update ignore count text as value changes.
(WebInspector.BreakpointPopoverController.prototype._updateIgnoreCountText):
Set singular text when count === 1, otherwise set plural text.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (196691 => 196692)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-02-17 11:45:30 UTC (rev 196691)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-02-17 16:01:23 UTC (rev 196692)
@@ -1,3 +1,24 @@
+2016-02-17 Matt Baker <[email protected]>
+
+ Web Inspector: Add singular and plural cases for "Ignore n times before stopping" label in breakpoint editor
+ https://bugs.webkit.org/show_bug.cgi?id=154335
+ <rdar://problem/24655491>
+
+ Reviewed by Timothy Hatcher.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ Added string for singular ignore count.
+
+ * UserInterface/Controllers/BreakpointPopoverController.js:
+ (WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
+ Remove unused variable "this._ignoreCount" and update ignore count text.
+
+ (WebInspector.BreakpointPopoverController.prototype._popoverIgnoreInputChanged):
+ Update ignore count text as value changes.
+
+ (WebInspector.BreakpointPopoverController.prototype._updateIgnoreCountText):
+ Set singular text when count === 1, otherwise set plural text.
+
2016-02-16 Nikita Vasilyev <[email protected]>
REGRESSION (r196620): Web Inspector: Selecting last message in the console makes the scrollbar visible
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (196691 => 196692)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2016-02-17 11:45:30 UTC (rev 196691)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2016-02-17 16:01:23 UTC (rev 196692)
@@ -721,6 +721,7 @@
localizedStrings["key"] = "key";
localizedStrings["line "] = "line ";
localizedStrings["originally %s"] = "originally %s";
+localizedStrings["time before stopping"] = "time before stopping";
localizedStrings["times before stopping"] = "times before stopping";
localizedStrings["value"] = "value";
localizedStrings[" %s Profile Recorded"] = " %s Profile Recorded";
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js (196691 => 196692)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js 2016-02-17 11:45:30 UTC (rev 196691)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js 2016-02-17 16:01:23 UTC (rev 196692)
@@ -180,13 +180,14 @@
this._ignoreCountInput.id = "edit-breakpoint-popover-ignore";
this._ignoreCountInput.type = "number";
this._ignoreCountInput.min = 0;
- this._ignoreCountInput.value = this._ignoreCount || 0;
+ this._ignoreCountInput.value = 0;
this._ignoreCountInput.addEventListener("change", this._popoverIgnoreInputChanged.bind(this));
- let ignoreCountText = ignoreCountData.appendChild(document.createElement("span"));
ignoreCountLabel.setAttribute("for", this._ignoreCountInput.id);
ignoreCountLabel.textContent = WebInspector.UIString("Ignore");
- ignoreCountText.textContent = WebInspector.UIString("times before stopping");
+
+ this._ignoreCountText = ignoreCountData.appendChild(document.createElement("span"));
+ this._updateIgnoreCountText();
}
let actionRow = table.appendChild(document.createElement("tr"));
@@ -259,6 +260,8 @@
this._ignoreCountInput.value = ignoreCount;
this._breakpoint.ignoreCount = ignoreCount;
+
+ this._updateIgnoreCountText();
}
_popoverToggleAutoContinueCheckboxChanged(event)
@@ -298,6 +301,14 @@
}
}
+ _updateIgnoreCountText()
+ {
+ if (this._breakpoint.ignoreCount === 1)
+ this._ignoreCountText.textContent = WebInspector.UIString("time before stopping");
+ else
+ this._ignoreCountText.textContent = WebInspector.UIString("times before stopping");
+ }
+
breakpointActionViewAppendActionView(breakpointActionView, newAction)
{
let newBreakpointActionView = new WebInspector.BreakpointActionView(newAction, this);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes