Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core(i18n): add [ICU Syntax] label to relevant message descriptions #5736

Merged
merged 1 commit into from
Jul 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const UIStrings = {
'Large network payloads cost users real money and are highly correlated with ' +
'long load times. [Learn ' +
'more](https://developers.google.com/web/tools/lighthouse/audits/network-payloads).',
/** [ICU Syntax] Used to summarize the total byte size of the page and all its network requests */
displayValue: 'Total size was {totalBytes, number, bytes}\xa0KB',
};

Expand Down
1 change: 1 addition & 0 deletions lighthouse-core/audits/time-to-first-byte.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const UIStrings = {
failureTitle: 'Reduce server response times (TTFB)',
description: 'Time To First Byte identifies the time at which your server sends a response.' +
' [Learn more](https://developers.google.com/web/tools/lighthouse/audits/ttfb).',
/** [ICU Syntax] Used to summarize the total Time to First Byte duration for the primary HTML response */
displayValue: `Root document took {timeInMs, number, milliseconds}\xa0ms`,
};

Expand Down
6 changes: 3 additions & 3 deletions lighthouse-core/lib/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ const MESSAGE_INSTANCE_ID_REGEX = /(.* \| .*) # (\d+)$/;


const UIStrings = {
/** Used to show the duration in milliseconds that something lasted */
/** [ICU Syntax] Used to show the duration in milliseconds that something lasted */
ms: '{timeInMs, number, milliseconds}\xa0ms',
/** Used to show how many bytes the user could reduce their page by if they implemented the suggestions */
/** [ICU Syntax] Used to show how many bytes the user could reduce their page by if they implemented the suggestions */
displayValueByteSavings: 'Potential savings of {wastedBytes, number, bytes}\xa0KB',
/** Used to show how many milliseconds the user could reduce page load by if they implemented the suggestions */
/** [ICU Syntax] Used to show how many milliseconds the user could reduce page load by if they implemented the suggestions */
displayValueMsSavings: 'Potential savings of {wastedMs, number, milliseconds}\xa0ms',
/** Label for the URL column in data tables, entries will be the URL of a web resource */
columnURL: 'URL',
Expand Down
12 changes: 7 additions & 5 deletions lighthouse-core/lib/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"message": "Large network payloads cost users real money and are highly correlated with long load times. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/network-payloads)."
},
"lighthouse-core/audits/byte-efficiency/total-byte-weight.js | displayValue": {
"message": "Total size was {totalBytes, number, bytes} KB"
"message": "Total size was {totalBytes, number, bytes} KB",
"description": "[ICU Syntax] Used to summarize the total byte size of the page and all its network requests"
},
"lighthouse-core/audits/byte-efficiency/unminified-css.js | title": {
"message": "Minify CSS"
Expand Down Expand Up @@ -220,7 +221,8 @@
"message": "Time To First Byte identifies the time at which your server sends a response. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/ttfb)."
},
"lighthouse-core/audits/time-to-first-byte.js | displayValue": {
"message": "Root document took {timeInMs, number, milliseconds} ms"
"message": "Root document took {timeInMs, number, milliseconds} ms",
"description": "[ICU Syntax] Used to summarize the total Time to First Byte duration for the primary HTML response"
},
"lighthouse-core/audits/user-timings.js | title": {
"message": "User Timing marks and measures"
Expand Down Expand Up @@ -263,15 +265,15 @@
},
"lighthouse-core/lib/i18n.js | ms": {
"message": "{timeInMs, number, milliseconds} ms",
"description": "Used to show the duration in milliseconds that something lasted"
"description": "[ICU Syntax] Used to show the duration in milliseconds that something lasted"
},
"lighthouse-core/lib/i18n.js | displayValueByteSavings": {
"message": "Potential savings of {wastedBytes, number, bytes} KB",
"description": "Used to show how many bytes the user could reduce their page by if they implemented the suggestions"
"description": "[ICU Syntax] Used to show how many bytes the user could reduce their page by if they implemented the suggestions"
},
"lighthouse-core/lib/i18n.js | displayValueMsSavings": {
"message": "Potential savings of {wastedMs, number, milliseconds} ms",
"description": "Used to show how many milliseconds the user could reduce page load by if they implemented the suggestions"
"description": "[ICU Syntax] Used to show how many milliseconds the user could reduce page load by if they implemented the suggestions"
},
"lighthouse-core/lib/i18n.js | columnURL": {
"message": "URL",
Expand Down