Changeset 75714 in webkit


Ignore:
Timestamp:
Jan 13, 2011 7:49:37 AM (13 years ago)
Author:
mnaganov@chromium.org
Message:

2011-01-13 Mikhail Naganov <mnaganov@chromium.org>

Reviewed by Timothy Hatcher.

Web Inspector: Cleanup after r75613 -- make all UI-facing strings
to be passed directly to WebInspector.UIString

https://bugs.webkit.org/show_bug.cgi?id=52365

  • English.lproj/localizedStrings.js:
  • inspector/front-end/ApplicationCacheItemsView.js: (WebInspector.ApplicationCacheItemsView.prototype._updateCallback): (WebInspector.ApplicationCacheItemsView.prototype._populateDataGrid):
  • inspector/front-end/AuditRules.js: (WebInspector.AuditRules.GzipRule.prototype.doRun): (WebInspector.AuditRules.CookieSizeRule.prototype.processCookies): (WebInspector.AuditRules.StaticCookielessRule.prototype.processCookies):
  • inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.EventListenerBreakpointsSidebarPane): (WebInspector.EventListenerBreakpointsSidebarPane.prototype._createCategory):
  • inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView.prototype._updateWithCookies):
  • inspector/front-end/ImageView.js: (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad): (WebInspector.ImageView.prototype._createContentIfNeeded):
  • inspector/front-end/NetworkPanel.js: (WebInspector.NetworkTimeCalculator.prototype.formatValue): (WebInspector.NetworkTransferTimeCalculator.prototype.formatValue): (WebInspector.NetworkTransferDurationCalculator.prototype.formatValue):
  • inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds): (WebInspector.ProfileDataGridNode.prototype.get data):
  • inspector/front-end/Resource.js: (WebInspector.Resource.Type.toUIString): (WebInspector.Resource.Type.toString):
  • inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewCalculator.prototype.formatValue):
  • inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelineCalculator.prototype.formatValue): (WebInspector.TimelinePanel.FormattedRecord.prototype._generateAggregatedInfo): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
  • inspector/front-end/utilities.js: ():
  • Scripts/check-inspector-strings:
Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r75713 r75714  
     12011-01-13  Mikhail Naganov  <mnaganov@chromium.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Web Inspector: Cleanup after r75613 -- make all UI-facing strings
     6        to be passed directly to WebInspector.UIString
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=52365
     9
     10        * English.lproj/localizedStrings.js:
     11        * inspector/front-end/ApplicationCacheItemsView.js:
     12        (WebInspector.ApplicationCacheItemsView.prototype._updateCallback):
     13        (WebInspector.ApplicationCacheItemsView.prototype._populateDataGrid):
     14        * inspector/front-end/AuditRules.js:
     15        (WebInspector.AuditRules.GzipRule.prototype.doRun):
     16        (WebInspector.AuditRules.CookieSizeRule.prototype.processCookies):
     17        (WebInspector.AuditRules.StaticCookielessRule.prototype.processCookies):
     18        * inspector/front-end/BreakpointsSidebarPane.js:
     19        (WebInspector.EventListenerBreakpointsSidebarPane):
     20        (WebInspector.EventListenerBreakpointsSidebarPane.prototype._createCategory):
     21        * inspector/front-end/CookieItemsView.js:
     22        (WebInspector.CookieItemsView.prototype._updateWithCookies):
     23        * inspector/front-end/ImageView.js:
     24        (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad):
     25        (WebInspector.ImageView.prototype._createContentIfNeeded):
     26        * inspector/front-end/NetworkPanel.js:
     27        (WebInspector.NetworkTimeCalculator.prototype.formatValue):
     28        (WebInspector.NetworkTransferTimeCalculator.prototype.formatValue):
     29        (WebInspector.NetworkTransferDurationCalculator.prototype.formatValue):
     30        * inspector/front-end/ProfileDataGridTree.js:
     31        (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds):
     32        (WebInspector.ProfileDataGridNode.prototype.get data):
     33        * inspector/front-end/Resource.js:
     34        (WebInspector.Resource.Type.toUIString):
     35        (WebInspector.Resource.Type.toString):
     36        * inspector/front-end/TimelineOverviewPane.js:
     37        (WebInspector.TimelineOverviewCalculator.prototype.formatValue):
     38        * inspector/front-end/TimelinePanel.js:
     39        (WebInspector.TimelinePanel):
     40        (WebInspector.TimelineCalculator.prototype.formatValue):
     41        (WebInspector.TimelinePanel.FormattedRecord.prototype._generateAggregatedInfo):
     42        (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
     43        (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
     44        * inspector/front-end/utilities.js:
     45        ():
     46
    1472011-01-13  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
    248
  • trunk/Source/WebCore/inspector/front-end/ApplicationCacheItemsView.js

    r70214 r75714  
    168168        this.deleteButton.visible = true;
    169169
    170         var totalSizeString = Number.bytesToString(this._size, WebInspector.UIString);
     170        var totalSizeString = Number.bytesToString(this._size);
    171171        this._treeElement.subtitle = WebInspector.UIString("%s (%s)", lastPathComponent, totalSizeString);
    172172
     
    224224            data[0] = resource.name;
    225225            data[1] = resource.type;
    226             data[2] = Number.bytesToString(resource.size, WebInspector.UIString);
     226            data[2] = Number.bytesToString(resource.size);
    227227            var node = new WebInspector.DataGridNode(data);
    228228            node.resource = resource;
  • trunk/Source/WebCore/inspector/front-end/AuditRules.js

    r74709 r75714  
    9393                var savings = 2 * size / 3;
    9494                totalSavings += savings;
    95                 summary.addChild(String.sprintf("%s could save ~%s", WebInspector.AuditRuleResult.linkifyDisplayName(resource.url), Number.bytesToString(savings, WebInspector.UIString)));
     95                summary.addChild(String.sprintf("%s could save ~%s", WebInspector.AuditRuleResult.linkifyDisplayName(resource.url), Number.bytesToString(savings)));
    9696                result.violationCount++;
    9797            }
     
    9999        if (!totalSavings)
    100100            return callback(null);
    101         summary.value = String.sprintf("Compressing the following resources with gzip could reduce their transfer size by about two thirds (~%s):", Number.bytesToString(totalSavings, WebInspector.UIString));
     101        summary.value = String.sprintf("Compressing the following resources with gzip could reduce their transfer size by about two thirds (~%s):", Number.bytesToString(totalSavings));
    102102        callback(result);
    103103    },
     
    967967            var maxCookieSize = sortedCookieSizes[i].maxCookieSize;
    968968            if (maxCookieSize > this._maxBytesThreshold)
    969                 hugeCookieDomains.push(WebInspector.AuditRuleResult.resourceDomain(sortedCookieSizes[i].domain) + ": " + Number.bytesToString(maxCookieSize, WebInspector.UIString));
     969                hugeCookieDomains.push(WebInspector.AuditRuleResult.resourceDomain(sortedCookieSizes[i].domain) + ": " + Number.bytesToString(maxCookieSize));
    970970        }
    971971
     
    976976            var avgCookieSize = sortedCookieSizes[i].avgCookieSize;
    977977            if (avgCookieSize > this._avgBytesThreshold && avgCookieSize < this._maxBytesThreshold)
    978                 bigAvgCookieDomains.push(WebInspector.AuditRuleResult.resourceDomain(domain) + ": " + Number.bytesToString(avgCookieSize, WebInspector.UIString));
    979         }
    980         result.addChild(String.sprintf("The average cookie size for all requests on this page is %s", Number.bytesToString(avgAllCookiesSize, WebInspector.UIString)));
     978                bigAvgCookieDomains.push(WebInspector.AuditRuleResult.resourceDomain(domain) + ": " + Number.bytesToString(avgCookieSize));
     979        }
     980        result.addChild(String.sprintf("The average cookie size for all requests on this page is %s", Number.bytesToString(avgAllCookiesSize)));
    981981
    982982        var message;
     
    10281028            return;
    10291029
    1030         var entry = result.addChild(String.sprintf("%s of cookies were sent with the following static resources. Serve these static resources from a domain that does not set cookies:", Number.bytesToString(cookieBytes, WebInspector.UIString)), true);
     1030        var entry = result.addChild(String.sprintf("%s of cookies were sent with the following static resources. Serve these static resources from a domain that does not set cookies:", Number.bytesToString(cookieBytes)), true);
    10311031        entry.addURLs(badUrls);
    10321032        result.violationCount = badUrls.length;
  • trunk/Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js

    r75613 r75714  
    266266
    267267    this._breakpointItems = {};
    268     this._createCategory(/*@LS*/"Keyboard", "listener", ["keydown", "keyup", "keypress", "textInput"]);
    269     this._createCategory(/*@LS*/"Mouse", "listener", ["click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove", "mouseout", "mousewheel"]);
     268    this._createCategory(WebInspector.UIString("Keyboard"), "listener", ["keydown", "keyup", "keypress", "textInput"]);
     269    this._createCategory(WebInspector.UIString("Mouse"), "listener", ["click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove", "mouseout", "mousewheel"]);
    270270    // FIXME: uncomment following once inspector stops being drop targer in major ports.
    271271    // Otherwise, inspector page reacts on drop event and tries to load the event data.
    272     // this._createCategory(/*@LS*/"Drag", "listener", ["drag", "drop", "dragstart", "dragend", "dragenter", "dragleave", "dragover"]);
    273     this._createCategory(/*@LS*/"Control", "listener", ["resize", "scroll", "zoom", "focus", "blur", "select", "change", "submit", "reset"]);
    274     this._createCategory(/*@LS*/"Clipboard", "listener", ["copy", "cut", "paste", "beforecopy", "beforecut", "beforepaste"]);
    275     this._createCategory(/*@LS*/"Load", "listener", ["load", "unload", "abort", "error"]);
    276     this._createCategory(/*@LS*/"DOM Mutation", "listener", ["DOMActivate", "DOMFocusIn", "DOMFocusOut", "DOMAttrModified", "DOMCharacterDataModified", "DOMNodeInserted", "DOMNodeInsertedIntoDocument", "DOMNodeRemoved", "DOMNodeRemovedFromDocument", "DOMSubtreeModified", "DOMContentLoaded"]);
    277     this._createCategory(/*@LS*/"Device", "listener", ["deviceorientation", "devicemotion"]);
    278     this._createCategory(/*@LS*/"Timer", "instrumentation", ["setTimer", "clearTimer", "timerFired"]);
     272    // this._createCategory(WebInspector.UIString("Drag"), "listener", ["drag", "drop", "dragstart", "dragend", "dragenter", "dragleave", "dragover"]);
     273    this._createCategory(WebInspector.UIString("Control"), "listener", ["resize", "scroll", "zoom", "focus", "blur", "select", "change", "submit", "reset"]);
     274    this._createCategory(WebInspector.UIString("Clipboard"), "listener", ["copy", "cut", "paste", "beforecopy", "beforecut", "beforepaste"]);
     275    this._createCategory(WebInspector.UIString("Load"), "listener", ["load", "unload", "abort", "error"]);
     276    this._createCategory(WebInspector.UIString("DOM Mutation"), "listener", ["DOMActivate", "DOMFocusIn", "DOMFocusOut", "DOMAttrModified", "DOMCharacterDataModified", "DOMNodeInserted", "DOMNodeInsertedIntoDocument", "DOMNodeRemoved", "DOMNodeRemovedFromDocument", "DOMSubtreeModified", "DOMContentLoaded"]);
     277    this._createCategory(WebInspector.UIString("Device"), "listener", ["deviceorientation", "devicemotion"]);
     278    this._createCategory(WebInspector.UIString("Timer"), "instrumentation", ["setTimer", "clearTimer", "timerFired"]);
    279279}
    280280
     
    283283    {
    284284        var categoryItem = {};
    285         categoryItem.element = new TreeElement(WebInspector.UIString(name));
     285        categoryItem.element = new TreeElement(name);
    286286        this.categoriesTreeOutline.appendChild(categoryItem.element);
    287287        categoryItem.element.listItemElement.addStyleClass("event-category");
  • trunk/Source/WebCore/inspector/front-end/CookieItemsView.js

    r75489 r75714  
    102102        if (isAdvanced) {
    103103            this._treeElement.subtitle = String.sprintf(WebInspector.UIString("%d cookies (%s)"), this._cookies.length,
    104                 Number.bytesToString(this._totalSize, WebInspector.UIString));
     104                Number.bytesToString(this._totalSize));
    105105            this._deleteButton.visible = true;
    106106        }
  • trunk/Source/WebCore/inspector/front-end/ImageView.js

    r72655 r75714  
    8888            var imageProperties = [
    8989                { name: WebInspector.UIString("Dimensions"), value: WebInspector.UIString("%d × %d", imagePreviewElement.naturalWidth, imagePreviewElement.naturalHeight) },
    90                 { name: WebInspector.UIString("File size"), value: Number.bytesToString(resourceSize, WebInspector.UIString) },
     90                { name: WebInspector.UIString("File size"), value: Number.bytesToString(resourceSize) },
    9191                { name: WebInspector.UIString("MIME type"), value: this.resource.mimeType }
    9292            ];
  • trunk/Source/WebCore/inspector/front-end/NetworkPanel.js

    r74709 r75714  
    12311231    formatValue: function(value)
    12321232    {
    1233         return Number.secondsToString(value, WebInspector.UIString);
     1233        return Number.secondsToString(value);
    12341234    },
    12351235
     
    12551255    formatValue: function(value)
    12561256    {
    1257         return Number.secondsToString(value, WebInspector.UIString);
     1257        return Number.secondsToString(value);
    12581258    },
    12591259
     
    12791279    formatValue: function(value)
    12801280    {
    1281         return Number.secondsToString(value, WebInspector.UIString);
     1281        return Number.secondsToString(value);
    12821282    },
    12831283
  • trunk/Source/WebCore/inspector/front-end/ProfileDataGridTree.js

    r67525 r75714  
    5151        function formatMilliseconds(time)
    5252        {
    53             return Number.secondsToString(time / 1000, WebInspector.UIString, !Preferences.samplingCPUProfiler);
     53            return Number.secondsToString(time / 1000, !Preferences.samplingCPUProfiler);
    5454        }
    5555
  • trunk/Source/WebCore/inspector/front-end/Resource.js

    r75613 r75714  
    5656    toUIString: function(type)
    5757    {
    58         return WebInspector.UIString(WebInspector.Resource.Type.toString(type));
     58        switch (type) {
     59            case this.Document:
     60                return WebInspector.UIString("Document");
     61            case this.Stylesheet:
     62                return WebInspector.UIString("Stylesheet");
     63            case this.Image:
     64                return WebInspector.UIString("Image");
     65            case this.Font:
     66                return WebInspector.UIString("Font");
     67            case this.Script:
     68                return WebInspector.UIString("Script");
     69            case this.XHR:
     70                return WebInspector.UIString("XHR");
     71            case this.Media:
     72                return WebInspector.UIString("Media");
     73            case this.WebSocket:
     74                return WebInspector.UIString("WebSocket");
     75            case this.Other:
     76            default:
     77                return WebInspector.UIString("Other");
     78        }
    5979    },
    6080
     
    6585        switch (type) {
    6686            case this.Document:
    67                 return /*@LS*/"document";
     87                return "document";
    6888            case this.Stylesheet:
    69                 return /*@LS*/"stylesheet";
     89                return "stylesheet";
    7090            case this.Image:
    71                 return /*@LS*/"image";
     91                return "image";
    7292            case this.Font:
    73                 return /*@LS*/"font";
     93                return "font";
    7494            case this.Script:
    75                 return /*@LS*/"script";
     95                return "script";
    7696            case this.XHR:
    77                 return /*@LS*/"xhr";
     97                return "xhr";
    7898            case this.Media:
    79                 return /*@LS*/"media";
     99                return "media";
    80100            case this.WebSocket:
    81                 return /*@LS*/"websocket";
     101                return "websocket";
    82102            case this.Other:
    83103            default:
    84                 return /*@LS*/"other";
     104                return "other";
    85105        }
    86106    }
  • trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js

    r68778 r75714  
    399399    formatValue: function(value)
    400400    {
    401         return Number.secondsToString(value, WebInspector.UIString);
     401        return Number.secondsToString(value);
    402402    }
    403403}
  • trunk/Source/WebCore/inspector/front-end/TimelinePanel.js

    r75604 r75714  
    8484    this._calculator = new WebInspector.TimelineCalculator();
    8585    this._calculator._showShortEvents = false;
    86     var shortRecordThresholdTitle = Number.secondsToString(WebInspector.TimelinePanel.shortRecordThreshold, WebInspector.UIString);
     86    var shortRecordThresholdTitle = Number.secondsToString(WebInspector.TimelinePanel.shortRecordThreshold);
    8787    this._showShortRecordsTitleText = WebInspector.UIString("Show the records that are shorter than %s", shortRecordThresholdTitle);
    8888    this._hideShortRecordsTitleText = WebInspector.UIString("Hide the records that are shorter than %s", shortRecordThresholdTitle);
     
    711711    formatValue: function(value)
    712712    {
    713         return Number.secondsToString(value + this.minimumBoundary - this._absoluteMinimumBoundary, WebInspector.UIString);
     713        return Number.secondsToString(value + this.minimumBoundary - this._absoluteMinimumBoundary);
    714714    }
    715715}
     
    909909            cell.appendChild(label);
    910910            var text = document.createElement("span");
    911             text.textContent = Number.secondsToString(this._aggregatedStats[index] + 0.0001, WebInspector.UIString);
     911            text.textContent = Number.secondsToString(this._aggregatedStats[index] + 0.0001);
    912912            cell.appendChild(text);
    913913        }
     
    920920
    921921        if (this._children && this._children.length) {
    922             contentHelper._appendTextRow(WebInspector.UIString("Self Time"), Number.secondsToString(this._selfTime + 0.0001, WebInspector.UIString));
     922            contentHelper._appendTextRow(WebInspector.UIString("Self Time"), Number.secondsToString(this._selfTime + 0.0001));
    923923            contentHelper._appendElementRow(WebInspector.UIString("Aggregated Time"), this._generateAggregatedInfo());
    924924        }
    925         var text = WebInspector.UIString("%s (at %s)", Number.secondsToString(this._lastChildEndTime - this.startTime, WebInspector.UIString),
     925        var text = WebInspector.UIString("%s (at %s)", Number.secondsToString(this._lastChildEndTime - this.startTime),
    926926            calculator.formatValue(this.startTime - calculator.minimumBoundary));
    927927        contentHelper._appendTextRow(WebInspector.UIString("Duration"), text);
     
    931931        switch (this.type) {
    932932            case recordTypes.GCEvent:
    933                 contentHelper._appendTextRow(WebInspector.UIString("Collected"), Number.bytesToString(this.data.usedHeapSizeDelta, WebInspector.UIString));
     933                contentHelper._appendTextRow(WebInspector.UIString("Collected"), Number.bytesToString(this.data.usedHeapSizeDelta));
    934934                break;
    935935            case recordTypes.TimerInstall:
     
    938938                contentHelper._appendTextRow(WebInspector.UIString("Timer ID"), this.data.timerId);
    939939                if (typeof this.timeout === "number") {
    940                     contentHelper._appendTextRow(WebInspector.UIString("Timeout"), Number.secondsToString(this.timeout / 1000, WebInspector.UIString));
     940                    contentHelper._appendTextRow(WebInspector.UIString("Timeout"), Number.secondsToString(this.timeout / 1000));
    941941                    contentHelper._appendTextRow(WebInspector.UIString("Repeats"), !this.singleShot);
    942942                }
     
    979979
    980980        if (this.usedHeapSize)
    981             contentHelper._appendTextRow(WebInspector.UIString("Used Heap Size"), WebInspector.UIString("%s of %s", Number.bytesToString(this.usedHeapSize, WebInspector.UIString), Number.bytesToString(this.totalHeapSize, WebInspector.UIString)));
     981            contentHelper._appendTextRow(WebInspector.UIString("Used Heap Size"), WebInspector.UIString("%s of %s", Number.bytesToString(this.usedHeapSize), Number.bytesToString(this.totalHeapSize)));
    982982
    983983        if (this.callSiteStackTrace && this.callSiteStackTrace.length)
     
    994994        switch (record.type) {
    995995            case WebInspector.TimelineAgent.RecordType.GCEvent:
    996                 return WebInspector.UIString("%s collected", Number.bytesToString(record.data.usedHeapSizeDelta, WebInspector.UIString));
     996                return WebInspector.UIString("%s collected", Number.bytesToString(record.data.usedHeapSizeDelta));
    997997            case WebInspector.TimelineAgent.RecordType.TimerFire:
    998998                return record.data.scriptName ? WebInspector.linkifyResourceAsNode(record.data.scriptName, "scripts", record.data.scriptLine, "", "") : record.data.timerId;
  • trunk/Source/WebCore/inspector/front-end/utilities.js

    r75613 r75714  
    644644}
    645645
    646 Number.millisToString = function(ms, formatterFunction, higherResolution)
    647 {
    648     return Number.secondsToString(ms / 1000, formatterFunction, higherResolution);
    649 }
    650 
    651 Number.secondsToString = function(seconds, formatterFunction, higherResolution)
    652 {
    653     if (!formatterFunction)
    654         formatterFunction = String.sprintf;
    655 
     646Number.millisToString = function(ms, higherResolution)
     647{
     648    return Number.secondsToString(ms / 1000, higherResolution);
     649}
     650
     651Number.secondsToString = function(seconds, higherResolution)
     652{
    656653    if (seconds === 0)
    657654        return "0";
     
    659656    var ms = seconds * 1000;
    660657    if (higherResolution && ms < 1000)
    661         return formatterFunction(/*@LS*/"%.3fms", ms);
     658        return WebInspector.UIString("%.3fms", ms);
    662659    else if (ms < 1000)
    663         return formatterFunction(/*@LS*/"%.0fms", ms);
     660        return WebInspector.UIString("%.0fms", ms);
    664661
    665662    if (seconds < 60)
    666         return formatterFunction(/*@LS*/"%.2fs", seconds);
     663        return WebInspector.UIString("%.2fs", seconds);
    667664
    668665    var minutes = seconds / 60;
    669666    if (minutes < 60)
    670         return formatterFunction(/*@LS*/"%.1fmin", minutes);
     667        return WebInspector.UIString("%.1fmin", minutes);
    671668
    672669    var hours = minutes / 60;
    673670    if (hours < 24)
    674         return formatterFunction(/*@LS*/"%.1fhrs", hours);
     671        return WebInspector.UIString("%.1fhrs", hours);
    675672
    676673    var days = hours / 24;
    677     return formatterFunction(/*@LS*/"%.1f days", days);
    678 }
    679 
    680 Number.bytesToString = function(bytes, formatterFunction, higherResolution)
    681 {
    682     if (!formatterFunction)
    683         formatterFunction = String.sprintf;
     674    return WebInspector.UIString("%.1f days", days);
     675}
     676
     677Number.bytesToString = function(bytes, higherResolution)
     678{
    684679    if (typeof higherResolution === "undefined")
    685680        higherResolution = true;
    686681
    687682    if (bytes < 1024)
    688         return formatterFunction(/*@LS*/"%.0fB", bytes);
     683        return WebInspector.UIString("%.0fB", bytes);
    689684
    690685    var kilobytes = bytes / 1024;
    691686    if (higherResolution && kilobytes < 1024)
    692         return formatterFunction(/*@LS*/"%.2fKB", kilobytes);
     687        return WebInspector.UIString("%.2fKB", kilobytes);
    693688    else if (kilobytes < 1024)
    694         return formatterFunction(/*@LS*/"%.0fKB", kilobytes);
     689        return WebInspector.UIString("%.0fKB", kilobytes);
    695690
    696691    var megabytes = kilobytes / 1024;
    697692    if (higherResolution)
    698         return formatterFunction(/*@LS*/"%.2fMB", megabytes);
     693        return WebInspector.UIString("%.2fMB", megabytes);
    699694    else
    700         return formatterFunction(/*@LS*/"%.0fMB", megabytes);
     695        return WebInspector.UIString("%.0fMB", megabytes);
    701696}
    702697
  • trunk/Tools/ChangeLog

    r75705 r75714  
     12011-01-13  Mikhail Naganov  <mnaganov@chromium.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Web Inspector: Cleanup after r75613 -- make all UI-facing strings
     6        to be passed directly to WebInspector.UIString
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=52365
     9
     10        * Scripts/check-inspector-strings:
     11
    1122011-01-13  Sheriff Bot  <webkit.review.bot@gmail.com>
    213
  • trunk/Tools/Scripts/check-inspector-strings

    r75613 r75714  
    9595    change_directory(checkout_root=checkout_root, paths=None)
    9696
    97     strings_extractor = StringsExtractor([r"(?:WebInspector\.(?:UIString|formatLocalized)\(|/\*@LS\*/)\"((?:[^\"\\]|\\.)*?)\"", r"\"((?:[^\"\\]|\\.)*?)\""])
     97    strings_extractor = StringsExtractor([r"WebInspector\.(?:UIString|formatLocalized)\(\"((?:[^\"\\]|\\.)*?)\"", r"\"((?:[^\"\\]|\\.)*?)\""])
    9898    file_reader = TextFileReader(strings_extractor)
    9999    file_reader.process_paths([_inspector_directory])
Note: See TracChangeset for help on using the changeset viewer.