Changeset 244952 in webkit
- Timestamp:
- May 4, 2019 6:31:10 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r244951 r244952 1 2019-05-04 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: Provide UIString descriptions to improve localizations 4 https://bugs.webkit.org/show_bug.cgi?id=195132 5 <rdar://problem/48457817> 6 7 Reviewed by Devin Rousso. 8 9 * Localizations/en.lproj/localizedStrings.js: 10 * UserInterface/Base/LoadLocalizedStrings.js: 11 (WI.UIString): 12 (WI.repeatedUIString.timelineRecordLayout): 13 (WI.repeatedUIString.timelineRecordPaint): 14 (WI.repeatedUIString.timelineRecordComposite): 15 (WI.repeatedUIString.allExceptions): 16 (WI.repeatedUIString.uncaughtExceptions): 17 (WI.repeatedUIString.assertionFailures): 18 (WI.repeatedUIString.allRequests): 19 (WI.repeatedUIString.fetch): 20 (WI.repeatedUIString.revealInDOMTree): 21 * UserInterface/Models/LayoutTimelineRecord.js: 22 (WI.LayoutTimelineRecord.displayNameForEventType): 23 * UserInterface/Models/RenderingFrameTimelineRecord.js: 24 (WI.RenderingFrameTimelineRecord.displayNameForTaskType): 25 * UserInterface/Models/Resource.js: 26 (WI.Resource.displayNameForType): 27 * UserInterface/Views/AuditTestGroupContentView.js: 28 (WI.AuditTestGroupContentView.prototype.layout): 29 * UserInterface/Views/CPUTimelineView.js: 30 (WI.CPUTimelineView.displayNameForSampleType): 31 * UserInterface/Views/ContextMenuUtilities.js: 32 * UserInterface/Views/DOMBreakpointTreeElement.js: 33 (WI.DOMBreakpointTreeElement.displayNameForType): 34 * UserInterface/Views/DOMNodeTreeElement.js: 35 (WI.DOMNodeTreeElement.prototype.populateContextMenu): 36 (WI.DOMNodeTreeElement): 37 * UserInterface/Views/DOMTreeElement.js: 38 (WI.DOMTreeElement.prototype._populateTagContextMenu): 39 (WI.DOMTreeElement.prototype._populateNodeContextMenu): 40 * UserInterface/Views/DebuggerSidebarPanel.js: 41 (WI.DebuggerSidebarPanel.prototype._addBreakpoint): 42 (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): 43 (WI.DebuggerSidebarPanel): 44 * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: 45 (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection): 46 * UserInterface/Views/NetworkTableContentView.js: 47 (WI.NetworkTableContentView.shortDisplayNameForResourceType): 48 (WI.NetworkTableContentView.prototype.initialLayout): 49 * UserInterface/Views/SourcesNavigationSidebarPanel.js: 50 (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint): 51 (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): 52 * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: 53 (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector): 54 * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: 55 (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout): 56 1 57 2019-05-04 Nikita Vasilyev <nvasilyev@apple.com> 2 58 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r244946 r244952 98 98 localizedStrings["All"] = "All"; 99 99 localizedStrings["All Changes"] = "All Changes"; 100 /* Break (pause) on all exceptions */ 100 101 localizedStrings["All Exceptions"] = "All Exceptions"; 101 102 localizedStrings["All Layers"] = "All Layers"; 103 /* A submenu item of 'Break on' that breaks (pauses) before all network requests */ 102 104 localizedStrings["All Requests"] = "All Requests"; 103 105 localizedStrings["All Resources"] = "All Resources"; … … 128 130 localizedStrings["Assertion Failed"] = "Assertion Failed"; 129 131 localizedStrings["Assertion Failed: %s"] = "Assertion Failed: %s"; 132 /* Break (pause) when console.assert() fails */ 130 133 localizedStrings["Assertion Failures"] = "Assertion Failures"; 131 134 localizedStrings["Assertion with message: %s"] = "Assertion with message: %s"; … … 134 137 localizedStrings["Async audits are not supported."] = "Async audits are not supported."; 135 138 localizedStrings["Attribute"] = "Attribute"; 139 /* A submenu item of 'Break On' that breaks (pauses) before DOM attribute is modified */ 136 140 localizedStrings["Attribute Modified"] = "Attribute Modified"; 137 141 localizedStrings["Attributes"] = "Attributes"; … … 197 201 localizedStrings["Canvas Element"] = "Canvas Element"; 198 202 localizedStrings["Canvases"] = "Canvases"; 203 /* Capture screenshot of the selected DOM node */ 199 204 localizedStrings["Capture Screenshot"] = "Capture Screenshot"; 200 205 localizedStrings["Capturing"] = "Capturing"; … … 210 215 localizedStrings["Charge \u201C%s\u201D to Callers"] = "Charge \u201C%s\u201D to Callers"; 211 216 localizedStrings["Checked"] = "Checked"; 217 /* A submenu item of 'Add' to append DOM nodes to the selected DOM node */ 212 218 localizedStrings["Child"] = "Child"; 213 219 localizedStrings["Child Layers"] = "Child Layers"; … … 244 250 localizedStrings["Compare snapshots"] = "Compare snapshots"; 245 251 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"; 246 localizedStrings["Composite"] = "Composite"; 252 /* Composite phase timeline records, where graphic layers are combined */ 253 localizedStrings["Composite @ Timeline record"] = "Composite"; 247 254 localizedStrings["Composited"] = "Composited"; 248 255 localizedStrings["Compressed"] = "Compressed"; … … 464 471 localizedStrings["Failed to upgrade"] = "Failed to upgrade"; 465 472 localizedStrings["Failure status code"] = "Failure status code"; 473 /* Resource loaded via 'fetch' method */ 466 474 localizedStrings["Fetch"] = "Fetch"; 475 /* Resources loaded via 'fetch' method */ 467 476 localizedStrings["Fetches"] = "Fetches"; 468 477 localizedStrings["File or Resource"] = "File or Resource"; … … 481 490 localizedStrings["Force Light Appearance"] = "Force Light Appearance"; 482 491 localizedStrings["Force Print Media Styles"] = "Force Print Media Styles"; 492 /* Layout phase records that were imperative (forced) */ 483 493 localizedStrings["Forced Layout"] = "Forced Layout"; 494 /* A context menu item to force (override) a DOM node's pseudo-classes */ 484 495 localizedStrings["Forced Pseudo-Classes"] = "Forced Pseudo-Classes"; 485 496 localizedStrings["Format: HSL"] = "Format: HSL"; … … 571 582 localizedStrings["Info: "] = "Info: "; 572 583 localizedStrings["Infos"] = "Infos"; 584 /* A section of CSS rules matching an ancestor DOM node */ 573 585 localizedStrings["Inherited From"] = "Inherited From"; 574 586 localizedStrings["Initial State"] = "Initial State"; … … 599 611 localizedStrings["Layers"] = "Layers"; 600 612 localizedStrings["Layers:"] = "Layers:"; 601 localizedStrings["Layout"] = "Layout";602 613 localizedStrings["Layout & Rendering"] = "Layout & Rendering"; 614 /* Layout phase timeline records */ 615 localizedStrings["Layout @ Timeline record"] = "Layout"; 603 616 localizedStrings["Layout Invalidated"] = "Layout Invalidated"; 604 617 localizedStrings["Line %d"] = "Line %d"; … … 618 631 localizedStrings["Location"] = "Location"; 619 632 localizedStrings["Log Canvas Context"] = "Log Canvas Context"; 633 /* Log (print) DOM element to Console */ 620 634 localizedStrings["Log Element"] = "Log Element"; 621 635 localizedStrings["Log Frame Text"] = "Log Frame Text"; 622 636 localizedStrings["Log Frame Value"] = "Log Frame Value"; 623 637 localizedStrings["Log Message"] = "Log Message"; 638 /* Log (print) DOM node to Console */ 624 639 localizedStrings["Log Node"] = "Log Node"; 625 640 localizedStrings["Log Symbol"] = "Log Symbol"; … … 665 680 localizedStrings["Network Requests:"] = "Network Requests:"; 666 681 localizedStrings["New Tab"] = "New Tab"; 682 /* A submenu item of 'Add' to add DOM nodes after the selected DOM node */ 667 683 localizedStrings["Next Sibling"] = "Next Sibling"; 668 684 localizedStrings["No"] = "No"; … … 705 721 localizedStrings["No response headers"] = "No response headers"; 706 722 localizedStrings["Node"] = "Node"; 723 /* A submenu item of 'Break On' that breaks (pauses) before DOM node is removed */ 707 724 localizedStrings["Node Removed"] = "Node Removed"; 708 725 localizedStrings["Nodes"] = "Nodes"; … … 744 761 localizedStrings["Page navigated at %s"] = "Page navigated at %s"; 745 762 localizedStrings["Page reloaded at %s"] = "Page reloaded at %s"; 746 localizedStrings["Paint"] = "Paint"; 763 /* Paint (render) phase timeline records */ 764 localizedStrings["Paint @ Timeline record"] = "Paint"; 747 765 localizedStrings["Paints"] = "Paints"; 766 /* A count of how many times an element was painted (rendered) */ 767 localizedStrings["Paints @ Column title"] = "Paints"; 748 768 localizedStrings["Parent"] = "Parent"; 749 769 localizedStrings["Partial Garbage Collection"] = "Partial Garbage Collection"; … … 775 795 localizedStrings["Pretty print"] = "Pretty print"; 776 796 localizedStrings["Preview"] = "Preview"; 797 /* A submenu item of 'Add' to add DOM nodes before the selected DOM node */ 777 798 localizedStrings["Previous Sibling"] = "Previous Sibling"; 778 799 localizedStrings["Primary Key"] = "Primary Key"; … … 862 883 localizedStrings["Return value is not an object, string, or boolean"] = "Return value is not an object, string, or boolean"; 863 884 localizedStrings["Reveal Breakpoint"] = "Reveal Breakpoint"; 885 /* Open Elements tab and select this node in DOM tree */ 864 886 localizedStrings["Reveal in DOM Tree"] = "Reveal in DOM Tree"; 865 887 localizedStrings["Reveal in Debugger Tab"] = "Reveal in Debugger Tab"; 866 888 localizedStrings["Reveal in Elements Tab"] = "Reveal in Elements Tab"; 889 /* Open Layers tab and select the layer corresponding to this node */ 867 890 localizedStrings["Reveal in Layers Tab"] = "Reveal in Layers Tab"; 868 891 localizedStrings["Reveal in Network Tab"] = "Reveal in Network Tab"; … … 893 916 localizedStrings["Script Evaluated"] = "Script Evaluated"; 894 917 localizedStrings["Scripts"] = "Scripts"; 895 localizedStrings["Scroll Into View"] = "Scroll Into View"; 918 /* Scroll selected DOM node into view on the inspected web page */ 919 localizedStrings["Scroll into View"] = "Scroll into View"; 896 920 localizedStrings["Search"] = "Search"; 897 921 localizedStrings["Search Again"] = "Search Again"; … … 908 932 localizedStrings["Selected"] = "Selected"; 909 933 localizedStrings["Selected Canvas Context"] = "Selected Canvas Context"; 934 /* Selected DOM element */ 910 935 localizedStrings["Selected Element"] = "Selected Element"; 911 936 localizedStrings["Selected Frame"] = "Selected Frame"; 912 937 localizedStrings["Selected Item"] = "Selected Item"; 913 938 localizedStrings["Selected Items"] = "Selected Items"; 939 /* Selected DOM node */ 914 940 localizedStrings["Selected Node"] = "Selected Node"; 915 941 localizedStrings["Selected Symbol"] = "Selected Symbol"; … … 1012 1038 localizedStrings["Stopping the \u201C%s\u201D audit"] = "Stopping the \u201C%s\u201D audit"; 1013 1039 localizedStrings["Storage"] = "Storage"; 1040 /* CSS properties defined via HTML style attribute */ 1014 1041 localizedStrings["Style Attribute"] = "Style Attribute"; 1015 1042 localizedStrings["Style Resolution"] = "Style Resolution"; … … 1024 1051 localizedStrings["Stylesheets"] = "Stylesheets"; 1025 1052 localizedStrings["Subject"] = "Subject"; 1053 /* A submenu item of 'Break On' that breaks (pauses) before child DOM node is modified */ 1026 1054 localizedStrings["Subtree Modified"] = "Subtree Modified"; 1027 1055 localizedStrings["Summary"] = "Summary"; … … 1030 1058 localizedStrings["Tab width:"] = "Tab width:"; 1031 1059 localizedStrings["Tabs"] = "Tabs"; 1060 /* A submenu item of 'Edit' to change DOM element's tag name */ 1032 1061 localizedStrings["Tag"] = "Tag"; 1033 1062 localizedStrings["Take snapshot"] = "Take snapshot"; … … 1092 1121 localizedStrings["Trace"] = "Trace"; 1093 1122 localizedStrings["Trace: %s"] = "Trace: %s"; 1123 /* Amount of data sent over the network for a single resource */ 1094 1124 localizedStrings["Transfer Size"] = "Transfer Size"; 1095 1125 localizedStrings["Transferred"] = "Transferred"; … … 1106 1136 localizedStrings["Unable to parse as JSON: %s"] = "Unable to parse as JSON: %s"; 1107 1137 localizedStrings["Unable to show certificate for \u201C%s\u201D"] = "Unable to show certificate for \u201C%s\u201D"; 1138 /* Break (pause) on uncaught (unhandled) exceptions */ 1108 1139 localizedStrings["Uncaught Exceptions"] = "Uncaught Exceptions"; 1109 1140 localizedStrings["Undefined custom element"] = "Undefined custom element"; -
trunk/Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js
r239452 r244952 44 44 WI.UIString = function(string, key, comment) 45 45 { 46 "use strict"; 47 46 48 if (WI.dontLocalizeUserInterface) 47 49 return string; 50 51 // UIString(string, comment) 52 if (arguments.length === 2) { 53 comment = key; 54 key = undefined; 55 } 48 56 49 57 key = key || string; … … 65 73 return "LOCALIZED STRING NOT FOUND"; 66 74 }; 75 76 WI.repeatedUIString = {}; 77 78 WI.repeatedUIString.timelineRecordLayout = function() { 79 return WI.UIString("Layout", "Layout @ Timeline record", "Layout phase timeline records"); 80 }; 81 82 WI.repeatedUIString.timelineRecordPaint = function() { 83 return WI.UIString("Paint", "Paint @ Timeline record", "Paint (render) phase timeline records"); 84 }; 85 86 WI.repeatedUIString.timelineRecordComposite = function() { 87 return WI.UIString("Composite", "Composite @ Timeline record", "Composite phase timeline records, where graphic layers are combined"); 88 }; 89 90 WI.repeatedUIString.allExceptions = function() { 91 return WI.UIString("All Exceptions", "Break (pause) on all exceptions"); 92 }; 93 94 WI.repeatedUIString.uncaughtExceptions = function() { 95 return WI.UIString("Uncaught Exceptions", "Break (pause) on uncaught (unhandled) exceptions"); 96 }; 97 98 WI.repeatedUIString.assertionFailures = function() { 99 return WI.UIString("Assertion Failures", "Break (pause) when console.assert() fails"); 100 }; 101 102 WI.repeatedUIString.allRequests = function() { 103 return WI.UIString("All Requests", "A submenu item of 'Break on' that breaks (pauses) before all network requests"); 104 }; 105 106 WI.repeatedUIString.fetch = function() { 107 return WI.UIString("Fetch", "Resource loaded via 'fetch' method"); 108 }; 109 110 WI.repeatedUIString.revealInDOMTree = function() { 111 return WI.UIString("Reveal in DOM Tree", "Open Elements tab and select this node in DOM tree"); 112 }; -
trunk/Source/WebInspectorUI/UserInterface/Models/LayoutTimelineRecord.js
r243024 r244952 52 52 return WI.UIString("Layout Invalidated"); 53 53 case WI.LayoutTimelineRecord.EventType.ForcedLayout: 54 return WI.UIString("Forced Layout" );54 return WI.UIString("Forced Layout", "Layout phase records that were imperative (forced)"); 55 55 case WI.LayoutTimelineRecord.EventType.Layout: 56 return WI. UIString("Layout");56 return WI.repeatedUIString.timelineRecordLayout(); 57 57 case WI.LayoutTimelineRecord.EventType.Paint: 58 return WI. UIString("Paint");58 return WI.repeatedUIString.timelineRecordPaint(); 59 59 case WI.LayoutTimelineRecord.EventType.Composite: 60 return WI. UIString("Composite");60 return WI.repeatedUIString.timelineRecordComposite(); 61 61 } 62 62 } -
trunk/Source/WebInspectorUI/UserInterface/Models/RenderingFrameTimelineRecord.js
r243024 r244952 47 47 return WI.UIString("Script"); 48 48 case WI.RenderingFrameTimelineRecord.TaskType.Layout: 49 return WI. UIString("Layout");49 return WI.repeatedUIString.timelineRecordLayout(); 50 50 case WI.RenderingFrameTimelineRecord.TaskType.Paint: 51 return WI. UIString("Paint");51 return WI.repeatedUIString.timelineRecordPaint(); 52 52 case WI.RenderingFrameTimelineRecord.TaskType.Other: 53 53 return WI.UIString("Other"); -
trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js
r243614 r244952 157 157 case WI.Resource.Type.Fetch: 158 158 if (plural) 159 return WI.UIString("Fetches" );160 return WI. UIString("Fetch");159 return WI.UIString("Fetches", "Resources loaded via 'fetch' method"); 160 return WI.repeatedUIString.fetch(); 161 161 case WI.Resource.Type.Ping: 162 162 if (plural) -
trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js
r242604 r244952 126 126 }; 127 127 128 addScopeBarItem(WI.AuditTestCaseResult.Level.Pass, WI.UIString("%d Passed", "%d Passed (singular)" ), WI.UIString("%d Passed", "%d Passed (plural)"));128 addScopeBarItem(WI.AuditTestCaseResult.Level.Pass, WI.UIString("%d Passed", "%d Passed (singular)", ""), WI.UIString("%d Passed", "%d Passed (plural)", "")); 129 129 addScopeBarItem(WI.AuditTestCaseResult.Level.Warn, WI.UIString("%d Warning"), WI.UIString("%d Warnings")); 130 addScopeBarItem(WI.AuditTestCaseResult.Level.Fail, WI.UIString("%d Failed", "%d Failed (singular)" ), WI.UIString("%d Failed", "%d Failed (plural)"));130 addScopeBarItem(WI.AuditTestCaseResult.Level.Fail, WI.UIString("%d Failed", "%d Failed (singular)", ""), WI.UIString("%d Failed", "%d Failed (plural)", "")); 131 131 addScopeBarItem(WI.AuditTestCaseResult.Level.Error, WI.UIString("%d Error"), WI.UIString("%d Errors")); 132 addScopeBarItem(WI.AuditTestCaseResult.Level.Unsupported, WI.UIString("%d Unsupported", "%d Unsupported (singular)" ), WI.UIString("%d Unsupported", "%d Unsupported (plural)"));132 addScopeBarItem(WI.AuditTestCaseResult.Level.Unsupported, WI.UIString("%d Unsupported", "%d Unsupported (singular)", ""), WI.UIString("%d Unsupported", "%d Unsupported (plural)", "")); 133 133 134 134 this._levelScopeBar = new WI.ScopeBar(null, scopeBarItems); -
trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js
r244411 r244952 58 58 return WI.UIString("Script"); 59 59 case WI.CPUTimelineView.SampleType.Layout: 60 return WI. UIString("Layout");60 return WI.repeatedUIString.timelineRecordLayout(); 61 61 case WI.CPUTimelineView.SampleType.Paint: 62 return WI. UIString("Paint");62 return WI.repeatedUIString.timelineRecordPaint(); 63 63 case WI.CPUTimelineView.SampleType.Style: 64 64 return WI.UIString("Style Resolution"); -
trunk/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js
r243722 r244952 217 217 218 218 if (!options.excludeLogElement && !domNode.isInUserAgentShadowTree() && !domNode.isPseudoElement()) { 219 let label = isElement ? WI.UIString("Log Element" ) : WI.UIString("Log Node");219 let label = isElement ? WI.UIString("Log Element", "Log (print) DOM element to Console") : WI.UIString("Log Node", "Log (print) DOM node to Console"); 220 220 contextMenu.appendItem(label, () => { 221 221 WI.RemoteObject.resolveNode(domNode, WI.RuntimeManager.ConsoleObjectGroup).then((remoteObject) => { 222 let text = isElement ? WI.UIString("Selected Element" ) : WI.UIString("Selected Node");222 let text = isElement ? WI.UIString("Selected Element", "Selected DOM element") : WI.UIString("Selected Node", "Selected DOM node"); 223 223 const addSpecialUserLogClass = true; 224 224 WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass); … … 228 228 229 229 if (!options.excludeRevealElement && window.DOMAgent && attached) { 230 contextMenu.appendItem(WI. UIString("Reveal in DOM Tree"), () => {230 contextMenu.appendItem(WI.repeatedUIString.revealInDOMTree(), () => { 231 231 WI.domManager.inspectElement(domNode.id); 232 232 }); … … 234 234 235 235 if (WI.settings.experimentalEnableLayersTab.value && window.LayerTreeAgent && attached) { 236 contextMenu.appendItem(WI.UIString("Reveal in Layers Tab" ), () => {236 contextMenu.appendItem(WI.UIString("Reveal in Layers Tab", "Open Layers tab and select the layer corresponding to this node"), () => { 237 237 WI.showLayersTab({nodeToSelect: domNode}); 238 238 }); … … 240 240 241 241 if (window.PageAgent && attached) { 242 contextMenu.appendItem(WI.UIString("Capture Screenshot" ), () => {242 contextMenu.appendItem(WI.UIString("Capture Screenshot", "Capture screenshot of the selected DOM node"), () => { 243 243 PageAgent.snapshotNode(domNode.id, (error, dataURL) => { 244 244 if (error) { … … 263 263 264 264 if (isElement && attached) { 265 contextMenu.appendItem(WI.UIString("Scroll Into View"), () => {265 contextMenu.appendItem(WI.UIString("Scroll into View", "Scroll selected DOM node into view on the inspected web page"), () => { 266 266 domNode.scrollIntoView(); 267 267 }); -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMBreakpointTreeElement.js
r242318 r244952 51 51 switch (type) { 52 52 case WI.DOMBreakpoint.Type.SubtreeModified: 53 return WI.UIString("Subtree Modified" );53 return WI.UIString("Subtree Modified", "A submenu item of 'Break On' that breaks (pauses) before child DOM node is modified"); 54 54 case WI.DOMBreakpoint.Type.AttributeModified: 55 return WI.UIString("Attribute Modified" );55 return WI.UIString("Attribute Modified", "A submenu item of 'Break On' that breaks (pauses) before DOM attribute is modified"); 56 56 case WI.DOMBreakpoint.Type.NodeRemoved: 57 return WI.UIString("Node Removed" );57 return WI.UIString("Node Removed", "A submenu item of 'Break On' that breaks (pauses) before DOM node is removed"); 58 58 default: 59 59 console.error("Unexpected DOM breakpoint type: " + type); -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeTreeElement.js
r243722 r244952 62 62 contextMenu.appendSeparator(); 63 63 64 contextMenu.appendItem(WI. UIString("Reveal in DOM Tree"), () => {64 contextMenu.appendItem(WI.repeatedUIString.revealInDOMTree(), () => { 65 65 WI.domManager.inspectElement(this.representedObject.id); 66 66 }); -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js
r244566 r244952 778 778 }, !attribute || !isNonShadowEditable); 779 779 780 subMenus.edit.appendItem(WI.UIString("Tag" ), () => {780 subMenus.edit.appendItem(WI.UIString("Tag", "A submenu item of 'Edit' to change DOM element's tag name"), () => { 781 781 this._startEditingTagName(); 782 782 }, !isNonShadowEditable); … … 785 785 786 786 if (WI.cssManager.canForcePseudoClasses() && attached) { 787 let pseudoSubMenu = contextMenu.appendSubMenuItem(WI.UIString("Forced Pseudo-Classes" ));787 let pseudoSubMenu = contextMenu.appendSubMenuItem(WI.UIString("Forced Pseudo-Classes", "A context menu item to force (override) a DOM node's pseudo-classes")); 788 788 789 789 let enabledPseudoClasses = node.enabledPseudoClasses; … … 816 816 let isEditableNode = node.nodeType() === Node.ELEMENT_NODE && this.editable; 817 817 let forbiddenClosingTag = WI.DOMTreeElement.ForbiddenClosingTagElements.has(node.nodeNameInCorrectCase()); 818 subMenus.add.appendItem(WI.UIString("Child" ), this._addHTML.bind(this), forbiddenClosingTag || !isEditableNode);819 subMenus.add.appendItem(WI.UIString("Previous Sibling" ), this._addPreviousSibling.bind(this), !isEditableNode);820 subMenus.add.appendItem(WI.UIString("Next Sibling" ), this._addNextSibling.bind(this), !isEditableNode);818 subMenus.add.appendItem(WI.UIString("Child", "A submenu item of 'Add' to append DOM nodes to the selected DOM node"), this._addHTML.bind(this), forbiddenClosingTag || !isEditableNode); 819 subMenus.add.appendItem(WI.UIString("Previous Sibling", "A submenu item of 'Add' to add DOM nodes before the selected DOM node"), this._addPreviousSibling.bind(this), !isEditableNode); 820 subMenus.add.appendItem(WI.UIString("Next Sibling", "A submenu item of 'Add' to add DOM nodes after the selected DOM node"), this._addNextSibling.bind(this), !isEditableNode); 821 821 822 822 subMenus.edit.appendItem(WI.UIString("HTML"), this._editAsHTML.bind(this), !this.editable); -
trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js
r244195 r244952 475 475 if (breakpoint === WI.debuggerManager.allExceptionsBreakpoint) { 476 476 options.className = WI.DebuggerSidebarPanel.ExceptionIconStyleClassName; 477 options.title = WI. UIString("All Exceptions");477 options.title = WI.repeatedUIString.allExceptions(); 478 478 } else if (breakpoint === WI.debuggerManager.uncaughtExceptionsBreakpoint) { 479 479 options.className = WI.DebuggerSidebarPanel.ExceptionIconStyleClassName; 480 options.title = WI. UIString("Uncaught Exceptions");480 options.title = WI.repeatedUIString.uncaughtExceptions(); 481 481 } else if (breakpoint === WI.debuggerManager.assertionFailuresBreakpoint) { 482 482 options.className = WI.DebuggerSidebarPanel.AssertionIconStyleClassName; 483 options.title = WI. UIString("Assertion Failures");483 options.title = WI.repeatedUIString.assertionFailures(); 484 484 } else if (breakpoint instanceof WI.DOMBreakpoint) { 485 485 if (!breakpoint.domNodeIdentifier) … … 515 515 if (breakpoint === WI.domDebuggerManager.allRequestsBreakpoint) { 516 516 options.className = WI.DebuggerSidebarPanel.AssertionIconStyleClassName; 517 options.title = WI. UIString("All Requests");517 options.title = WI.repeatedUIString.allRequests(); 518 518 } 519 519 } else { … … 1458 1458 let assertionFailuresBreakpointShown = WI.settings.showAssertionFailuresBreakpoint.value; 1459 1459 1460 contextMenu.appendCheckboxItem(WI. UIString("Assertion Failures"), () => {1460 contextMenu.appendCheckboxItem(WI.repeatedUIString.assertionFailures(), () => { 1461 1461 if (assertionFailuresBreakpointShown) 1462 1462 WI.debuggerManager.removeBreakpoint(WI.debuggerManager.assertionFailuresBreakpoint); … … 1480 1480 let allRequestsBreakpointShown = WI.settings.showAllRequestsBreakpoint.value; 1481 1481 1482 contextMenu.appendCheckboxItem(WI. UIString("All Requests"), () => {1482 contextMenu.appendCheckboxItem(WI.repeatedUIString.allRequests(), () => { 1483 1483 if (allRequestsBreakpointShown) 1484 1484 WI.domDebuggerManager.removeURLBreakpoint(WI.domDebuggerManager.allRequestsBreakpoint); -
trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js
r239345 r244952 137 137 columns.name.sortable = false; 138 138 139 columns.paintCount.title = WI.UIString("Paints" );139 columns.paintCount.title = WI.UIString("Paints", "Paints @ Column title", "A count of how many times an element was painted (rendered)"); 140 140 columns.paintCount.sortable = true; 141 141 columns.paintCount.aligned = "right"; -
trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js
r244933 r244952 212 212 return "XHR"; 213 213 case WI.Resource.Type.Fetch: 214 return WI. UIString("Fetch");214 return WI.repeatedUIString.fetch(); 215 215 case WI.Resource.Type.Ping: 216 216 return WI.UIString("Ping"); … … 1173 1173 }); 1174 1174 1175 this._transferSizeColumn = new WI.TableColumn("transferSize", WI.UIString("Transfer Size" ), {1175 this._transferSizeColumn = new WI.TableColumn("transferSize", WI.UIString("Transfer Size", "Amount of data sent over the network for a single resource"), { 1176 1176 minWidth: 100, 1177 1177 maxWidth: 150, -
trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js
r244195 r244952 884 884 if (breakpoint === WI.debuggerManager.allExceptionsBreakpoint) { 885 885 options.className = "breakpoint-exception-icon"; 886 options.title = WI. UIString("All Exceptions");886 options.title = WI.repeatedUIString.allExceptions(); 887 887 } else if (breakpoint === WI.debuggerManager.uncaughtExceptionsBreakpoint) { 888 888 options.className = "breakpoint-exception-icon"; 889 options.title = WI. UIString("Uncaught Exceptions");889 options.title = WI.repeatedUIString.uncaughtExceptions(); 890 890 } else if (breakpoint === WI.debuggerManager.assertionFailuresBreakpoint) { 891 891 options.className = "breakpoint-assertion-icon"; 892 options.title = WI. UIString("Assertion Failures");892 options.title = WI.repeatedUIString.assertionFailures(); 893 893 } else if (breakpoint instanceof WI.DOMBreakpoint) { 894 894 if (!breakpoint.domNodeIdentifier) … … 924 924 if (breakpoint === WI.domDebuggerManager.allRequestsBreakpoint) { 925 925 options.className = "breakpoint-assertion-icon"; 926 options.title = WI. UIString("All Requests");926 options.title = WI.repeatedUIString.allRequests(); 927 927 } 928 928 } else { … … 1503 1503 let assertionFailuresBreakpointShown = WI.settings.showAssertionFailuresBreakpoint.value; 1504 1504 1505 contextMenu.appendCheckboxItem(WI. UIString("Assertion Failures"), () => {1505 contextMenu.appendCheckboxItem(WI.repeatedUIString.assertionFailures(), () => { 1506 1506 if (assertionFailuresBreakpointShown) 1507 1507 WI.debuggerManager.removeBreakpoint(WI.debuggerManager.assertionFailuresBreakpoint); … … 1525 1525 let allRequestsBreakpointShown = WI.settings.showAllRequestsBreakpoint.value; 1526 1526 1527 contextMenu.appendCheckboxItem(WI. UIString("All Requests"), () => {1527 contextMenu.appendCheckboxItem(WI.repeatedUIString.allRequests(), () => { 1528 1528 if (allRequestsBreakpointShown) 1529 1529 WI.domDebuggerManager.removeURLBreakpoint(WI.domDebuggerManager.allRequestsBreakpoint); -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js
r244616 r244952 316 316 317 317 case WI.CSSStyleDeclaration.Type.Inline: 318 this._selectorElement.textContent = WI.UIString("Style Attribute" );318 this._selectorElement.textContent = WI.UIString("Style Attribute", "CSS properties defined via HTML style attribute"); 319 319 this._selectorElement.classList.add("style-attribute"); 320 320 break; -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js
r243264 r244952 257 257 let addSection = (section) => { 258 258 if (section.style.inherited && (!previousStyle || previousStyle.node !== section.style.node)) 259 addHeader(WI.UIString("Inherited From" ), section.style.node);259 addHeader(WI.UIString("Inherited From", "A section of CSS rules matching an ancestor DOM node"), section.style.node); 260 260 261 261 if (!section.isDescendantOf(this)) { -
trunk/Tools/ChangeLog
r244945 r244952 1 2019-05-04 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: Provide UIString descriptions to improve localizations 4 https://bugs.webkit.org/show_bug.cgi?id=195132 5 <rdar://problem/48457817> 6 7 Reviewed by Devin Rousso. 8 9 Allow WI.UIString to take: 10 - WI.UIString(string, key, comment) 11 - WI.UIString(string, comment) 12 - WI.UIString(string) 13 14 * Scripts/extract-localizable-js-strings: 15 1 16 2019-05-03 Wenson Hsieh <wenson_hsieh@apple.com> 2 17 -
trunk/Tools/Scripts/extract-localizable-js-strings
r239452 r244952 75 75 76 76 # Handle WebInspector strings. Prints a warning if a non-string literal is passed to WI.UIString(). 77 HandleUIString($1, $2 || $1, $3 || "", $file, $.) while s/WI\.UIString\("([^"]+)"(?:,\s*"([^"]+)"(?:,\s*"([^"]+)")?)?\)//; 77 # Allow: WI.UIString(string, comment) 78 # WI.UIString(string, key, comment) 79 HandleUIString( 80 $1, 81 ($3 || (defined $3 and length $3 == 0)) ? $2 : $1, 82 ($3 || (defined $3 and length $3 == 0)) ? $3 : $2 || "", 83 $file, 84 $. 85 ) while s/WI\.UIString\("([^"]+)"(?:,\s*"([^"]*)"(?:,\s*"([^"]*)")?)?\)//; 78 86 print "$file:$.:WARNING: $&\n" while s/WI\.UIString\(.*?\)//; 79 87
Note: See TracChangeset
for help on using the changeset viewer.