Changeset 239286 in webkit


Ignore:
Timestamp:
Dec 17, 2018 1:16:30 PM (5 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Audit: add plural result strings
https://bugs.webkit.org/show_bug.cgi?id=192769
<rdar://problem/46628680>

Reviewed by Brian Burg.

  • UserInterface/Views/AuditTestContentView.js:

(WI.AuditTestContentView.prototype.showNoResultDataPlaceholder):

  • UserInterface/Views/AuditTestGroupContentView.js:

(WI.AuditTestGroupContentView.prototype.layout):

  • Localizations/en.lproj/localizedStrings.js:
Location:
trunk/Source/WebInspectorUI
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r239285 r239286  
     12018-12-17  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Audit: add plural result strings
     4        https://bugs.webkit.org/show_bug.cgi?id=192769
     5        <rdar://problem/46628680>
     6
     7        Reviewed by Brian Burg.
     8
     9        * UserInterface/Views/AuditTestContentView.js:
     10        (WI.AuditTestContentView.prototype.showNoResultDataPlaceholder):
     11
     12        * UserInterface/Views/AuditTestGroupContentView.js:
     13        (WI.AuditTestGroupContentView.prototype.layout):
     14
     15        * Localizations/en.lproj/localizedStrings.js:
     16
    1172018-12-17  Devin Rousso  <drousso@apple.com>
    218
  • trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js

    r239285 r239286  
    2626localizedStrings["%d Errors"] = "%d Errors";
    2727localizedStrings["%d Errors, %d Warnings"] = "%d Errors, %d Warnings";
    28 localizedStrings["%d Fail"] = "%d Fail";
     28localizedStrings["%d Failed"] = "%d Failed";
    2929localizedStrings["%d Frame"] = "%d Frame";
    3030localizedStrings["%d Frames"] = "%d Frames";
    3131localizedStrings["%d More\u2026"] = "%d More\u2026";
    32 localizedStrings["%d Pass"] = "%d Pass";
     32localizedStrings["%d Passed"] = "%d Passed";
    3333localizedStrings["%d Threads"] = "%d Threads";
    3434localizedStrings["%d Unsupported"] = "%d Unsupported";
    35 localizedStrings["%d Warn"] = "%d Warn";
     35localizedStrings["%d Warning"] = "%d Warning";
    3636localizedStrings["%d Warnings"] = "%d Warnings";
    3737localizedStrings["%d \xd7 %d pixels"] = "%d \xd7 %d pixels";
     
    922922localizedStrings["The \u201C%s\u201D audit is unsupported"] = "The \u201C%s\u201D audit is unsupported";
    923923localizedStrings["The \u201C%s\u201D audit passed"] = "The \u201C%s\u201D audit passed";
     924localizedStrings["The \u201C%s\u201D audit resulted in a warning"] = "The \u201C%s\u201D audit resulted in a warning";
    924925localizedStrings["The \u201C%s\u201D audit threw an error"] = "The \u201C%s\u201D audit threw an error";
    925 localizedStrings["The \u201C%s\u201D audit warned"] = "The \u201C%s\u201D audit warned";
    926926localizedStrings["The \u201C%s\u201D\ntable is empty."] = "The \u201C%s\u201D\ntable is empty.";
    927927localizedStrings["The page's content has changed"] = "The page's content has changed";
  • trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestContentView.js

    r238743 r239286  
    181181                message = WI.UIString("The \u201C%s\u201D audit failed");
    182182            else if (result.didWarn)
    183                 message = WI.UIString("The \u201C%s\u201D audit warned");
     183                message = WI.UIString("The \u201C%s\u201D audit resulted in a warning");
    184184            else if (result.didPass)
    185185                message = WI.UIString("The \u201C%s\u201D audit passed");
  • trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js

    r238743 r239286  
    9898            let scopeBarItems = [];
    9999
    100             let addScopeBarItem = (level, label) => {
     100            let addScopeBarItem = (level, labelSingular, labelPlural) => {
    101101                let count = levelCounts[level];
    102102                if (isNaN(count) || count <= 0)
    103103                    return;
    104104
     105                let label = (labelPlural && count !== 1) ? labelPlural : labelSingular;
    105106                let scopeBarItem = new WI.ScopeBarItem(level, label.format(count), {
    106107                    className: level,
     
    112113            };
    113114
    114             addScopeBarItem(WI.AuditTestCaseResult.Level.Pass, WI.UIString("%d Pass"));
    115             addScopeBarItem(WI.AuditTestCaseResult.Level.Warn, WI.UIString("%d Warn"));
    116             addScopeBarItem(WI.AuditTestCaseResult.Level.Fail, WI.UIString("%d Fail"));
    117             addScopeBarItem(WI.AuditTestCaseResult.Level.Error, WI.UIString("%d Error"));
     115            addScopeBarItem(WI.AuditTestCaseResult.Level.Pass, WI.UIString("%d Passed"));
     116            addScopeBarItem(WI.AuditTestCaseResult.Level.Warn, WI.UIString("%d Warning"), WI.UIString("%d Warnings"));
     117            addScopeBarItem(WI.AuditTestCaseResult.Level.Fail, WI.UIString("%d Failed"));
     118            addScopeBarItem(WI.AuditTestCaseResult.Level.Error, WI.UIString("%d Error"), WI.UIString("%d Errors"));
    118119            addScopeBarItem(WI.AuditTestCaseResult.Level.Unsupported, WI.UIString("%d Unsupported"));
    119120
Note: See TracChangeset for help on using the changeset viewer.