Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (245664 => 245665)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-05-23 00:44:42 UTC (rev 245665)
@@ -1,3 +1,58 @@
+2019-05-22 Nikita Vasilyev <[email protected]>
+
+ Web Inspector: Provide UIString descriptions to improve localizations
+ https://bugs.webkit.org/show_bug.cgi?id=195132
+ <rdar://problem/48457817>
+
+ Reviewed by Devin Rousso.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Base/LoadLocalizedStrings.js:
+ (WI.UIString):
+ (WI.repeatedUIString.timelineRecordLayout):
+ (WI.repeatedUIString.timelineRecordPaint):
+ (WI.repeatedUIString.timelineRecordComposite):
+ (WI.repeatedUIString.allExceptions):
+ (WI.repeatedUIString.uncaughtExceptions):
+ (WI.repeatedUIString.assertionFailures):
+ (WI.repeatedUIString.allRequests):
+ (WI.repeatedUIString.fetch):
+ (WI.repeatedUIString.revealInDOMTree):
+ * UserInterface/Models/LayoutTimelineRecord.js:
+ (WI.LayoutTimelineRecord.displayNameForEventType):
+ * UserInterface/Models/RenderingFrameTimelineRecord.js:
+ (WI.RenderingFrameTimelineRecord.displayNameForTaskType):
+ * UserInterface/Models/Resource.js:
+ (WI.Resource.displayNameForType):
+ * UserInterface/Views/AuditTestGroupContentView.js:
+ (WI.AuditTestGroupContentView.prototype.layout):
+ * UserInterface/Views/CPUTimelineView.js:
+ (WI.CPUTimelineView.displayNameForSampleType):
+ * UserInterface/Views/ContextMenuUtilities.js:
+ * UserInterface/Views/DOMBreakpointTreeElement.js:
+ (WI.DOMBreakpointTreeElement.displayNameForType):
+ * UserInterface/Views/DOMNodeTreeElement.js:
+ (WI.DOMNodeTreeElement.prototype.populateContextMenu):
+ (WI.DOMNodeTreeElement):
+ * UserInterface/Views/DOMTreeElement.js:
+ (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
+ * UserInterface/Views/DebuggerSidebarPanel.js:
+ (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
+ (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown):
+ (WI.DebuggerSidebarPanel):
+ * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
+ (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
+ * UserInterface/Views/NetworkTableContentView.js:
+ (WI.NetworkTableContentView.shortDisplayNameForResourceType):
+ (WI.NetworkTableContentView.prototype.initialLayout):
+ * UserInterface/Views/SourcesNavigationSidebarPanel.js:
+ (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
+ (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown):
+ * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
+ * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
+ (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
+
2019-05-22 Devin Rousso <[email protected]>
Web Inspector: provide a debug setting button to reset all settings for easier testing/presentation
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -97,8 +97,10 @@
localizedStrings["Address"] = "Address";
localizedStrings["All"] = "All";
localizedStrings["All Changes"] = "All Changes";
+/* Break (pause) on all exceptions */
localizedStrings["All Exceptions"] = "All Exceptions";
localizedStrings["All Layers"] = "All Layers";
+/* A submenu item of 'Break on' that breaks (pauses) before all network requests */
localizedStrings["All Requests"] = "All Requests";
localizedStrings["All Resources"] = "All Resources";
localizedStrings["All Storage"] = "All Storage";
@@ -127,6 +129,7 @@
localizedStrings["Assertion"] = "Assertion";
localizedStrings["Assertion Failed"] = "Assertion Failed";
localizedStrings["Assertion Failed: %s"] = "Assertion Failed: %s";
+/* Break (pause) when console.assert() fails */
localizedStrings["Assertion Failures"] = "Assertion Failures";
localizedStrings["Assertion with message: %s"] = "Assertion with message: %s";
localizedStrings["Assertive"] = "Assertive";
@@ -133,6 +136,7 @@
localizedStrings["Associated Data"] = "Associated Data";
localizedStrings["Async audits are not supported."] = "Async audits are not supported.";
localizedStrings["Attribute"] = "Attribute";
+/* A submenu item of 'Break On' that breaks (pauses) before DOM attribute is modified */
localizedStrings["Attribute Modified"] = "Attribute Modified";
localizedStrings["Attributes"] = "Attributes";
localizedStrings["Audit"] = "Audit";
@@ -196,6 +200,7 @@
localizedStrings["Canvas %s"] = "Canvas %s";
localizedStrings["Canvas Element"] = "Canvas Element";
localizedStrings["Canvases"] = "Canvases";
+/* Capture screenshot of the selected DOM node */
localizedStrings["Capture Screenshot"] = "Capture Screenshot";
localizedStrings["Capturing"] = "Capturing";
/* Context menu label for whether searches should be case sensitive. */
@@ -209,6 +214,7 @@
localizedStrings["Character Data"] = "Character Data";
localizedStrings["Charge \u201C%s\u201D to Callers"] = "Charge \u201C%s\u201D to Callers";
localizedStrings["Checked"] = "Checked";
+/* A submenu item of 'Add' to append DOM nodes to the selected DOM node */
localizedStrings["Child"] = "Child";
localizedStrings["Child Layers"] = "Child Layers";
localizedStrings["Child added to "] = "Child added to ";
@@ -243,7 +249,8 @@
localizedStrings["Comment"] = "Comment";
localizedStrings["Compare snapshots"] = "Compare snapshots";
localizedStrings["Comparison of total memory size at the end of the selected time range to the maximum memory size in this recording"] = "Comparison of total memory size at the end of the selected time range to the maximum memory size in this recording";
-localizedStrings["Composite"] = "Composite";
+/* Composite phase timeline records, where graphic layers are combined */
+localizedStrings["Composite @ Timeline record"] = "Composite";
localizedStrings["Composited"] = "Composited";
localizedStrings["Compressed"] = "Compressed";
localizedStrings["Compression"] = "Compression";
@@ -463,7 +470,9 @@
localizedStrings["Fade unexecuted code"] = "Fade unexecuted code";
localizedStrings["Failed to upgrade"] = "Failed to upgrade";
localizedStrings["Failure status code"] = "Failure status code";
+/* Resource loaded via 'fetch' method */
localizedStrings["Fetch"] = "Fetch";
+/* Resources loaded via 'fetch' method */
localizedStrings["Fetches"] = "Fetches";
localizedStrings["File or Resource"] = "File or Resource";
localizedStrings["Filename"] = "Filename";
@@ -480,7 +489,9 @@
localizedStrings["Force Dark Appearance"] = "Force Dark Appearance";
localizedStrings["Force Light Appearance"] = "Force Light Appearance";
localizedStrings["Force Print Media Styles"] = "Force Print Media Styles";
+/* Layout phase records that were imperative (forced) */
localizedStrings["Forced Layout"] = "Forced Layout";
+/* A context menu item to force (override) a DOM node's pseudo-classes */
localizedStrings["Forced Pseudo-Classes"] = "Forced Pseudo-Classes";
localizedStrings["Format: HSL"] = "Format: HSL";
localizedStrings["Format: HSLA"] = "Format: HSLA";
@@ -570,6 +581,7 @@
localizedStrings["Indexed Databases"] = "Indexed Databases";
localizedStrings["Info: "] = "Info: ";
localizedStrings["Infos"] = "Infos";
+/* A section of CSS rules matching an ancestor DOM node */
localizedStrings["Inherited From"] = "Inherited From";
localizedStrings["Initial State"] = "Initial State";
localizedStrings["Initial Velocity"] = "Initial Velocity";
@@ -598,8 +610,9 @@
localizedStrings["Layer Info"] = "Layer Info";
localizedStrings["Layers"] = "Layers";
localizedStrings["Layers:"] = "Layers:";
-localizedStrings["Layout"] = "Layout";
localizedStrings["Layout & Rendering"] = "Layout & Rendering";
+/* Layout phase timeline records */
+localizedStrings["Layout @ Timeline record"] = "Layout";
localizedStrings["Layout Invalidated"] = "Layout Invalidated";
localizedStrings["Line %d"] = "Line %d";
localizedStrings["Line %d:%d"] = "Line %d:%d";
@@ -617,10 +630,12 @@
localizedStrings["Located at %s"] = "Located at %s";
localizedStrings["Location"] = "Location";
localizedStrings["Log Canvas Context"] = "Log Canvas Context";
+/* Log (print) DOM element to Console */
localizedStrings["Log Element"] = "Log Element";
localizedStrings["Log Frame Text"] = "Log Frame Text";
localizedStrings["Log Frame Value"] = "Log Frame Value";
localizedStrings["Log Message"] = "Log Message";
+/* Log (print) DOM node to Console */
localizedStrings["Log Node"] = "Log Node";
localizedStrings["Log Symbol"] = "Log Symbol";
localizedStrings["Log Value"] = "Log Value";
@@ -664,6 +679,7 @@
localizedStrings["Network Requests"] = "Network Requests";
localizedStrings["Network Requests:"] = "Network Requests:";
localizedStrings["New Tab"] = "New Tab";
+/* A submenu item of 'Add' to add DOM nodes after the selected DOM node */
localizedStrings["Next Sibling"] = "Next Sibling";
localizedStrings["No"] = "No";
localizedStrings["No Accessibility Information"] = "No Accessibility Information";
@@ -704,6 +720,7 @@
localizedStrings["No response cookies."] = "No response cookies.";
localizedStrings["No response headers"] = "No response headers";
localizedStrings["Node"] = "Node";
+/* A submenu item of 'Break On' that breaks (pauses) before DOM node is removed */
localizedStrings["Node Removed"] = "Node Removed";
localizedStrings["Nodes"] = "Nodes";
localizedStrings["None"] = "None";
@@ -743,8 +760,11 @@
localizedStrings["Page Issue"] = "Page Issue";
localizedStrings["Page navigated at %s"] = "Page navigated at %s";
localizedStrings["Page reloaded at %s"] = "Page reloaded at %s";
-localizedStrings["Paint"] = "Paint";
+/* Paint (render) phase timeline records */
+localizedStrings["Paint @ Timeline record"] = "Paint";
localizedStrings["Paints"] = "Paints";
+/* A count of how many times an element was painted (rendered) */
+localizedStrings["Paints @ Column title"] = "Paints";
localizedStrings["Parent"] = "Parent";
localizedStrings["Partial Garbage Collection"] = "Partial Garbage Collection";
localizedStrings["Passive"] = "Passive";
@@ -774,6 +794,7 @@
localizedStrings["Pressed"] = "Pressed";
localizedStrings["Pretty print"] = "Pretty print";
localizedStrings["Preview"] = "Preview";
+/* A submenu item of 'Add' to add DOM nodes before the selected DOM node */
localizedStrings["Previous Sibling"] = "Previous Sibling";
localizedStrings["Primary Key"] = "Primary Key";
localizedStrings["Primary Key \u2014 %s"] = "Primary Key \u2014 %s";
@@ -861,9 +882,11 @@
localizedStrings["Return type for function: %s"] = "Return type for function: %s";
localizedStrings["Return value is not an object, string, or boolean"] = "Return value is not an object, string, or boolean";
localizedStrings["Reveal Breakpoint"] = "Reveal Breakpoint";
+/* Open Elements tab and select this node in DOM tree */
localizedStrings["Reveal in DOM Tree"] = "Reveal in DOM Tree";
localizedStrings["Reveal in Debugger Tab"] = "Reveal in Debugger Tab";
localizedStrings["Reveal in Elements Tab"] = "Reveal in Elements Tab";
+/* Open Layers tab and select the layer corresponding to this node */
localizedStrings["Reveal in Layers Tab"] = "Reveal in Layers Tab";
localizedStrings["Reveal in Network Tab"] = "Reveal in Network Tab";
localizedStrings["Reveal in Original Resource"] = "Reveal in Original Resource";
@@ -892,7 +915,8 @@
localizedStrings["Script Entries:"] = "Script Entries:";
localizedStrings["Script Evaluated"] = "Script Evaluated";
localizedStrings["Scripts"] = "Scripts";
-localizedStrings["Scroll Into View"] = "Scroll Into View";
+/* Scroll selected DOM node into view on the inspected web page */
+localizedStrings["Scroll into View"] = "Scroll into View";
localizedStrings["Search"] = "Search";
localizedStrings["Search Again"] = "Search Again";
localizedStrings["Search Resource Content"] = "Search Resource Content";
@@ -907,10 +931,12 @@
localizedStrings["Select comparison snapshot"] = "Select comparison snapshot";
localizedStrings["Selected"] = "Selected";
localizedStrings["Selected Canvas Context"] = "Selected Canvas Context";
+/* Selected DOM element */
localizedStrings["Selected Element"] = "Selected Element";
localizedStrings["Selected Frame"] = "Selected Frame";
localizedStrings["Selected Item"] = "Selected Item";
localizedStrings["Selected Items"] = "Selected Items";
+/* Selected DOM node */
localizedStrings["Selected Node"] = "Selected Node";
localizedStrings["Selected Symbol"] = "Selected Symbol";
localizedStrings["Selected Value"] = "Selected Value";
@@ -1011,6 +1037,7 @@
localizedStrings["Stop recording once page loads"] = "Stop recording once page loads";
localizedStrings["Stopping the \u201C%s\u201D audit"] = "Stopping the \u201C%s\u201D audit";
localizedStrings["Storage"] = "Storage";
+/* CSS properties defined via HTML style attribute */
localizedStrings["Style Attribute"] = "Style Attribute";
localizedStrings["Style Resolution"] = "Style Resolution";
localizedStrings["Style rule"] = "Style rule";
@@ -1023,6 +1050,7 @@
localizedStrings["Stylesheet"] = "Stylesheet";
localizedStrings["Stylesheets"] = "Stylesheets";
localizedStrings["Subject"] = "Subject";
+/* A submenu item of 'Break On' that breaks (pauses) before child DOM node is modified */
localizedStrings["Subtree Modified"] = "Subtree Modified";
localizedStrings["Summary"] = "Summary";
localizedStrings["TCP"] = "TCP";
@@ -1029,6 +1057,7 @@
localizedStrings["TIFF"] = "TIFF";
localizedStrings["Tab width:"] = "Tab width:";
localizedStrings["Tabs"] = "Tabs";
+/* A submenu item of 'Edit' to change DOM element's tag name */
localizedStrings["Tag"] = "Tag";
localizedStrings["Take snapshot"] = "Take snapshot";
localizedStrings["Target"] = "Target";
@@ -1091,6 +1120,7 @@
localizedStrings["Totals:"] = "Totals:";
localizedStrings["Trace"] = "Trace";
localizedStrings["Trace: %s"] = "Trace: %s";
+/* Amount of data sent over the network for a single resource */
localizedStrings["Transfer Size"] = "Transfer Size";
localizedStrings["Transferred"] = "Transferred";
localizedStrings["Triggered Breakpoint"] = "Triggered Breakpoint";
@@ -1105,6 +1135,7 @@
localizedStrings["Unable to determine path to property from root"] = "Unable to determine path to property from root";
localizedStrings["Unable to parse as JSON: %s"] = "Unable to parse as JSON: %s";
localizedStrings["Unable to show certificate for \u201C%s\u201D"] = "Unable to show certificate for \u201C%s\u201D";
+/* Break (pause) on uncaught (unhandled) exceptions */
localizedStrings["Uncaught Exceptions"] = "Uncaught Exceptions";
localizedStrings["Undefined custom element"] = "Undefined custom element";
localizedStrings["Unique"] = "Unique";
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -43,9 +43,17 @@
WI.UIString = function(string, key, comment)
{
+ "use strict";
+
if (WI.dontLocalizeUserInterface)
return string;
+ // UIString(string, comment)
+ if (arguments.length === 2) {
+ comment = key;
+ key = undefined;
+ }
+
key = key || string;
if (window.localizedStrings && key in window.localizedStrings)
@@ -64,3 +72,41 @@
return "LOCALIZED STRING NOT FOUND";
};
+
+WI.repeatedUIString = {};
+
+WI.repeatedUIString.timelineRecordLayout = function() {
+ return WI.UIString("Layout", "Layout @ Timeline record", "Layout phase timeline records");
+};
+
+WI.repeatedUIString.timelineRecordPaint = function() {
+ return WI.UIString("Paint", "Paint @ Timeline record", "Paint (render) phase timeline records");
+};
+
+WI.repeatedUIString.timelineRecordComposite = function() {
+ return WI.UIString("Composite", "Composite @ Timeline record", "Composite phase timeline records, where graphic layers are combined");
+};
+
+WI.repeatedUIString.allExceptions = function() {
+ return WI.UIString("All Exceptions", "Break (pause) on all exceptions");
+};
+
+WI.repeatedUIString.uncaughtExceptions = function() {
+ return WI.UIString("Uncaught Exceptions", "Break (pause) on uncaught (unhandled) exceptions");
+};
+
+WI.repeatedUIString.assertionFailures = function() {
+ return WI.UIString("Assertion Failures", "Break (pause) when console.assert() fails");
+};
+
+WI.repeatedUIString.allRequests = function() {
+ return WI.UIString("All Requests", "A submenu item of 'Break on' that breaks (pauses) before all network requests");
+};
+
+WI.repeatedUIString.fetch = function() {
+ return WI.UIString("Fetch", "Resource loaded via 'fetch' method");
+};
+
+WI.repeatedUIString.revealInDOMTree = function() {
+ return WI.UIString("Reveal in DOM Tree", "Open Elements tab and select this node in DOM tree");
+};
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/LayoutTimelineRecord.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Models/LayoutTimelineRecord.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/LayoutTimelineRecord.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -51,13 +51,13 @@
case WI.LayoutTimelineRecord.EventType.InvalidateLayout:
return WI.UIString("Layout Invalidated");
case WI.LayoutTimelineRecord.EventType.ForcedLayout:
- return WI.UIString("Forced Layout");
+ return WI.UIString("Forced Layout", "Layout phase records that were imperative (forced)");
case WI.LayoutTimelineRecord.EventType.Layout:
- return WI.UIString("Layout");
+ return WI.repeatedUIString.timelineRecordLayout();
case WI.LayoutTimelineRecord.EventType.Paint:
- return WI.UIString("Paint");
+ return WI.repeatedUIString.timelineRecordPaint();
case WI.LayoutTimelineRecord.EventType.Composite:
- return WI.UIString("Composite");
+ return WI.repeatedUIString.timelineRecordComposite();
}
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/RenderingFrameTimelineRecord.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Models/RenderingFrameTimelineRecord.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/RenderingFrameTimelineRecord.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -46,9 +46,9 @@
case WI.RenderingFrameTimelineRecord.TaskType.Script:
return WI.UIString("Script");
case WI.RenderingFrameTimelineRecord.TaskType.Layout:
- return WI.UIString("Layout");
+ return WI.repeatedUIString.timelineRecordLayout();
case WI.RenderingFrameTimelineRecord.TaskType.Paint:
- return WI.UIString("Paint");
+ return WI.repeatedUIString.timelineRecordPaint();
case WI.RenderingFrameTimelineRecord.TaskType.Other:
return WI.UIString("Other");
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -156,8 +156,8 @@
return WI.UIString("XHR");
case WI.Resource.Type.Fetch:
if (plural)
- return WI.UIString("Fetches");
- return WI.UIString("Fetch");
+ return WI.UIString("Fetches", "Resources loaded via 'fetch' method");
+ return WI.repeatedUIString.fetch();
case WI.Resource.Type.Ping:
if (plural)
return WI.UIString("Pings");
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -125,11 +125,11 @@
scopeBarItems.push(scopeBarItem);
};
- addScopeBarItem(WI.AuditTestCaseResult.Level.Pass, WI.UIString("%d Passed", "%d Passed (singular)"), WI.UIString("%d Passed", "%d Passed (plural)"));
+ addScopeBarItem(WI.AuditTestCaseResult.Level.Pass, WI.UIString("%d Passed", "%d Passed (singular)", ""), WI.UIString("%d Passed", "%d Passed (plural)", ""));
addScopeBarItem(WI.AuditTestCaseResult.Level.Warn, WI.UIString("%d Warning"), WI.UIString("%d Warnings"));
- addScopeBarItem(WI.AuditTestCaseResult.Level.Fail, WI.UIString("%d Failed", "%d Failed (singular)"), WI.UIString("%d Failed", "%d Failed (plural)"));
+ addScopeBarItem(WI.AuditTestCaseResult.Level.Fail, WI.UIString("%d Failed", "%d Failed (singular)", ""), WI.UIString("%d Failed", "%d Failed (plural)", ""));
addScopeBarItem(WI.AuditTestCaseResult.Level.Error, WI.UIString("%d Error"), WI.UIString("%d Errors"));
- addScopeBarItem(WI.AuditTestCaseResult.Level.Unsupported, WI.UIString("%d Unsupported", "%d Unsupported (singular)"), WI.UIString("%d Unsupported", "%d Unsupported (plural)"));
+ addScopeBarItem(WI.AuditTestCaseResult.Level.Unsupported, WI.UIString("%d Unsupported", "%d Unsupported (singular)", ""), WI.UIString("%d Unsupported", "%d Unsupported (plural)", ""));
this._levelScopeBar = new WI.ScopeBar(null, scopeBarItems);
this._levelScopeBar.addEventListener(WI.ScopeBar.Event.SelectionChanged, this._handleLevelScopeBarSelectionChanged, this);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -57,9 +57,9 @@
case WI.CPUTimelineView.SampleType.Script:
return WI.UIString("Script");
case WI.CPUTimelineView.SampleType.Layout:
- return WI.UIString("Layout");
+ return WI.repeatedUIString.timelineRecordLayout();
case WI.CPUTimelineView.SampleType.Paint:
- return WI.UIString("Paint");
+ return WI.repeatedUIString.timelineRecordPaint();
case WI.CPUTimelineView.SampleType.Style:
return WI.UIString("Style Resolution");
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -210,7 +210,7 @@
if (WI.cssManager.canForcePseudoClasses() && domNode.attached) {
contextMenu.appendSeparator();
- let pseudoSubMenu = contextMenu.appendSubMenuItem(WI.UIString("Forced Pseudo-Classes"));
+ let pseudoSubMenu = contextMenu.appendSubMenuItem(WI.UIString("Forced Pseudo-Classes", "A context menu item to force (override) a DOM node's pseudo-classes"));
let enabledPseudoClasses = domNode.enabledPseudoClasses;
WI.CSSManager.ForceablePseudoClasses.forEach((pseudoClass) => {
@@ -230,10 +230,10 @@
contextMenu.appendSeparator();
if (!options.excludeLogElement && !domNode.isInUserAgentShadowTree() && !domNode.isPseudoElement()) {
- let label = isElement ? WI.UIString("Log Element") : WI.UIString("Log Node");
+ let label = isElement ? WI.UIString("Log Element", "Log (print) DOM element to Console") : WI.UIString("Log Node", "Log (print) DOM node to Console");
contextMenu.appendItem(label, () => {
WI.RemoteObject.resolveNode(domNode, WI.RuntimeManager.ConsoleObjectGroup).then((remoteObject) => {
- let text = isElement ? WI.UIString("Selected Element") : WI.UIString("Selected Node");
+ let text = isElement ? WI.UIString("Selected Element", "Selected DOM element") : WI.UIString("Selected Node", "Selected DOM node");
const addSpecialUserLogClass = true;
WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass);
});
@@ -241,19 +241,19 @@
}
if (!options.excludeRevealElement && window.DOMAgent && attached) {
- contextMenu.appendItem(WI.UIString("Reveal in DOM Tree"), () => {
+ contextMenu.appendItem(WI.repeatedUIString.revealInDOMTree(), () => {
WI.domManager.inspectElement(domNode.id);
});
}
if (WI.settings.experimentalEnableLayersTab.value && window.LayerTreeAgent && attached) {
- contextMenu.appendItem(WI.UIString("Reveal in Layers Tab"), () => {
+ contextMenu.appendItem(WI.UIString("Reveal in Layers Tab", "Open Layers tab and select the layer corresponding to this node"), () => {
WI.showLayersTab({nodeToSelect: domNode});
});
}
if (window.PageAgent && attached) {
- contextMenu.appendItem(WI.UIString("Capture Screenshot"), () => {
+ contextMenu.appendItem(WI.UIString("Capture Screenshot", "Capture screenshot of the selected DOM node"), () => {
PageAgent.snapshotNode(domNode.id, (error, dataURL) => {
if (error) {
const target = WI.mainTarget;
@@ -276,7 +276,7 @@
}
if (isElement && attached) {
- contextMenu.appendItem(WI.UIString("Scroll Into View"), () => {
+ contextMenu.appendItem(WI.UIString("Scroll into View", "Scroll selected DOM node into view on the inspected web page"), () => {
domNode.scrollIntoView();
});
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMBreakpointTreeElement.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMBreakpointTreeElement.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMBreakpointTreeElement.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -50,11 +50,11 @@
{
switch (type) {
case WI.DOMBreakpoint.Type.SubtreeModified:
- return WI.UIString("Subtree Modified");
+ return WI.UIString("Subtree Modified", "A submenu item of 'Break On' that breaks (pauses) before child DOM node is modified");
case WI.DOMBreakpoint.Type.AttributeModified:
- return WI.UIString("Attribute Modified");
+ return WI.UIString("Attribute Modified", "A submenu item of 'Break On' that breaks (pauses) before DOM attribute is modified");
case WI.DOMBreakpoint.Type.NodeRemoved:
- return WI.UIString("Node Removed");
+ return WI.UIString("Node Removed", "A submenu item of 'Break On' that breaks (pauses) before DOM node is removed");
default:
console.error("Unexpected DOM breakpoint type: " + type);
return null;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeTreeElement.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeTreeElement.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeTreeElement.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -61,7 +61,7 @@
contextMenu.appendSeparator();
- contextMenu.appendItem(WI.UIString("Reveal in DOM Tree"), () => {
+ contextMenu.appendItem(WI.repeatedUIString.revealInDOMTree(), () => {
WI.domManager.inspectElement(this.representedObject.id);
});
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -764,16 +764,16 @@
if (isEditableNode) {
if (!forbiddenClosingTag) {
- subMenus.add.appendItem(WI.UIString("Child"), () => {
+ subMenus.add.appendItem(WI.UIString("Child", "A submenu item of 'Add' to append DOM nodes to the selected DOM node"), () => {
this._addHTML();
});
}
- subMenus.add.appendItem(WI.UIString("Previous Sibling"), () => {
+ subMenus.add.appendItem(WI.UIString("Previous Sibling", "A submenu item of 'Add' to add DOM nodes before the selected DOM node"), () => {
this._addPreviousSibling();
});
- subMenus.add.appendItem(WI.UIString("Next Sibling"), () => {
+ subMenus.add.appendItem(WI.UIString("Next Sibling", "A submenu item of 'Add' to add DOM nodes after the selected DOM node"), () => {
this._addNextSibling();
});
}
@@ -797,7 +797,7 @@
});
}
- subMenus.edit.appendItem(WI.UIString("Tag"), () => {
+ subMenus.edit.appendItem(WI.UIString("Tag", "A submenu item of 'Edit' to change DOM element's tag name"), () => {
this._startEditingTagName();
});
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -474,13 +474,13 @@
if (breakpoint === WI.debuggerManager.allExceptionsBreakpoint) {
options.className = WI.DebuggerSidebarPanel.ExceptionIconStyleClassName;
- options.title = WI.UIString("All Exceptions");
+ options.title = WI.repeatedUIString.allExceptions();
} else if (breakpoint === WI.debuggerManager.uncaughtExceptionsBreakpoint) {
options.className = WI.DebuggerSidebarPanel.ExceptionIconStyleClassName;
- options.title = WI.UIString("Uncaught Exceptions");
+ options.title = WI.repeatedUIString.uncaughtExceptions();
} else if (breakpoint === WI.debuggerManager.assertionFailuresBreakpoint) {
options.className = WI.DebuggerSidebarPanel.AssertionIconStyleClassName;
- options.title = WI.UIString("Assertion Failures");
+ options.title = WI.repeatedUIString.assertionFailures();
} else if (breakpoint instanceof WI.DOMBreakpoint) {
if (!breakpoint.domNodeIdentifier)
return null;
@@ -514,7 +514,7 @@
if (breakpoint === WI.domDebuggerManager.allRequestsBreakpoint) {
options.className = WI.DebuggerSidebarPanel.AssertionIconStyleClassName;
- options.title = WI.UIString("All Requests");
+ options.title = WI.repeatedUIString.allRequests();
}
} else {
let sourceCode = breakpoint.sourceCodeLocation && breakpoint.sourceCodeLocation.displaySourceCode;
@@ -1457,7 +1457,7 @@
if (InspectorBackend.domains.Debugger.setPauseOnAssertions) {
let assertionFailuresBreakpointShown = WI.settings.showAssertionFailuresBreakpoint.value;
- contextMenu.appendCheckboxItem(WI.UIString("Assertion Failures"), () => {
+ contextMenu.appendCheckboxItem(WI.repeatedUIString.assertionFailures(), () => {
if (assertionFailuresBreakpointShown)
WI.debuggerManager.removeBreakpoint(WI.debuggerManager.assertionFailuresBreakpoint);
else {
@@ -1479,7 +1479,7 @@
let allRequestsBreakpointShown = WI.settings.showAllRequestsBreakpoint.value;
- contextMenu.appendCheckboxItem(WI.UIString("All Requests"), () => {
+ contextMenu.appendCheckboxItem(WI.repeatedUIString.allRequests(), () => {
if (allRequestsBreakpointShown)
WI.domDebuggerManager.removeURLBreakpoint(WI.domDebuggerManager.allRequestsBreakpoint);
else {
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -136,7 +136,7 @@
columns.name.title = WI.UIString("Node");
columns.name.sortable = false;
- columns.paintCount.title = WI.UIString("Paints");
+ columns.paintCount.title = WI.UIString("Paints", "Paints @ Column title", "A count of how many times an element was painted (rendered)");
columns.paintCount.sortable = true;
columns.paintCount.aligned = "right";
columns.paintCount.width = "70px";
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -211,7 +211,7 @@
case WI.Resource.Type.XHR:
return "XHR";
case WI.Resource.Type.Fetch:
- return WI.UIString("Fetch");
+ return WI.repeatedUIString.fetch();
case WI.Resource.Type.Ping:
return WI.UIString("Ping");
case WI.Resource.Type.Beacon:
@@ -1172,7 +1172,7 @@
align: "right",
});
- this._transferSizeColumn = new WI.TableColumn("transferSize", WI.UIString("Transfer Size"), {
+ this._transferSizeColumn = new WI.TableColumn("transferSize", WI.UIString("Transfer Size", "Amount of data sent over the network for a single resource"), {
minWidth: 100,
maxWidth: 150,
initialWidth: 100,
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -889,13 +889,13 @@
if (breakpoint === WI.debuggerManager.allExceptionsBreakpoint) {
options.className = "breakpoint-exception-icon";
- options.title = WI.UIString("All Exceptions");
+ options.title = WI.repeatedUIString.allExceptions();
} else if (breakpoint === WI.debuggerManager.uncaughtExceptionsBreakpoint) {
options.className = "breakpoint-exception-icon";
- options.title = WI.UIString("Uncaught Exceptions");
+ options.title = WI.repeatedUIString.uncaughtExceptions();
} else if (breakpoint === WI.debuggerManager.assertionFailuresBreakpoint) {
options.className = "breakpoint-assertion-icon";
- options.title = WI.UIString("Assertion Failures");
+ options.title = WI.repeatedUIString.assertionFailures();
} else if (breakpoint instanceof WI.DOMBreakpoint) {
if (!breakpoint.domNodeIdentifier)
return null;
@@ -929,7 +929,7 @@
if (breakpoint === WI.domDebuggerManager.allRequestsBreakpoint) {
options.className = "breakpoint-assertion-icon";
- options.title = WI.UIString("All Requests");
+ options.title = WI.repeatedUIString.allRequests();
}
} else {
let sourceCode = breakpoint.sourceCodeLocation && breakpoint.sourceCodeLocation.displaySourceCode;
@@ -1508,7 +1508,7 @@
if (InspectorBackend.domains.Debugger.setPauseOnAssertions) {
let assertionFailuresBreakpointShown = WI.settings.showAssertionFailuresBreakpoint.value;
- contextMenu.appendCheckboxItem(WI.UIString("Assertion Failures"), () => {
+ contextMenu.appendCheckboxItem(WI.repeatedUIString.assertionFailures(), () => {
if (assertionFailuresBreakpointShown)
WI.debuggerManager.removeBreakpoint(WI.debuggerManager.assertionFailuresBreakpoint);
else {
@@ -1530,7 +1530,7 @@
let allRequestsBreakpointShown = WI.settings.showAllRequestsBreakpoint.value;
- contextMenu.appendCheckboxItem(WI.UIString("All Requests"), () => {
+ contextMenu.appendCheckboxItem(WI.repeatedUIString.allRequests(), () => {
if (allRequestsBreakpointShown)
WI.domDebuggerManager.removeURLBreakpoint(WI.domDebuggerManager.allRequestsBreakpoint);
else {
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -315,7 +315,7 @@
break;
case WI.CSSStyleDeclaration.Type.Inline:
- this._selectorElement.textContent = WI.UIString("Style Attribute");
+ this._selectorElement.textContent = WI.UIString("Style Attribute", "CSS properties defined via HTML style attribute");
this._selectorElement.classList.add("style-attribute");
break;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js (245664 => 245665)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js 2019-05-23 00:44:42 UTC (rev 245665)
@@ -256,7 +256,7 @@
let addSection = (section) => {
if (section.style.inherited && (!previousStyle || previousStyle.node !== section.style.node))
- addHeader(WI.UIString("Inherited From"), section.style.node);
+ addHeader(WI.UIString("Inherited From", "A section of CSS rules matching an ancestor DOM node"), section.style.node);
if (!section.isDescendantOf(this)) {
let referenceView = this.subviews[this._sections.length];
Modified: trunk/Tools/ChangeLog (245664 => 245665)
--- trunk/Tools/ChangeLog 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Tools/ChangeLog 2019-05-23 00:44:42 UTC (rev 245665)
@@ -1,3 +1,18 @@
+2019-05-22 Nikita Vasilyev <[email protected]>
+
+ Web Inspector: Provide UIString descriptions to improve localizations
+ https://bugs.webkit.org/show_bug.cgi?id=195132
+ <rdar://problem/48457817>
+
+ Reviewed by Devin Rousso.
+
+ Allow WI.UIString to take:
+ - WI.UIString(string, key, comment)
+ - WI.UIString(string, comment)
+ - WI.UIString(string)
+
+ * Scripts/extract-localizable-js-strings:
+
2019-05-22 Wenson Hsieh <[email protected]>
[iOS] The shouldIgnoreMetaViewport test option incorrectly persists across layout tests
Modified: trunk/Tools/Scripts/extract-localizable-js-strings (245664 => 245665)
--- trunk/Tools/Scripts/extract-localizable-js-strings 2019-05-23 00:43:09 UTC (rev 245664)
+++ trunk/Tools/Scripts/extract-localizable-js-strings 2019-05-23 00:44:42 UTC (rev 245665)
@@ -74,7 +74,15 @@
chomp;
# Handle WebInspector strings. Prints a warning if a non-string literal is passed to WI.UIString().
- HandleUIString($1, $2 || $1, $3 || "", $file, $.) while s/WI\.UIString\("([^"]+)"(?:,\s*"([^"]+)"(?:,\s*"([^"]+)")?)?\)//;
+ # Allow: WI.UIString(string, comment)
+ # WI.UIString(string, key, comment)
+ HandleUIString(
+ $1,
+ ($3 || (defined $3 and length $3 == 0)) ? $2 : $1,
+ ($3 || (defined $3 and length $3 == 0)) ? $3 : $2 || "",
+ $file,
+ $.
+ ) while s/WI\.UIString\("([^"]+)"(?:,\s*"([^"]*)"(?:,\s*"([^"]*)")?)?\)//;
print "$file:$.:WARNING: $&\n" while s/WI\.UIString\(.*?\)//;
# Handle strings for other projects that also use this script.