Changeset 214841 in webkit
- Timestamp:
- Apr 3, 2017 3:06:24 PM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r214840 r214841 1 2017-04-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: "Space" is not localizable in Timelines record button tooltips 4 https://bugs.webkit.org/show_bug.cgi?id=170420 5 <rdar://problem/30871371> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Base/LoadLocalizedStrings.js: 10 (WebInspector.unlocalizedString): 11 (WebInspector.UIString): 12 * UserInterface/Base/Main.js: 13 Move UIString / unlocalizedString to LoadLocalizedString.js. 14 They may be needed before Main.js has introduced it. 15 16 * UserInterface/Test/Test.js: 17 Provide a default implementaiton of unlocalizedString. 18 19 * Localizations/en.lproj/localizedStrings.js: 20 * UserInterface/Models/KeyboardShortcut.js: 21 Most keys use a symbol to represent the key. "Space" was the one 22 exception, so use a localized string. 23 1 24 2017-04-03 Joseph Pecoraro <pecoraro@apple.com> 2 25 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r214840 r214841 768 768 localizedStrings["Source"] = "Source"; 769 769 localizedStrings["Sources"] = "Sources"; 770 localizedStrings["Space"] = "Space"; 770 771 localizedStrings["Spaces"] = "Spaces"; 771 772 localizedStrings["Spacing"] = "Spacing"; -
trunk/Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js
r164543 r214841 33 33 document.write("<script src=\"" + localizedStringsURL + "\"></script>"); 34 34 })(); 35 36 WebInspector.unlocalizedString = function(string) 37 { 38 // Intentionally do nothing, since this is for engineering builds 39 // (such as in Debug UI) or in text that is standardized in English. 40 // For example, CSS property names and values are never localized. 41 return string; 42 }; 43 44 WebInspector.UIString = function(string, vararg) 45 { 46 if (WebInspector.dontLocalizeUserInterface) 47 return string; 48 49 if (window.localizedStrings && string in window.localizedStrings) 50 return window.localizedStrings[string]; 51 52 if (!this._missingLocalizedStrings) 53 this._missingLocalizedStrings = {}; 54 55 if (!(string in this._missingLocalizedStrings)) { 56 console.error("Localized string \"" + string + "\" was not found."); 57 this._missingLocalizedStrings[string] = true; 58 } 59 60 return "LOCALIZED STRING NOT FOUND"; 61 }; -
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
r214494 r214841 1065 1065 }; 1066 1066 1067 WebInspector.unlocalizedString = function(string)1068 {1069 // Intentionally do nothing, since this is for engineering builds1070 // (such as in Debug UI) or in text that is standardized in English.1071 // For example, CSS property names and values are never localized.1072 return string;1073 };1074 1075 WebInspector.UIString = function(string, vararg)1076 {1077 if (WebInspector.dontLocalizeUserInterface)1078 return string;1079 1080 if (window.localizedStrings && string in window.localizedStrings)1081 return window.localizedStrings[string];1082 1083 if (!this._missingLocalizedStrings)1084 this._missingLocalizedStrings = {};1085 1086 if (!(string in this._missingLocalizedStrings)) {1087 console.error("Localized string \"" + string + "\" was not found.");1088 this._missingLocalizedStrings[string] = true;1089 }1090 1091 return "LOCALIZED STRING NOT FOUND";1092 };1093 1094 1067 WebInspector.indentString = function() 1095 1068 { -
trunk/Source/WebInspectorUI/UserInterface/Models/KeyboardShortcut.js
r184974 r214841 233 233 Enter: new WebInspector.Key(13, "\u21a9"), 234 234 Escape: new WebInspector.Key(27, "\u238b"), 235 Space: new WebInspector.Key(32, "Space"),235 Space: new WebInspector.Key(32, WebInspector.UIString("Space")), 236 236 PageUp: new WebInspector.Key(33, "\u21de"), 237 237 PageDown: new WebInspector.Key(34, "\u21df"), -
trunk/Source/WebInspectorUI/UserInterface/Test/Test.js
r213626 r214841 103 103 WebInspector.isDebugUIEnabled = () => false; 104 104 105 WebInspector.unlocalizedString = (string) => string; 105 106 WebInspector.UIString = (string) => string; 106 107
Note: See TracChangeset
for help on using the changeset viewer.