WebKit Bugzilla
Attachment 369089 Details for
Bug 197597
: Web Inspector: replace UIString key with comment
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197597-20190505000936.patch (text/plain), 50.24 KB, created by
Devin Rousso
on 2019-05-04 23:09:37 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-05-04 23:09:37 PDT
Size:
50.24 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 302d1bebcb11c704ba5f2237a2fd9c4ad6bf528f..b8529f4cc54dd320f4a6a39c700f772f6a6070a3 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,45 @@ >+2019-05-04 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: replace UIString key with comment >+ https://bugs.webkit.org/show_bug.cgi?id=197597 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Localizations/en.lproj/localizedStrings.js: >+ * UserInterface/Base/LoadLocalizedStrings.js: >+ (WI.UIString): >+ (WI.repeatedUIString.timelineRecordLayout): >+ (WI.repeatedUIString.timelineRecordPaint): >+ (WI.repeatedUIString.timelineRecordComposite): >+ (WI.repeatedUIString.domSelectedElement): Added. >+ (WI.repeatedUIString.domDroppedElement): Added. >+ (WI.repeatedUIString.domSelectedNode): Added. >+ (WI.repeatedUIString.domDroppedNode): Added. >+ (WI.repeatedUIString.cssStyleAttribute): Added. >+ * UserInterface/Base/SearchUtilities.js: >+ (WI.SearchUtilities.createSettingsButton): >+ * UserInterface/Controllers/DOMManager.js: >+ (WI.DOMManager.prototype.inspectNodeObject.nodeAvailable): >+ * UserInterface/Views/AuditTestGroupContentView.js: >+ (WI.AuditTestGroupContentView.prototype.initialLayout): >+ (WI.AuditTestGroupContentView.prototype.layout): >+ * UserInterface/Views/CPUTimelineView.js: >+ (WI.CPUTimelineView.prototype._layoutSourcesSection): >+ * UserInterface/Views/ChangesDetailsSidebarPanel.js: >+ (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement): >+ * UserInterface/Views/ContextMenuUtilities.js: >+ (WI.appendContextMenuItemsForDOMNode): >+ * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: >+ (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection): >+ * UserInterface/Views/LogContentView.js: >+ (WI.LogContentView.prototype._handleDrop): >+ * UserInterface/Views/QuickConsole.js: >+ (WI.QuickConsole.prototype._handleDrop): >+ * UserInterface/Views/SettingsTabContentView.js: >+ (WI.SettingsTabContentView.prototype._createGeneralSettingsView): >+ * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: >+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector): >+ > 2019-05-04 Nikita Vasilyev <nvasilyev@apple.com> > > Web Inspector: Provide UIString descriptions to improve localizations >diff --git a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >index f97c188cb31128dbbd5caf1e8c8afd6f44c4f53d..b315c60d516045b7059d5ce75e3d501782a0e5c2 100644 >--- a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >+++ b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >@@ -78,6 +78,17 @@ localizedStrings["(uninitialized)"] = "(uninitialized)"; > localizedStrings[", "] = ", "; > localizedStrings["1 match"] = "1 match"; > localizedStrings["2D"] = "2D"; >+localizedStrings["A context menu item to force (override) a DOM node's pseudo-classes"] = "Forced Pseudo-Classes"; >+localizedStrings["A count of how many times an element was painted (rendered)"] = "Paints"; >+localizedStrings["A section of CSS rules matching an ancestor DOM node"] = "Inherited From"; >+localizedStrings["A submenu item of 'Add' to add DOM nodes after the selected DOM node"] = "Next Sibling"; >+localizedStrings["A submenu item of 'Add' to add DOM nodes before the selected DOM node"] = "Previous Sibling"; >+localizedStrings["A submenu item of 'Add' to append DOM nodes to the selected DOM node"] = "Child"; >+localizedStrings["A submenu item of 'Break On' that breaks (pauses) before DOM attribute is modified"] = "Attribute Modified"; >+localizedStrings["A submenu item of 'Break On' that breaks (pauses) before DOM node is removed"] = "Node Removed"; >+localizedStrings["A submenu item of 'Break On' that breaks (pauses) before child DOM node is modified"] = "Subtree Modified"; >+localizedStrings["A submenu item of 'Break on' that breaks (pauses) before all network requests"] = "All Requests"; >+localizedStrings["A submenu item of 'Edit' to change DOM element's tag name"] = "Tag"; > localizedStrings["Accessibility"] = "Accessibility"; > localizedStrings["Action"] = "Action"; > localizedStrings["Activity Viewer"] = "Activity Viewer"; >@@ -97,17 +108,14 @@ localizedStrings["Additions"] = "Additions"; > 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"; > localizedStrings["All items in \u0022%s\u0022 must be error objects"] = "All items in \u0022%s\u0022 must be error objects"; > localizedStrings["All items in \u0022%s\u0022 must be non-empty strings"] = "All items in \u0022%s\u0022 must be non-empty strings"; > localizedStrings["All items in \u0022%s\u0022 must be valid DOM nodes"] = "All items in \u0022%s\u0022 must be valid DOM nodes"; > localizedStrings["Allow Media Capture on Insecure Sites"] = "Allow Media Capture on Insecure Sites"; >+localizedStrings["Amount of data sent over the network for a single resource"] = "Transfer Size"; > localizedStrings["An error occurred trying to load the resource."] = "An error occurred trying to load the resource."; > localizedStrings["An error occurred trying to read the \u201C%s\u201D table."] = "An error occurred trying to read the \u201C%s\u201D table."; > localizedStrings["An unexpected error %s occurred."] = "An unexpected error %s occurred."; >@@ -123,21 +131,16 @@ localizedStrings["Anonymous Script %d"] = "Anonymous Script %d"; > localizedStrings["Anonymous Scripts"] = "Anonymous Scripts"; > localizedStrings["Anonymous StyleSheet %d"] = "Anonymous StyleSheet %d"; > localizedStrings["Application Cache"] = "Application Cache"; >-/* Approximate count of events */ >-localizedStrings["Approximate Number"] = "~%s"; >+localizedStrings["Approximate count of events"] = "~%s"; > localizedStrings["Area"] = "Area"; > 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"; > 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"; > localizedStrings["Audit Error: %s"] = "Audit Error: %s"; >@@ -166,6 +169,9 @@ localizedStrings["Block Variables"] = "Block Variables"; > localizedStrings["Body:"] = "Body:"; > localizedStrings["Boundary"] = "Boundary"; > localizedStrings["Box Model"] = "Box Model"; >+localizedStrings["Break (pause) on all exceptions"] = "All Exceptions"; >+localizedStrings["Break (pause) on uncaught (unhandled) exceptions"] = "Uncaught Exceptions"; >+localizedStrings["Break (pause) when console.assert() fails"] = "Assertion Failures"; > localizedStrings["Break on events with name:"] = "Break on events with name:"; > localizedStrings["Break on request with URL:"] = "Break on request with URL:"; > localizedStrings["Break on\u2026"] = "Break on\u2026"; >@@ -187,6 +193,7 @@ localizedStrings["CSS"] = "CSS"; > localizedStrings["CSS Canvas"] = "CSS Canvas"; > localizedStrings["CSS Changes:"] = "CSS Changes:"; > localizedStrings["CSS canvas \u201C%s\u201D"] = "CSS canvas \u201C%s\u201D"; >+localizedStrings["CSS properties defined via HTML style attribute"] = "Style Attribute"; > localizedStrings["Cached"] = "Cached"; > localizedStrings["Call Frames Truncated"] = "Call Frames Truncated"; > localizedStrings["Call Stack"] = "Call Stack"; >@@ -200,13 +207,8 @@ localizedStrings["Canvas %d"] = "Canvas %d"; > 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["Capture screenshot of the selected DOM node"] = "Capture Screenshot"; > localizedStrings["Capturing"] = "Capturing"; >-/* Context menu label for whether searches should be case sensitive. */ >-localizedStrings["Case Sensitive @ Context Menu"] = "Case Sensitive"; >-/* Settings tab checkbox label for whether searches should be case sensitive. */ >-localizedStrings["Case Sensitive @ Settings"] = "Case Sensitive"; > localizedStrings["Catch Variables"] = "Catch Variables"; > localizedStrings["Categories"] = "Categories"; > localizedStrings["Certificate"] = "Certificate"; >@@ -214,8 +216,6 @@ localizedStrings["Changes"] = "Changes"; > 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 "; > localizedStrings["Children"] = "Children"; >@@ -249,8 +249,7 @@ localizedStrings["Collect garbage"] = "Collect garbage"; > 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"; >-/* Composite phase timeline records, where graphic layers are combined */ >-localizedStrings["Composite @ Timeline record"] = "Composite"; >+localizedStrings["Composite phase timeline records, where graphic layers are combined"] = "Composite"; > localizedStrings["Composited"] = "Composited"; > localizedStrings["Compressed"] = "Compressed"; > localizedStrings["Compression"] = "Compression"; >@@ -274,6 +273,8 @@ localizedStrings["Console:"] = "Console:"; > localizedStrings["Containing"] = "Containing"; > localizedStrings["Content"] = "Content"; > localizedStrings["Content Security Policy violation of directive: %s"] = "Content Security Policy violation of directive: %s"; >+localizedStrings["Context menu label for whether searches should be case sensitive."] = "Case Sensitive"; >+localizedStrings["Context menu label for whether searches should be treated as regular expressions."] = "Regular Expression"; > localizedStrings["Continuation Frame"] = "Continuation Frame"; > localizedStrings["Continue script execution (%s or %s)"] = "Continue script execution (%s or %s)"; > localizedStrings["Continue to Here"] = "Continue to Here"; >@@ -303,6 +304,8 @@ localizedStrings["DOM Content Loaded \u2014 %s"] = "DOM Content Loaded \u2014 %s > localizedStrings["DOM Event"] = "DOM Event"; > localizedStrings["DOM Events"] = "DOM Events"; > localizedStrings["DOM Nodes:"] = "DOM Nodes:"; >+localizedStrings["DOM element that was dropped after being dragged from the DOM tree"] = "Dropped Element"; >+localizedStrings["DOM node that was dropped after being dragged from the DOM tree"] = "Dropped Node"; > localizedStrings["Damping"] = "Damping"; > localizedStrings["Data"] = "Data"; > localizedStrings["Data Bindings"] = "Data Bindings"; >@@ -355,8 +358,6 @@ localizedStrings["Domain"] = "Domain"; > localizedStrings["Done"] = "Done"; > localizedStrings["Download"] = "Download"; > localizedStrings["Download Web Archive"] = "Download Web Archive"; >-localizedStrings["Dropped Element"] = "Dropped Element"; >-localizedStrings["Dropped Node"] = "Dropped Node"; > localizedStrings["Duplicate property"] = "Duplicate property"; > localizedStrings["Duration"] = "Duration"; > localizedStrings["Duration: %s"] = "Duration: %s"; >@@ -470,10 +471,6 @@ localizedStrings["Extra Scripts"] = "Extra Scripts"; > 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"; > localizedStrings["Filter"] = "Filter"; >@@ -489,10 +486,6 @@ localizedStrings["Fonts"] = "Fonts"; > 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"; > localizedStrings["Format: Hex"] = "Format: Hex"; >@@ -581,8 +574,6 @@ localizedStrings["Index Key \u2014 %s"] = "Index Key \u2014 %s"; > 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"; > localizedStrings["Initiated"] = "Initiated"; >@@ -611,9 +602,9 @@ localizedStrings["Layer Info"] = "Layer Info"; > localizedStrings["Layers"] = "Layers"; > localizedStrings["Layers:"] = "Layers:"; > localizedStrings["Layout & Rendering"] = "Layout & Rendering"; >-/* Layout phase timeline records */ >-localizedStrings["Layout @ Timeline record"] = "Layout"; > localizedStrings["Layout Invalidated"] = "Layout Invalidated"; >+localizedStrings["Layout phase records that were imperative (forced)"] = "Forced Layout"; >+localizedStrings["Layout phase timeline records"] = "Layout"; > localizedStrings["Line %d"] = "Line %d"; > localizedStrings["Line %d:%d"] = "Line %d:%d"; > localizedStrings["Line Number"] = "Line Number"; >@@ -629,14 +620,12 @@ localizedStrings["Local Storage"] = "Local Storage"; > localizedStrings["Local Variables"] = "Local Variables"; > localizedStrings["Located at %s"] = "Located at %s"; > localizedStrings["Location"] = "Location"; >+localizedStrings["Log (print) DOM element to Console"] = "Log Element"; >+localizedStrings["Log (print) DOM node to Console"] = "Log Node"; > 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"; > localizedStrings["Log WebSocket"] = "Log WebSocket"; >@@ -679,8 +668,6 @@ localizedStrings["Network Issue"] = "Network Issue"; > 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"; > localizedStrings["No Application Cache information available"] = "No Application Cache information available"; >@@ -720,8 +707,6 @@ localizedStrings["No request, served from the memory cache."] = "No request, ser > 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"; > localizedStrings["Not found"] = "Not found"; >@@ -736,6 +721,8 @@ localizedStrings["Online"] = "Online"; > localizedStrings["Only show resources with issues"] = "Only show resources with issues"; > localizedStrings["Only show visual actions"] = "Only show visual actions"; > localizedStrings["Open"] = "Open"; >+localizedStrings["Open Elements tab and select this node in DOM tree"] = "Reveal in DOM Tree"; >+localizedStrings["Open Layers tab and select the layer corresponding to this node"] = "Reveal in Layers Tab"; > localizedStrings["Open in New Tab"] = "Open in New Tab"; > localizedStrings["Option-click to show source"] = "Option-click to show source"; > localizedStrings["Options"] = "Options"; >@@ -760,11 +747,8 @@ localizedStrings["Page"] = "Page"; > localizedStrings["Page Issue"] = "Page Issue"; > localizedStrings["Page navigated at %s"] = "Page navigated at %s"; > localizedStrings["Page reloaded at %s"] = "Page reloaded at %s"; >-/* Paint (render) phase timeline records */ >-localizedStrings["Paint @ Timeline record"] = "Paint"; >+localizedStrings["Paint (render) phase timeline records"] = "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"; >@@ -772,8 +756,6 @@ localizedStrings["Path"] = "Path"; > localizedStrings["Pause Processing"] = "Pause Processing"; > localizedStrings["Pause Reason"] = "Pause Reason"; > localizedStrings["Pause script execution (%s or %s)"] = "Pause script execution (%s or %s)"; >-/* The number of tests that passed expressed as a percentage, followed by a literal %. */ >-localizedStrings["Percentage (of audits)"] = "%s%%"; > localizedStrings["Periods of high CPU utilization will rapidly drain battery. Strive to keep idle pages under %s average CPU utilization."] = "Periods of high CPU utilization will rapidly drain battery. Strive to keep idle pages under %s average CPU utilization."; > localizedStrings["Ping"] = "Ping"; > localizedStrings["Ping Frame"] = "Ping Frame"; >@@ -794,8 +776,6 @@ localizedStrings["Press %s to stop editing"] = "Press %s to stop editing"; > 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"; > localizedStrings["Priority"] = "Priority"; >@@ -834,10 +814,6 @@ localizedStrings["Refresh all"] = "Refresh all"; > localizedStrings["Refresh watch expressions"] = "Refresh watch expressions"; > localizedStrings["Region announced in its entirety."] = "Region announced in its entirety."; > localizedStrings["Regular Expression"] = "Regular Expression"; >-/* Context menu label for whether searches should be treated as regular expressions. */ >-localizedStrings["Regular Expression @ Context Menu"] = "Regular Expression"; >-/* Settings tab checkbox label for whether searches should be treated as regular expressions. */ >-localizedStrings["Regular Expression @ Settings"] = "Regular Expression"; > localizedStrings["Reload Web Inspector"] = "Reload Web Inspector"; > localizedStrings["Reload page (%s)\nReload page ignoring cache (%s)"] = "Reload page (%s)\nReload page ignoring cache (%s)"; > localizedStrings["Removals"] = "Removals"; >@@ -862,9 +838,11 @@ localizedStrings["Resource does not have timing data"] = "Resource does not have > localizedStrings["Resource failed to load."] = "Resource failed to load."; > localizedStrings["Resource has no content"] = "Resource has no content"; > localizedStrings["Resource has no timing data"] = "Resource has no timing data"; >+localizedStrings["Resource loaded via 'fetch' method"] = "Fetch"; > localizedStrings["Resource was loaded with the \u201Cdata\u201D scheme."] = "Resource was loaded with the \u201Cdata\u201D scheme."; > localizedStrings["Resource was served from the cache."] = "Resource was served from the cache."; > localizedStrings["Resources"] = "Resources"; >+localizedStrings["Resources loaded via 'fetch' method"] = "Fetches"; > localizedStrings["Response"] = "Response"; > localizedStrings["Response Cookies"] = "Response Cookies"; > localizedStrings["Response Headers"] = "Response Headers"; >@@ -882,12 +860,8 @@ localizedStrings["Return type for anonymous function"] = "Return type for anonym > 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"; > localizedStrings["Reveal in Resources Tab"] = "Reveal in Resources Tab"; >@@ -915,13 +889,10 @@ localizedStrings["Script Element %d"] = "Script Element %d"; > localizedStrings["Script Entries:"] = "Script Entries:"; > localizedStrings["Script Evaluated"] = "Script Evaluated"; > localizedStrings["Scripts"] = "Scripts"; >-/* Scroll selected DOM node into view on the inspected web page */ >-localizedStrings["Scroll into View"] = "Scroll into View"; >+localizedStrings["Scroll selected DOM node into view on the inspected web page"] = "Scroll into View"; > localizedStrings["Search"] = "Search"; > localizedStrings["Search Again"] = "Search Again"; > localizedStrings["Search Resource Content"] = "Search Resource Content"; >-/* Settings tab label for search related settings */ >-localizedStrings["Search: @ Settings"] = "Search:"; > localizedStrings["Searching %s"] = "Searching %s"; > localizedStrings["Secure"] = "Secure"; > localizedStrings["Security"] = "Security"; >@@ -931,13 +902,11 @@ localizedStrings["Select baseline snapshot"] = "Select baseline snapshot"; > 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 DOM element"] = "Selected Element"; >+localizedStrings["Selected DOM node"] = "Selected Node"; > 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"; > localizedStrings["Selected WebSocket"] = "Selected WebSocket"; >@@ -953,6 +922,9 @@ localizedStrings["Session Storage"] = "Session Storage"; > localizedStrings["Set to Automatically Continue"] = "Set to Automatically Continue"; > localizedStrings["Setter"] = "Setter"; > localizedStrings["Settings"] = "Settings"; >+localizedStrings["Settings tab checkbox label for whether searches should be case sensitive."] = "Case Sensitive"; >+localizedStrings["Settings tab checkbox label for whether searches should be treated as regular expressions."] = "Regular Expression"; >+localizedStrings["Settings tab label for search related settings"] = "Search:"; > localizedStrings["Shader"] = "Shader"; > localizedStrings["Shader Programs"] = "Shader Programs"; > localizedStrings["Shadow Content"] = "Shadow Content"; >@@ -1037,8 +1009,6 @@ localizedStrings["Stop recording canvas actions"] = "Stop recording canvas actio > 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"; > localizedStrings["Styles"] = "Styles"; >@@ -1050,15 +1020,11 @@ localizedStrings["Styles:"] = "Styles:"; > 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"; > 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"; > localizedStrings["Template Content"] = "Template Content"; >@@ -1071,6 +1037,7 @@ localizedStrings["The \u201C%s\u201D audit passed"] = "The \u201C%s\u201D audit > localizedStrings["The \u201C%s\u201D audit resulted in a warning"] = "The \u201C%s\u201D audit resulted in a warning"; > localizedStrings["The \u201C%s\u201D audit threw an error"] = "The \u201C%s\u201D audit threw an error"; > localizedStrings["The \u201C%s\u201D\ntable is empty."] = "The \u201C%s\u201D\ntable is empty."; >+localizedStrings["The number of tests that passed expressed as a percentage, followed by a literal %."] = "%s%%"; > localizedStrings["The page's content has changed"] = "The page's content has changed"; > localizedStrings["The resource was requested insecurely."] = "The resource was requested insecurely."; > localizedStrings["There is an incurred energy penalty each time the page enters script. This commonly happens with timers, event handlers, and observers."] = "There is an incurred energy penalty each time the page enters script. This commonly happens with timers, event handlers, and observers."; >@@ -1120,8 +1087,6 @@ localizedStrings["Total: %s"] = "Total: %s"; > 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"; > localizedStrings["Triggered URL Breakpoint"] = "Triggered URL Breakpoint"; >@@ -1135,8 +1100,6 @@ localizedStrings["URL Breakpoint\u2026"] = "URL Breakpoint\u2026"; > 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"; > localizedStrings["Unknown Location"] = "Unknown Location"; >diff --git a/Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js b/Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js >index e20d506831b0e1a664c4ebe6aa2819b1f0b536cf..3685a132be98ef35e33307bc7e7ef97da08922c7 100644 >--- a/Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js >+++ b/Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js >@@ -41,32 +41,26 @@ WI.unlocalizedString = function(string) > return string; > }; > >-WI.UIString = function(string, key, comment) >+WI.UIString = function(string, key) > { > "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) > return window.localizedStrings[key]; > > if (!window.localizedStrings) >- console.error(`Attempted to load localized string "${key}" before localizedStrings was initialized.`, comment); >+ console.error(`Attempted to load localized string "${key}" before localizedStrings was initialized.`); > > if (!this._missingLocalizedStrings) > this._missingLocalizedStrings = {}; > > if (!(key in this._missingLocalizedStrings)) { >- console.error(`Localized string "${key}" was not found.`, comment); >+ console.error(`Localized string "${key}" was not found.`); > this._missingLocalizedStrings[key] = true; > } > >@@ -76,15 +70,15 @@ WI.UIString = function(string, key, comment) > WI.repeatedUIString = {}; > > WI.repeatedUIString.timelineRecordLayout = function() { >- return WI.UIString("Layout", "Layout @ Timeline record", "Layout phase timeline records"); >+ return WI.UIString("Layout", "Layout phase timeline records"); > }; > > WI.repeatedUIString.timelineRecordPaint = function() { >- return WI.UIString("Paint", "Paint @ Timeline record", "Paint (render) phase timeline records"); >+ return WI.UIString("Paint", "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"); >+ return WI.UIString("Composite", "Composite phase timeline records, where graphic layers are combined"); > }; > > WI.repeatedUIString.allExceptions = function() { >@@ -110,3 +104,23 @@ WI.repeatedUIString.fetch = function() { > WI.repeatedUIString.revealInDOMTree = function() { > return WI.UIString("Reveal in DOM Tree", "Open Elements tab and select this node in DOM tree"); > }; >+ >+WI.repeatedUIString.domSelectedElement = function() { >+ return WI.UIString("Selected Element", "Selected DOM element"); >+}; >+ >+WI.repeatedUIString.domDroppedElement = function() { >+ return WI.UIString("Dropped Element", "DOM element that was dropped after being dragged from the DOM tree"); >+}; >+ >+WI.repeatedUIString.domSelectedNode = function() { >+ return WI.UIString("Selected Node", "Selected DOM node"); >+}; >+ >+WI.repeatedUIString.domDroppedNode = function() { >+ return WI.UIString("Dropped Node", "DOM node that was dropped after being dragged from the DOM tree"); >+}; >+ >+WI.repeatedUIString.cssStyleAttribute = function() { >+ return WI.UIString("Style Attribute", "CSS properties defined via HTML style attribute"); >+}; >diff --git a/Source/WebInspectorUI/UserInterface/Base/SearchUtilities.js b/Source/WebInspectorUI/UserInterface/Base/SearchUtilities.js >index 5a58656861a53e9b796bf0a99619c6881516a0a6..ddff54067496ced13504c12bb186ae81d79da6bd 100644 >--- a/Source/WebInspectorUI/UserInterface/Base/SearchUtilities.js >+++ b/Source/WebInspectorUI/UserInterface/Base/SearchUtilities.js >@@ -89,13 +89,13 @@ WI.SearchUtilities = class SearchUtilities { > }); > > if (settings.caseSensitive) { >- contextMenu.appendCheckboxItem(WI.UIString("Case Sensitive", "Case Sensitive @ Context Menu", "Context menu label for whether searches should be case sensitive."), () => { >+ contextMenu.appendCheckboxItem(WI.UIString("Case Sensitive", "Context menu label for whether searches should be case sensitive."), () => { > settings.caseSensitive.value = !settings.caseSensitive.value; > }, settings.caseSensitive.value); > } > > if (settings.regularExpression) { >- contextMenu.appendCheckboxItem(WI.UIString("Regular Expression", "Regular Expression @ Context Menu", "Context menu label for whether searches should be treated as regular expressions."), () => { >+ contextMenu.appendCheckboxItem(WI.UIString("Regular Expression", "Context menu label for whether searches should be treated as regular expressions."), () => { > settings.regularExpression.value = !settings.regularExpression.value; > }, settings.regularExpression.value); > } >diff --git a/Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js b/Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js >index 7a91b3fea37385eab2dc1f80cb1f134cdc91bb89..d6ee83c45bbfac4340398e90e5ca7b6371f1fd08 100644 >--- a/Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js >+++ b/Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js >@@ -433,9 +433,10 @@ WI.DOMManager = class DOMManager extends WI.Object > // Re-resolve the node in the console's object group when adding to the console. > let domNode = this.nodeForId(nodeId); > WI.RemoteObject.resolveNode(domNode, WI.RuntimeManager.ConsoleObjectGroup).then((remoteObject) => { >+ let text = domNode.nodeType() === Node.ELEMENT_NODE ? WI.repeatedUIString.domSelectedElement() : WI.repeatedUIString.domSelectedNode(); > const specialLogStyles = true; > const shouldRevealConsole = false; >- WI.consoleLogViewController.appendImmediateExecutionWithResult(WI.UIString("Selected Element"), remoteObject, specialLogStyles, shouldRevealConsole); >+ WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, specialLogStyles, shouldRevealConsole); > }); > } > >diff --git a/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js b/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js >index be2eeba62ccb90c2005da5aa1394840dc3b81e68..30290d636d2fb67427543817ac04df3e55d21c23 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js >@@ -65,7 +65,7 @@ WI.AuditTestGroupContentView = class AuditTestGroupContentView extends WI.AuditT > > this._percentageTextElement = document.createElement("span"); > >- const format = WI.UIString("%s%%", "Percentage (of audits)", "The number of tests that passed expressed as a percentage, followed by a literal %."); >+ const format = WI.UIString("%s%%", "The number of tests that passed expressed as a percentage, followed by a literal %."); > String.format(format, [this._percentageTextElement], String.standardFormatters, this._percentageContainer, (a, b) => { > a.append(b); > return a; >@@ -125,11 +125,11 @@ WI.AuditTestGroupContentView = class AuditTestGroupContentView extends WI.AuditT > 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); >diff --git a/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js >index 17ad5ad0574e5a4755eacdbf09266cad58c9267b..942f0a1240cb5a08f1fbbd955421cb5b5d7e9525 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js >@@ -1025,7 +1025,7 @@ WI.CPUTimelineView = class CPUTimelineView extends WI.TimelineView > let i = 0; > let sorted = sortMapByEntryCountProperty(timerMap); > for (let [key, entry] of sorted) { >- let numberValue = entry.repeating ? WI.UIString("~%s", "Approximate Number", "Approximate count of events").format(entry.count) : entry.count; >+ let numberValue = entry.repeating ? WI.UIString("~%s", "Approximate count of events").format(entry.count) : entry.count; > let sourceCodeLocation = entry.callFrame ? entry.callFrame.sourceCodeLocation : entry.sourceCodeLocation; > let labelValue = labelForLocation(key, sourceCodeLocation); > let followingRow = this._eventHandlersRow; >diff --git a/Source/WebInspectorUI/UserInterface/Views/ChangesDetailsSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/ChangesDetailsSidebarPanel.js >index 8fef7aff5a61682388ab2631ee797f6ce7ac754c..712d491143b9d2b24f59d5bc450333c14f131256 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ChangesDetailsSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ChangesDetailsSidebarPanel.js >@@ -142,7 +142,7 @@ WI.ChangesDetailsSidebarPanel = class ChangesDetailsSidebarPanel extends WI.DOMD > selectorElement.className = "selector"; > > if (style.type === WI.CSSStyleDeclaration.Type.Inline) { >- selectorElement.textContent = WI.UIString("Style Attribute"); >+ selectorElement.textContent = WI.repeatedUIString.cssStyleAttribute(); > selectorElement.classList.add("style-attribute"); > } else > selectorElement.textContent = style.ownerRule.selectorText; >diff --git a/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js b/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js >index 3672d47a6dd626602876a8b4aeaf1e2a213af9bd..411f336eea8dc979b60331af32e0e5f0135e6b25 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js >@@ -219,7 +219,7 @@ WI.appendContextMenuItemsForDOMNode = function(contextMenu, domNode, options = { > 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", "Selected DOM element") : WI.UIString("Selected Node", "Selected DOM node"); >+ let text = isElement ? WI.repeatedUIString.domSelectedElement() : WI.repeatedUIString.domSelectedNode(); > const addSpecialUserLogClass = true; > WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass); > }); >diff --git a/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js >index c1ad6faa4ceb28f3dd3f69bc334caad87eb25bcd..0409066909197aad9f777dd9a9a3ad5d71165ccb 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js >@@ -136,7 +136,7 @@ WI.LayerTreeDetailsSidebarPanel = class LayerTreeDetailsSidebarPanel extends WI. > columns.name.title = WI.UIString("Node"); > columns.name.sortable = false; > >- columns.paintCount.title = WI.UIString("Paints", "Paints @ Column title", "A count of how many times an element was painted (rendered)"); >+ columns.paintCount.title = WI.UIString("Paints", "A count of how many times an element was painted (rendered)"); > columns.paintCount.sortable = true; > columns.paintCount.aligned = "right"; > columns.paintCount.width = "70px"; >diff --git a/Source/WebInspectorUI/UserInterface/Views/LogContentView.js b/Source/WebInspectorUI/UserInterface/Views/LogContentView.js >index 35924ae386b047ead5101162f63e451dca028b22..95d8525ec04139b613976b3a12f38b1489501962 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/LogContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/LogContentView.js >@@ -637,7 +637,7 @@ WI.LogContentView = class LogContentView extends WI.ContentView > let domNode = WI.domManager.nodeForId(domNodeId); > WI.RemoteObject.resolveNode(domNode, WI.RuntimeManager.ConsoleObjectGroup) > .then((remoteObject) => { >- let text = domNode.nodeType() === Node.ELEMENT_NODE ? WI.UIString("Dropped Element") : WI.UIString("Dropped Node"); >+ let text = domNode.nodeType() === Node.ELEMENT_NODE ? WI.repeatedUIString.domDroppedElement() : WI.repeatedUIString.domDroppedNode(); > const addSpecialUserLogClass = true; > WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass); > >diff --git a/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js b/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js >index 01eea3d828b0a612408158826a4200b70e39e551..25ec048e0797f78d4403043030f46ef0ea227c8b 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js >+++ b/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js >@@ -190,7 +190,7 @@ WI.QuickConsole = class QuickConsole extends WI.View > let domNode = WI.domManager.nodeForId(domNodeId); > WI.RemoteObject.resolveNode(domNode, WI.RuntimeManager.ConsoleObjectGroup) > .then((remoteObject) => { >- let text = domNode.nodeType() === Node.ELEMENT_NODE ? WI.UIString("Dropped Element") : WI.UIString("Dropped Node"); >+ let text = domNode.nodeType() === Node.ELEMENT_NODE ? WI.repeatedUIString.domDroppedElement() : WI.repeatedUIString.domDroppedNode(); > const addSpecialUserLogClass = true; > WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass); > >diff --git a/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js b/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >index 08066cd476640c68cca97307a60f9ca3c14213d9..0e8f71a6abe72e2ec7ef9f9f482c2e5f80ce0b21 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >@@ -212,9 +212,9 @@ WI.SettingsTabContentView = class SettingsTabContentView extends WI.TabContentVi > > generalSettingsView.addSeparator(); > >- let searchGroup = generalSettingsView.addGroup(WI.UIString("Search:", "Search: @ Settings", "Settings tab label for search related settings")); >- searchGroup.addSetting(WI.settings.searchCaseSensitive, WI.UIString("Case Sensitive", "Case Sensitive @ Settings", "Settings tab checkbox label for whether searches should be case sensitive.")); >- searchGroup.addSetting(WI.settings.searchRegularExpression, WI.UIString("Regular Expression", "Regular Expression @ Settings", "Settings tab checkbox label for whether searches should be treated as regular expressions.")); >+ let searchGroup = generalSettingsView.addGroup(WI.UIString("Search:", "Settings tab label for search related settings")); >+ searchGroup.addSetting(WI.settings.searchCaseSensitive, WI.UIString("Case Sensitive", "Settings tab checkbox label for whether searches should be case sensitive.")); >+ searchGroup.addSetting(WI.settings.searchRegularExpression, WI.UIString("Regular Expression", "Settings tab checkbox label for whether searches should be treated as regular expressions.")); > > generalSettingsView.addSeparator(); > >diff --git a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >index fecbe60c23ff329d20ffc4e674d929cdfecbcffb..7c64c95b0445c8766e7cf2de7118d0dc0cb1995f 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >@@ -315,7 +315,7 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS > break; > > case WI.CSSStyleDeclaration.Type.Inline: >- this._selectorElement.textContent = WI.UIString("Style Attribute", "CSS properties defined via HTML style attribute"); >+ this._selectorElement.textContent = WI.repeatedUIString.cssStyleAttribute(); > this._selectorElement.classList.add("style-attribute"); > break; > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 8586a15c5ad87519889917f706fbeb9853cefaea..75567470f82c1408f2e8d7808bdf43c672ceea86 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,13 @@ >+2019-05-04 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: replace UIString key with comment >+ https://bugs.webkit.org/show_bug.cgi?id=197597 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/extract-localizable-js-strings: >+ (HandleUIString): >+ > 2019-05-04 Alex Christensen <achristensen@webkit.org> > > Merge the three UIKitSPI.h files into a single one in PAL >diff --git a/Tools/Scripts/extract-localizable-js-strings b/Tools/Scripts/extract-localizable-js-strings >index 68c70bdec97b774b23a799d6c570e4eecac8d10e..71bb260e1b1386f69b24da7fe149a57c53726c9c 100755 >--- a/Tools/Scripts/extract-localizable-js-strings >+++ b/Tools/Scripts/extract-localizable-js-strings >@@ -74,37 +74,28 @@ for my $file (sort @files) { > chomp; > > # Handle WebInspector strings. Prints a warning if a non-string literal is passed to WI.UIString(). >- # 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*"([^"]*)")?)?\)//; >+ HandleUIString($1, $2 || $1, $file, $.) while s/WI\.UIString\("([^"]+)"(?:,\s*"([^"]*)")?\)//; > print "$file:$.:WARNING: $&\n" while s/WI\.UIString\(.*?\)//; > > # Handle strings for other projects that also use this script. >- HandleUIString($2, $2, "", $file, $.) while s/(\bclass="[^"]*l12n-tooltip[^"]*"[^>]*)title="([^"]+)"/$1/; >- HandleUIString($1, $1, "", $file, $.) while s/\btitle="([^"]+)"([^>]*class="[^"]*l12n-tooltip[^"]*")/$2/; >- HandleUIString($2, $2, "", $file, $.) while s/<(\w+)[^>]*\bclass="[^"]*l12n[^"]*"[^>]*>([^>]+)<\/\1>//; >- HandleUIString($1, $1, "", $file, $.) while s/HTMLViewController\.UIString\("([^"]+)"\)//; >- HandleUIString($1, $1, "", $file, $.) while s/\bgetLocalizedString\("([^"]+)"\)//; >- HandleUIString($1, $1, "", $file, $.) while s/\blocalizedStrings\["([^"]+)"\]//; >+ HandleUIString($2, $2, $file, $.) while s/(\bclass="[^"]*l12n-tooltip[^"]*"[^>]*)title="([^"]+)"/$1/; >+ HandleUIString($1, $1, $file, $.) while s/\btitle="([^"]+)"([^>]*class="[^"]*l12n-tooltip[^"]*")/$2/; >+ HandleUIString($2, $2, $file, $.) while s/<(\w+)[^>]*\bclass="[^"]*l12n[^"]*"[^>]*>([^>]+)<\/\1>//; >+ HandleUIString($1, $1, $file, $.) while s/HTMLViewController\.UIString\("([^"]+)"\)//; >+ HandleUIString($1, $1, $file, $.) while s/\bgetLocalizedString\("([^"]+)"\)//; >+ HandleUIString($1, $1, $file, $.) while s/\blocalizedStrings\["([^"]+)"\]//; > } > > close SOURCE; > } > > my %stringByKey; >-my %commentByKey; > my %fileByKey; > my %lineByKey; > > sub HandleUIString > { >- my ($string, $key, $comment, $file, $line) = @_; >+ my ($string, $key, $file, $line) = @_; > my $bad = 0; > > if (grep { $_ == 0xFFFD } unpack "U*", $string) { >@@ -117,11 +108,6 @@ sub HandleUIString > $bad = 1; > } > >- if (grep { $_ == 0xFFFD } unpack "U*", $comment) { >- print "$file:$line:ERROR:comment for translation has illegal UTF-8 -- most likely a problem with the Text Encoding of the source file\n"; >- $bad = 1; >- } >- > if ($bad) { > $sawError = 1; > return; >@@ -134,17 +120,9 @@ sub HandleUIString > return; > } > >- if ($commentByKey{$key} && $commentByKey{$key} ne $comment) { >- print "$file:$line:encountered the same key, \"$key\", twice, with different comments\n"; >- print "$fileByKey{$key}:$lineByKey{$key}:previous occurrence\n"; >- $keyCollisionCount++; >- return; >- } >- > $fileByKey{$key} = $file; > $lineByKey{$key} = $line; > $stringByKey{$key} = $string; >- $commentByKey{$key} = $comment; > } > > print "\n" if $sawError; >@@ -158,8 +136,7 @@ if ($sawError) { > > my $localizedStrings = "var localizedStrings = new Object;\n\n"; > >-for my $key (sort keys %commentByKey) { >- $localizedStrings .= "/* $commentByKey{$key} */\n" if length $commentByKey{$key}; >+for my $key (sort keys %stringByKey) { > $localizedStrings .= "localizedStrings[\"$key\"] = \"$stringByKey{$key}\";\n"; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bburg
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197597
: 369089