From 92fc46b8b9f866b5e4ef0c154f17faa0f1a99703 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Sun, 2 Jun 2019 12:15:30 -0700 Subject: [PATCH 01/24] initial strings and tests --- lighthouse-core/audits/content-width.js | 48 ++-- .../audits/installable-manifest.js | 20 +- lighthouse-core/audits/is-on-https.js | 37 +-- .../audits/manual/pwa-cross-browser.js | 16 +- .../audits/manual/pwa-each-page-has-url.js | 15 +- .../audits/manual/pwa-page-transitions.js | 15 +- lighthouse-core/audits/multi-check-audit.js | 1 + lighthouse-core/audits/offline-start-url.js | 22 +- lighthouse-core/audits/redirects-http.js | 18 +- lighthouse-core/audits/service-worker.js | 38 +++- lighthouse-core/audits/splash-screen.js | 20 +- lighthouse-core/audits/themed-omnibox.js | 19 +- lighthouse-core/audits/viewport.js | 24 +- lighthouse-core/audits/without-javascript.js | 23 +- lighthouse-core/audits/works-offline.js | 28 ++- lighthouse-core/config/default-config.js | 17 +- lighthouse-core/lib/i18n/en-US.json | 212 ++++++++++++++++++ .../test/audits/is-on-https-test.js | 4 +- .../test/audits/offline-start-url-test.js | 4 +- .../test/audits/service-worker-test.js | 60 +++-- lighthouse-core/test/audits/viewport-test.js | 2 +- lighthouse-core/test/results/sample_v2.json | 104 +++++++++ 22 files changed, 607 insertions(+), 140 deletions(-) diff --git a/lighthouse-core/audits/content-width.js b/lighthouse-core/audits/content-width.js index 710a269f93e8..a6ccfef87e31 100644 --- a/lighthouse-core/audits/content-width.js +++ b/lighthouse-core/audits/content-width.js @@ -6,6 +6,18 @@ 'use strict'; const Audit = require('./audit.js'); +const i18n = require('../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Content is sized correctly for the viewport', + failureTitle: 'Content is not sized correctly for the viewport', + description: 'If the width of your app\'s content doesn\'t match the width ' + + 'of the viewport, your app might not be optimized for mobile screens. ' + + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).', + explanation: 'The viewport size is {innerWidth}px, whereas the window size is {outerWidth}px.', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); class ContentWidth extends Audit { /** @@ -14,11 +26,9 @@ class ContentWidth extends Audit { static get meta() { return { id: 'content-width', - title: 'Content is sized correctly for the viewport', - failureTitle: 'Content is not sized correctly for the viewport', - description: 'If the width of your app\'s content doesn\'t match the width ' + - 'of the viewport, your app might not be optimized for mobile screens. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['ViewportDimensions', 'TestedAsMobileDevice'], }; } @@ -33,32 +43,26 @@ class ContentWidth extends Audit { const windowWidth = artifacts.ViewportDimensions.outerWidth; const widthsMatch = viewportWidth === windowWidth; - if (IsMobile) { - return { - score: Number(widthsMatch), - explanation: this.createExplanation(widthsMatch, artifacts.ViewportDimensions), - }; - } else { + if (!IsMobile) { return { score: 1, notApplicable: true, }; } - } - /** - * @param {boolean} match - * @param {LH.Artifacts.ViewportDimensions} artifact - * @return {string} - */ - static createExplanation(match, artifact) { - if (match) { - return ''; + let explanation = ''; + if (!widthsMatch) { + explanation = str_(UIStrings.explanation, + {innerWidth: artifacts.ViewportDimensions.innerWidth, + outerWidth: artifacts.ViewportDimensions.outerWidth}); } - return 'The viewport size is ' + artifact.innerWidth + 'px, ' + - 'whereas the window size is ' + artifact.outerWidth + 'px.'; + return { + score: Number(widthsMatch), + explanation, + }; } } module.exports = ContentWidth; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/installable-manifest.js b/lighthouse-core/audits/installable-manifest.js index 280f05d24094..de96507bada5 100644 --- a/lighthouse-core/audits/installable-manifest.js +++ b/lighthouse-core/audits/installable-manifest.js @@ -7,6 +7,17 @@ const MultiCheckAudit = require('./multi-check-audit.js'); const ManifestValues = require('../computed/manifest-values.js'); +const i18n = require('../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Web app manifest meets the installability requirements', + failureTitle: 'Web app manifest does not meet the installability requirements', + description: 'Browsers can proactively prompt users to add your app to their homescreen, ' + + 'which can lead to higher engagement. ' + + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/install-prompt).', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); /** * @fileoverview @@ -29,11 +40,9 @@ class InstallableManifest extends MultiCheckAudit { static get meta() { return { id: 'installable-manifest', - title: 'Web app manifest meets the installability requirements', - failureTitle: 'Web app manifest does not meet the installability requirements', - description: 'Browsers can proactively prompt users to add your app to their homescreen, ' + - 'which can lead to higher engagement. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/install-prompt).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['URL', 'WebAppManifest'], }; } @@ -92,3 +101,4 @@ class InstallableManifest extends MultiCheckAudit { } module.exports = InstallableManifest; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/is-on-https.js b/lighthouse-core/audits/is-on-https.js index 98af7bbf5e9b..7d4cd169591f 100644 --- a/lighthouse-core/audits/is-on-https.js +++ b/lighthouse-core/audits/is-on-https.js @@ -7,9 +7,25 @@ const Audit = require('./audit.js'); const URL = require('../lib/url-shim.js'); -const Util = require('../report/html/renderer/util.js'); const NetworkRecords = require('../computed/network-records.js'); +const i18n = require('../lib/i18n/i18n.js'); +const UIStrings = { + title: 'Uses HTTPS', + failureTitle: 'Does not use HTTPS', + description: 'All sites should be protected with HTTPS, even ones that don\'t handle ' + + 'sensitive data. HTTPS prevents intruders from tampering with or passively listening ' + + 'in on the communications between your app and your users, and is a prerequisite for ' + + 'HTTP/2 and many new web platform APIs. ' + + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/https).', + displayValue: `{itemCount, plural, + =1 {1 insecure request found} + other {# insecure requests found} + }`, + columnInsecure: 'Insecure URL', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); const SECURE_SCHEMES = ['data', 'https', 'wss', 'blob', 'chrome', 'chrome-extension', 'about']; const SECURE_DOMAINS = ['localhost', '127.0.0.1']; @@ -20,13 +36,9 @@ class HTTPS extends Audit { static get meta() { return { id: 'is-on-https', - title: 'Uses HTTPS', - failureTitle: 'Does not use HTTPS', - description: 'All sites should be protected with HTTPS, even ones that don\'t handle ' + - 'sensitive data. HTTPS prevents intruders from tampering with or passively listening ' + - 'in on the communications between your app and your users, and is a prerequisite for ' + - 'HTTP/2 and many new web platform APIs. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/https).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['devtoolsLogs'], }; } @@ -54,17 +66,15 @@ class HTTPS extends Audit { .map(record => URL.elideDataURI(record.url)); let displayValue = ''; - if (insecureURLs.length > 1) { - displayValue = `${Util.formatNumber(insecureURLs.length)} insecure requests found`; - } else if (insecureURLs.length === 1) { - displayValue = `${insecureURLs.length} insecure request found`; + if (insecureURLs.length > 0) { + displayValue = str_(UIStrings.displayValue, {itemCount: insecureURLs.length}); } const items = Array.from(new Set(insecureURLs)).map(url => ({url})); /** @type {LH.Audit.Details.Table['headings']} */ const headings = [ - {key: 'url', itemType: 'url', text: 'Insecure URL'}, + {key: 'url', itemType: 'url', text: str_(UIStrings.columnInsecure)}, ]; return { @@ -80,3 +90,4 @@ class HTTPS extends Audit { } module.exports = HTTPS; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/manual/pwa-cross-browser.js b/lighthouse-core/audits/manual/pwa-cross-browser.js index b28bf97a5e1f..352c52743f28 100644 --- a/lighthouse-core/audits/manual/pwa-cross-browser.js +++ b/lighthouse-core/audits/manual/pwa-cross-browser.js @@ -7,6 +7,15 @@ 'use strict'; const ManualAudit = require('./manual-audit.js'); +const i18n = require('../../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Site works cross-browser', + description: 'To reach the most number of users, sites should work across ' + + 'every major browser. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#site-works-cross-browser).', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); /** * @fileoverview Manual PWA audit for cross browser support. @@ -19,11 +28,12 @@ class PWACrossBrowser extends ManualAudit { static get meta() { return Object.assign({ id: 'pwa-cross-browser', - description: 'To reach the most number of users, sites should work across ' + - 'every major browser. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#site-works-cross-browser).', - title: 'Site works cross-browser', + title: str_(UIStrings.title), + description: str_(UIStrings.description), }, super.partialMeta); } } module.exports = PWACrossBrowser; +module.exports.UIStrings = UIStrings; + diff --git a/lighthouse-core/audits/manual/pwa-each-page-has-url.js b/lighthouse-core/audits/manual/pwa-each-page-has-url.js index 835cd8d06f19..ab89326125fe 100644 --- a/lighthouse-core/audits/manual/pwa-each-page-has-url.js +++ b/lighthouse-core/audits/manual/pwa-each-page-has-url.js @@ -6,6 +6,15 @@ 'use strict'; const ManualAudit = require('./manual-audit.js'); +const i18n = require('../../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Each page has a URL', + description: 'Ensure individual pages are deep linkable via the URLs and that URLs are ' + + 'unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); /** * @fileoverview Manual PWA audit to ensure every page has a deep link. @@ -18,11 +27,11 @@ class PWAEachPageHasURL extends ManualAudit { static get meta() { return Object.assign({ id: 'pwa-each-page-has-url', - description: 'Ensure individual pages are deep linkable via the URLs and that URLs are ' + - 'unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).', - title: 'Each page has a URL', + title: str_(UIStrings.title), + description: str_(UIStrings.description), }, super.partialMeta); } } module.exports = PWAEachPageHasURL; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/manual/pwa-page-transitions.js b/lighthouse-core/audits/manual/pwa-page-transitions.js index 10cbe7bdb099..53a9ddc2f647 100644 --- a/lighthouse-core/audits/manual/pwa-page-transitions.js +++ b/lighthouse-core/audits/manual/pwa-page-transitions.js @@ -6,6 +6,15 @@ 'use strict'; const ManualAudit = require('./manual-audit.js'); +const i18n = require('../../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Page transitions don\'t feel like they block on the network', + description: 'Transitions should feel snappy as you tap around, even on a slow network, a ' + + 'key to perceived performance. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network).', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); /** * @fileoverview Manual PWA audit for janky-free page transitions. @@ -18,11 +27,11 @@ class PWAPageTransitions extends ManualAudit { static get meta() { return Object.assign({ id: 'pwa-page-transitions', - description: 'Transitions should feel snappy as you tap around, even on a slow network, a ' + - 'key to perceived performance. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network).', - title: 'Page transitions don\'t feel like they block on the network', + title: str_(UIStrings.title), + description: str_(UIStrings.description), }, super.partialMeta); } } module.exports = PWAPageTransitions; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/multi-check-audit.js b/lighthouse-core/audits/multi-check-audit.js index afb099ffbd7a..6361c9dd45b2 100644 --- a/lighthouse-core/audits/multi-check-audit.js +++ b/lighthouse-core/audits/multi-check-audit.js @@ -53,6 +53,7 @@ class MultiCheckAudit extends Audit { if (result.failures.length > 0) { return { score: 0, + // TODO(exterkamp): make this i18n-able. explanation: `Failures: ${result.failures.join(',\n')}.`, details, }; diff --git a/lighthouse-core/audits/offline-start-url.js b/lighthouse-core/audits/offline-start-url.js index 72d4c2282c2c..aef0880bd985 100644 --- a/lighthouse-core/audits/offline-start-url.js +++ b/lighthouse-core/audits/offline-start-url.js @@ -6,6 +6,18 @@ 'use strict'; const Audit = require('./audit.js'); +const i18n = require('../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'start_url responds with a 200 when offline', + failureTitle: 'start_url does not respond with a 200 when offline', + description: 'A service worker enables your web app to be reliable in unpredictable ' + + 'network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', + warningCantStart: 'We couldn\'t read the start_url from the manifest. As a result, the ' + + 'start_url was assumed to be the document\'s URL. Error message: \'{manifestWarning}\'.', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); class OfflineStartUrl extends Audit { /** @@ -14,9 +26,9 @@ class OfflineStartUrl extends Audit { static get meta() { return { id: 'offline-start-url', - title: 'start_url responds with a 200 when offline', - failureTitle: 'start_url does not respond with a 200 when offline', - description: 'A service worker enables your web app to be reliable in unpredictable network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['WebAppManifest', 'StartUrl'], }; } @@ -32,8 +44,7 @@ class OfflineStartUrl extends Audit { const manifest = artifacts.WebAppManifest; if (manifest && manifest.value && manifest.value.start_url.warning) { const manifestWarning = manifest.value.start_url.warning; - warnings.push('We couldn\'t read the start_url from the manifest. As a result, the ' + - `start_url was assumed to be the document's URL. Error message: '${manifestWarning}'.`); + warnings.push(str_(UIStrings.warningCantStart, {manifestWarning})); } const hasOfflineStartUrl = artifacts.StartUrl.statusCode === 200; @@ -47,3 +58,4 @@ class OfflineStartUrl extends Audit { } module.exports = OfflineStartUrl; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/redirects-http.js b/lighthouse-core/audits/redirects-http.js index 9162a18b0ce1..446d580f7a6c 100644 --- a/lighthouse-core/audits/redirects-http.js +++ b/lighthouse-core/audits/redirects-http.js @@ -6,6 +6,16 @@ 'use strict'; const Audit = require('./audit.js'); +const i18n = require('../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Redirects HTTP traffic to HTTPS', + failureTitle: 'Does not redirect HTTP traffic to HTTPS', + description: 'If you\'ve already set up HTTPS, make sure that you redirect all HTTP ' + + 'traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); class RedirectsHTTP extends Audit { /** @@ -14,10 +24,9 @@ class RedirectsHTTP extends Audit { static get meta() { return { id: 'redirects-http', - title: 'Redirects HTTP traffic to HTTPS', - failureTitle: 'Does not redirect HTTP traffic to HTTPS', - description: 'If you\'ve already set up HTTPS, make sure that you redirect all HTTP ' + - 'traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['HTTPRedirect'], }; } @@ -34,3 +43,4 @@ class RedirectsHTTP extends Audit { } module.exports = RedirectsHTTP; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/service-worker.js b/lighthouse-core/audits/service-worker.js index f5518c93740c..c3179aca0299 100644 --- a/lighthouse-core/audits/service-worker.js +++ b/lighthouse-core/audits/service-worker.js @@ -7,6 +7,25 @@ const URL = require('../lib/url-shim.js'); const Audit = require('./audit.js'); +const i18n = require('../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Registers a service worker that controls page and start_url', + failureTitle: 'Does not register a service worker that controls page and start_url', + description: 'The service worker is the technology that enables your app to use many ' + + 'Progressive Web App features, such as offline, add to homescreen, and push ' + + 'notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).', + explanationOutOfScope: 'This origin has one or more service workers, however the page ' + + '({pageUrl}) is not in scope.', + explanationNoManifest: 'This page is controlled by a service worker, however ' + + 'no start_url was found because no manifest was fetched.', + explanationBadManifest: 'This page is controlled by a service worker, however ' + + 'no start_url was found because manifest failed to parse as valid JSON', + explanationBadStartUrl: 'This page is controlled by a service worker, however ' + + 'the start_url ({startUrl}) is not in the service worker\'s scope ({scopeUrl})', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); class ServiceWorker extends Audit { /** @@ -15,11 +34,9 @@ class ServiceWorker extends Audit { static get meta() { return { id: 'service-worker', - title: 'Registers a service worker that controls page and start_url', - failureTitle: 'Does not register a service worker that controls page and start_url', - description: 'The service worker is the technology that enables your app to use many ' + - 'Progressive Web App features, such as offline, add to homescreen, and push ' + - 'notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['URL', 'ServiceWorker', 'WebAppManifest'], }; } @@ -70,15 +87,15 @@ class ServiceWorker extends Audit { */ static checkStartUrl(manifest, scopeUrl) { if (!manifest) { - return 'no start_url was found because no manifest was fetched'; + return str_(UIStrings.explanationNoManifest); } if (!manifest.value) { - return 'no start_url was found because manifest failed to parse as valid JSON'; + return str_(UIStrings.explanationBadManifest); } const startUrl = manifest.value.start_url.value; if (!startUrl.startsWith(scopeUrl)) { - return `the start_url ("${startUrl}") is not in the service worker's scope ("${scopeUrl}")`; + return str_(UIStrings.explanationBadStartUrl, {startUrl, scopeUrl}); } } @@ -103,7 +120,7 @@ class ServiceWorker extends Audit { if (!controllingScopeUrl) { return { score: 0, - explanation: `This origin has one or more service workers, however the page ("${pageUrl.href}") is not in scope.`, // eslint-disable-line max-len + explanation: str_(UIStrings.explanationOutOfScope, {pageUrl: pageUrl.href}), }; } @@ -112,7 +129,7 @@ class ServiceWorker extends Audit { if (startUrlFailure) { return { score: 0, - explanation: `This page is controlled by a service worker, however ${startUrlFailure}.`, + explanation: startUrlFailure, }; } @@ -124,3 +141,4 @@ class ServiceWorker extends Audit { } module.exports = ServiceWorker; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/splash-screen.js b/lighthouse-core/audits/splash-screen.js index 7a4cc0af5020..e6df7dacfcb7 100644 --- a/lighthouse-core/audits/splash-screen.js +++ b/lighthouse-core/audits/splash-screen.js @@ -7,6 +7,17 @@ const MultiCheckAudit = require('./multi-check-audit.js'); const ManifestValues = require('../computed/manifest-values.js'); +const i18n = require('../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Configured for a custom splash screen', + failureTitle: 'Is not configured for a custom splash screen', + description: 'A themed splash screen ensures a high-quality experience when ' + + 'users launch your app from their homescreens. [Learn ' + + 'more](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen).', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); /** * @fileoverview @@ -28,11 +39,9 @@ class SplashScreen extends MultiCheckAudit { static get meta() { return { id: 'splash-screen', - title: 'Configured for a custom splash screen', - failureTitle: 'Is not configured for a custom splash screen', - description: 'A themed splash screen ensures a high-quality experience when ' + - 'users launch your app from their homescreens. [Learn ' + - 'more](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['WebAppManifest'], }; } @@ -83,3 +92,4 @@ class SplashScreen extends MultiCheckAudit { } module.exports = SplashScreen; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/themed-omnibox.js b/lighthouse-core/audits/themed-omnibox.js index 6d2deca8f084..a17bcf9a71e2 100644 --- a/lighthouse-core/audits/themed-omnibox.js +++ b/lighthouse-core/audits/themed-omnibox.js @@ -8,6 +8,16 @@ const MultiCheckAudit = require('./multi-check-audit.js'); const ManifestValues = require('../computed/manifest-values.js'); const cssParsers = require('cssstyle/lib/parsers'); +const i18n = require('../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Sets an address-bar theme color', + failureTitle: 'Does not set an address-bar theme color', + description: 'The browser address bar can be themed to match your site. ' + + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); /** * @fileoverview @@ -26,10 +36,9 @@ class ThemedOmnibox extends MultiCheckAudit { static get meta() { return { id: 'themed-omnibox', - title: 'Sets an address-bar theme color', - failureTitle: 'Does not set an address-bar theme color', - description: 'The browser address bar can be themed to match your site. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['WebAppManifest', 'MetaElements'], }; } @@ -48,6 +57,7 @@ class ThemedOmnibox extends MultiCheckAudit { */ static assessMetaThemecolor(themeColorMeta, failures) { if (!themeColorMeta) { + // TODO(exterkamp): i18n failures.push('No `` tag found'); } else if (!ThemedOmnibox.isValidColor(themeColorMeta.content || '')) { failures.push('The theme-color meta tag did not contain a valid CSS color'); @@ -93,3 +103,4 @@ class ThemedOmnibox extends MultiCheckAudit { } module.exports = ThemedOmnibox; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/viewport.js b/lighthouse-core/audits/viewport.js index 000e53eca32c..69e4dae9dfa4 100644 --- a/lighthouse-core/audits/viewport.js +++ b/lighthouse-core/audits/viewport.js @@ -7,6 +7,18 @@ const Audit = require('./audit.js'); const ComputedViewportMeta = require('../computed/viewport-meta.js'); +const i18n = require('../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Has a `` tag with `width` or `initial-scale`', + failureTitle: 'Does not have a `` tag with `width` ' + + 'or `initial-scale`', + description: 'Add a viewport meta tag to optimize your app for mobile screens. ' + + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).', + explanationNoTag: 'No viewport meta tag found', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); class Viewport extends Audit { /** @@ -15,11 +27,9 @@ class Viewport extends Audit { static get meta() { return { id: 'viewport', - title: 'Has a `` tag with `width` or `initial-scale`', - failureTitle: 'Does not have a `` tag with `width` ' + - 'or `initial-scale`', - description: 'Add a viewport meta tag to optimize your app for mobile screens. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['MetaElements'], }; } @@ -35,7 +45,7 @@ class Viewport extends Audit { if (!viewportMeta.hasViewportTag) { return { score: 0, - explanation: 'No viewport meta tag found', + explanation: str_(UIStrings.explanationNoTag), }; } @@ -47,3 +57,5 @@ class Viewport extends Audit { } module.exports = Viewport; +module.exports.UIStrings = UIStrings; + diff --git a/lighthouse-core/audits/without-javascript.js b/lighthouse-core/audits/without-javascript.js index acbcb51699de..d2ab2887be64 100644 --- a/lighthouse-core/audits/without-javascript.js +++ b/lighthouse-core/audits/without-javascript.js @@ -6,6 +6,18 @@ 'use strict'; const Audit = require('./audit.js'); +const i18n = require('../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Contains some content when JavaScript is not available', + failureTitle: 'Does not provide fallback content when JavaScript is not available', + description: 'Your app should display some content when JavaScript is disabled, even if ' + + 'it\'s just a warning to the user that JavaScript is required to use the app. ' + + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/no-js).', + explanation: 'The page body should render some content if its scripts are not available.', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); class WithoutJavaScript extends Audit { /** @@ -14,11 +26,9 @@ class WithoutJavaScript extends Audit { static get meta() { return { id: 'without-javascript', - title: 'Contains some content when JavaScript is not available', - failureTitle: 'Does not provide fallback content when JavaScript is not available', - description: 'Your app should display some content when JavaScript is disabled, even if ' + - 'it\'s just a warning to the user that JavaScript is required to use the app. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/no-js).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['HTMLWithoutJavaScript'], }; } @@ -34,7 +44,7 @@ class WithoutJavaScript extends Audit { if (artifact.bodyText.trim() === '' && !artifact.hasNoScript) { return { score: 0, - explanation: 'The page body should render some content if its scripts are not available.', + explanation: str_(UIStrings.explanation), }; } @@ -45,3 +55,4 @@ class WithoutJavaScript extends Audit { } module.exports = WithoutJavaScript; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/audits/works-offline.js b/lighthouse-core/audits/works-offline.js index 6d0f4446cff5..ac0594155de4 100644 --- a/lighthouse-core/audits/works-offline.js +++ b/lighthouse-core/audits/works-offline.js @@ -7,6 +7,20 @@ const URL = require('../lib/url-shim.js'); const Audit = require('./audit.js'); +const i18n = require('../lib/i18n/i18n.js'); + +const UIStrings = { + title: 'Current page responds with a 200 when offline', + failureTitle: 'Current page does not respond with a 200 when offline', + description: 'If you\'re building a Progressive Web App, consider using a service worker ' + + 'so that your app can work offline. ' + + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', + warningNoLoad: 'You may be not loading offline because your test URL ' + + `({requested}) was redirected to "{final}". ` + + 'Try testing the second URL directly.', +}; + +const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); class WorksOffline extends Audit { /** @@ -15,11 +29,9 @@ class WorksOffline extends Audit { static get meta() { return { id: 'works-offline', - title: 'Current page responds with a 200 when offline', - failureTitle: 'Current page does not respond with a 200 when offline', - description: 'If you\'re building a Progressive Web App, consider using a service worker ' + - 'so that your app can work offline. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', + title: str_(UIStrings.title), + failureTitle: str_(UIStrings.failureTitle), + description: str_(UIStrings.description), requiredArtifacts: ['Offline', 'URL'], }; } @@ -33,9 +45,8 @@ class WorksOffline extends Audit { const passed = artifacts.Offline === 200; if (!passed && !URL.equalWithExcludedFragments(artifacts.URL.requestedUrl, artifacts.URL.finalUrl)) { - warnings.push('You may be not loading offline because your test URL ' + - `(${artifacts.URL.requestedUrl}) was redirected to "${artifacts.URL.finalUrl}". ` + - 'Try testing the second URL directly.'); + warnings.push(str_(UIStrings.warningNoLoad, + {requested: artifacts.URL.requestedUrl, final: artifacts.URL.finalUrl})); } return { @@ -46,3 +57,4 @@ class WorksOffline extends Audit { } module.exports = WorksOffline; +module.exports.UIStrings = UIStrings; diff --git a/lighthouse-core/config/default-config.js b/lighthouse-core/config/default-config.js index 33ac027e8e01..84f342c1b06d 100644 --- a/lighthouse-core/config/default-config.js +++ b/lighthouse-core/config/default-config.js @@ -94,6 +94,15 @@ const UIStrings = { seoCrawlingGroupTitle: 'Crawling and Indexing', /* Description of the navigation section within the Search Engine Optimization (SEO) category. Within this section are audits with descriptive titles that highlight ways to make a website accessible to search engine crawlers. */ seoCrawlingGroupDescription: 'To appear in search results, crawlers need access to your app.', + /** */ + pwaCategoryTitle: 'Progressive Web App', + /** */ + pwaCategoryDescription: 'These checks validate the aspects of a Progressive Web App. ' + + '[Learn more](https://developers.google.com/web/progressive-web-apps/checklist).', + /** */ + pwaCategoryManualDescription: 'These checks are required by the baseline ' + + '[PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are ' + + 'not automatically checked by Lighthouse. They do not affect your score but it\'s important that you verify them manually.', /** Title of the Fast and Reliable section of the web app category. Within this section are audits that check if the web site loaded quickly and can reliably load even if the internet connection is very slow or goes offline. */ pwaFastReliableGroupTitle: 'Fast and reliable', /** Title of the Installable section of the web app category. Within this section are audits that check if Chrome supports installing the web site as an app on their device. */ @@ -503,11 +512,9 @@ const defaultConfig = { ], }, 'pwa': { - title: 'Progressive Web App', - description: 'These checks validate the aspects of a Progressive Web App. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist).', - manualDescription: 'These checks are required by the baseline ' + - '[PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are ' + - 'not automatically checked by Lighthouse. They do not affect your score but it\'s important that you verify them manually.', + title: str_(UIStrings.pwaCategoryTitle), + description: str_(UIStrings.pwaCategoryDescription), + manualDescription: str_(UIStrings.pwaCategoryManualDescription), auditRefs: [ // Fast and Reliable {id: 'load-fast-enough-for-pwa', weight: 7, group: 'pwa-fast-reliable'}, diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index adfc34c8fa21..2bea3e0d52b9 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -587,6 +587,22 @@ "message": "Serve images in next-gen formats", "description": "Imperative title of a Lighthouse audit that tells the user to serve images in newer and more efficient image formats in order to enhance the performance of a page. A non-modern image format was designed 20+ years ago. This is displayed in a list of audit titles that Lighthouse generates." }, + "lighthouse-core/audits/content-width.js | description": { + "message": "If the width of your app's content doesn't match the width of the viewport, your app might not be optimized for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).", + "description": "" + }, + "lighthouse-core/audits/content-width.js | explanation": { + "message": "The viewport size is {innerWidth}px, whereas the window size is {outerWidth}px.", + "description": "" + }, + "lighthouse-core/audits/content-width.js | failureTitle": { + "message": "Content is not sized correctly for the viewport", + "description": "" + }, + "lighthouse-core/audits/content-width.js | title": { + "message": "Content is sized correctly for the viewport", + "description": "" + }, "lighthouse-core/audits/critical-request-chains.js | description": { "message": "The Critical Request Chains below show you what resources are loaded with a high priority. Consider reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/critical-request-chains).", "description": "Description of a Lighthouse audit that tells the user *why* they should reduce the depth of critical network requests to enhance initial load of a page . This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." @@ -651,6 +667,38 @@ "message": "All text remains visible during webfont loads", "description": "Title of a diagnostic audit that provides detail on if all the text on a webpage was visible while the page was loading its webfonts. This descriptive title is shown to users when the amount is acceptable and no user action is required." }, + "lighthouse-core/audits/installable-manifest.js | description": { + "message": "Browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/install-prompt).", + "description": "" + }, + "lighthouse-core/audits/installable-manifest.js | failureTitle": { + "message": "Web app manifest does not meet the installability requirements", + "description": "" + }, + "lighthouse-core/audits/installable-manifest.js | title": { + "message": "Web app manifest meets the installability requirements", + "description": "" + }, + "lighthouse-core/audits/is-on-https.js | columnInsecure": { + "message": "Insecure URL", + "description": "" + }, + "lighthouse-core/audits/is-on-https.js | description": { + "message": "All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/https).", + "description": "" + }, + "lighthouse-core/audits/is-on-https.js | displayValue": { + "message": "{itemCount, plural,\n =1 {1 insecure request found}\n other {# insecure requests found}\n }", + "description": "" + }, + "lighthouse-core/audits/is-on-https.js | failureTitle": { + "message": "Does not use HTTPS", + "description": "" + }, + "lighthouse-core/audits/is-on-https.js | title": { + "message": "Uses HTTPS", + "description": "" + }, "lighthouse-core/audits/load-fast-enough-for-pwa.js | description": { "message": "A fast page load over a cellular network ensures a good mobile user experience. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/fast-3g).", "description": "Description of a Lighthouse audit that tells the user *why* they need to load fast enough on mobile networks. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." @@ -687,6 +735,30 @@ "message": "Minimizes main-thread work", "description": "Title of a diagnostic audit that provides detail on the main thread work the browser did to load the page. This descriptive title is shown to users when the amount is acceptable and no user action is required." }, + "lighthouse-core/audits/manual/pwa-cross-browser.js | description": { + "message": "To reach the most number of users, sites should work across every major browser. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#site-works-cross-browser).", + "description": "" + }, + "lighthouse-core/audits/manual/pwa-cross-browser.js | title": { + "message": "Site works cross-browser", + "description": "" + }, + "lighthouse-core/audits/manual/pwa-each-page-has-url.js | description": { + "message": "Ensure individual pages are deep linkable via the URLs and that URLs are unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).", + "description": "" + }, + "lighthouse-core/audits/manual/pwa-each-page-has-url.js | title": { + "message": "Each page has a URL", + "description": "" + }, + "lighthouse-core/audits/manual/pwa-page-transitions.js | description": { + "message": "Transitions should feel snappy as you tap around, even on a slow network, a key to perceived performance. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network).", + "description": "" + }, + "lighthouse-core/audits/manual/pwa-page-transitions.js | title": { + "message": "Page transitions don't feel like they block on the network", + "description": "" + }, "lighthouse-core/audits/metrics/estimated-input-latency.js | description": { "message": "Estimated Input Latency is an estimate of how long your app takes to respond to user input, in milliseconds, during the busiest 5s window of page load. If your latency is higher than 50 ms, users may perceive your app as laggy. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/estimated-input-latency).", "description": "Description of the Estimated Input Latency metric that estimates the amount of time, in milliseconds, that the app takes to respond to user input. This description is displayed within a tooltip when the user hovers on the metric name to see more. No character length limits. 'Learn More' becomes link text to additional documentation." @@ -759,6 +831,22 @@ "message": "Server Backend Latencies", "description": "Descriptive title of a Lighthouse audit that tells the user the server latencies observed from each origin the page connected to. This is displayed in a list of audit titles that Lighthouse generates." }, + "lighthouse-core/audits/offline-start-url.js | description": { + "message": "A service worker enables your web app to be reliable in unpredictable network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).", + "description": "" + }, + "lighthouse-core/audits/offline-start-url.js | failureTitle": { + "message": "start_url does not respond with a 200 when offline", + "description": "" + }, + "lighthouse-core/audits/offline-start-url.js | title": { + "message": "start_url responds with a 200 when offline", + "description": "" + }, + "lighthouse-core/audits/offline-start-url.js | warningCantStart": { + "message": "We couldn't read the start_url from the manifest. As a result, the start_url was assumed to be the document's URL. Error message: '{manifestWarning}'.", + "description": "" + }, "lighthouse-core/audits/performance-budget.js | description": { "message": "Keep the quantity and size of network requests under the targets set by the provided performance budget. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/budgets).", "description": "Description of a Lighthouse audit where a user sets budgets for the quantity and size of page resources. No character length limits. 'Learn More' becomes link text to additional documentation." @@ -771,6 +859,18 @@ "message": "Performance budget", "description": "Title of a Lighthouse audit that compares the size and quantity of page resources against targets set by the user. These targets are thought of as \"performance budgets\" because these metrics impact page performance (i.e. how quickly a page loads)." }, + "lighthouse-core/audits/redirects-http.js | description": { + "message": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).", + "description": "" + }, + "lighthouse-core/audits/redirects-http.js | failureTitle": { + "message": "Does not redirect HTTP traffic to HTTPS", + "description": "" + }, + "lighthouse-core/audits/redirects-http.js | title": { + "message": "Redirects HTTP traffic to HTTPS", + "description": "" + }, "lighthouse-core/audits/redirects.js | description": { "message": "Redirects introduce additional delays before the page can be loaded. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/redirects).", "description": "Description of a Lighthouse audit that tells users why they should reduce the number of server-side redirects on their page. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." @@ -999,6 +1099,58 @@ "message": "Tap targets are sized appropriately", "description": "Title of a Lighthouse audit that provides detail on whether tap targets (like buttons and links) on a page are big enough so they can easily be tapped on a mobile device. This descriptive title is shown when tap targets are easy to tap on." }, + "lighthouse-core/audits/service-worker.js | description": { + "message": "The service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).", + "description": "" + }, + "lighthouse-core/audits/service-worker.js | explanationBadManifest": { + "message": "This page is controlled by a service worker, however no start_url was found because manifest failed to parse as valid JSON", + "description": "" + }, + "lighthouse-core/audits/service-worker.js | explanationBadStartUrl": { + "message": "This page is controlled by a service worker, however the start_url ({startUrl}) is not in the service worker's scope ({scopeUrl})", + "description": "" + }, + "lighthouse-core/audits/service-worker.js | explanationNoManifest": { + "message": "This page is controlled by a service worker, however no start_url was found because no manifest was fetched.", + "description": "" + }, + "lighthouse-core/audits/service-worker.js | explanationOutOfScope": { + "message": "This origin has one or more service workers, however the page ({pageUrl}) is not in scope.", + "description": "" + }, + "lighthouse-core/audits/service-worker.js | failureTitle": { + "message": "Does not register a service worker that controls page and start_url", + "description": "" + }, + "lighthouse-core/audits/service-worker.js | title": { + "message": "Registers a service worker that controls page and start_url", + "description": "" + }, + "lighthouse-core/audits/splash-screen.js | description": { + "message": "A themed splash screen ensures a high-quality experience when users launch your app from their homescreens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen).", + "description": "" + }, + "lighthouse-core/audits/splash-screen.js | failureTitle": { + "message": "Is not configured for a custom splash screen", + "description": "" + }, + "lighthouse-core/audits/splash-screen.js | title": { + "message": "Configured for a custom splash screen", + "description": "" + }, + "lighthouse-core/audits/themed-omnibox.js | description": { + "message": "The browser address bar can be themed to match your site. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).", + "description": "" + }, + "lighthouse-core/audits/themed-omnibox.js | failureTitle": { + "message": "Does not set an address-bar theme color", + "description": "" + }, + "lighthouse-core/audits/themed-omnibox.js | title": { + "message": "Sets an address-bar theme color", + "description": "" + }, "lighthouse-core/audits/time-to-first-byte.js | description": { "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).", "description": "Description of a Lighthouse audit that tells the user *why* they should reduce the amount of time it takes their server to start responding to requests. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." @@ -1067,6 +1219,54 @@ "message": "Preload key requests", "description": "Imperative title of a Lighthouse audit that tells the user to use to initiate important network requests earlier during page load. This is displayed in a list of audit titles that Lighthouse generates." }, + "lighthouse-core/audits/viewport.js | description": { + "message": "Add a viewport meta tag to optimize your app for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).", + "description": "" + }, + "lighthouse-core/audits/viewport.js | explanationNoTag": { + "message": "No viewport meta tag found", + "description": "" + }, + "lighthouse-core/audits/viewport.js | failureTitle": { + "message": "Does not have a `` tag with `width` or `initial-scale`", + "description": "" + }, + "lighthouse-core/audits/viewport.js | title": { + "message": "Has a `` tag with `width` or `initial-scale`", + "description": "" + }, + "lighthouse-core/audits/without-javascript.js | description": { + "message": "Your app should display some content when JavaScript is disabled, even if it's just a warning to the user that JavaScript is required to use the app. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/no-js).", + "description": "" + }, + "lighthouse-core/audits/without-javascript.js | explanation": { + "message": "The page body should render some content if its scripts are not available.", + "description": "" + }, + "lighthouse-core/audits/without-javascript.js | failureTitle": { + "message": "Does not provide fallback content when JavaScript is not available", + "description": "" + }, + "lighthouse-core/audits/without-javascript.js | title": { + "message": "Contains some content when JavaScript is not available", + "description": "" + }, + "lighthouse-core/audits/works-offline.js | description": { + "message": "If you're building a Progressive Web App, consider using a service worker so that your app can work offline. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).", + "description": "" + }, + "lighthouse-core/audits/works-offline.js | failureTitle": { + "message": "Current page does not respond with a 200 when offline", + "description": "" + }, + "lighthouse-core/audits/works-offline.js | title": { + "message": "Current page responds with a 200 when offline", + "description": "" + }, + "lighthouse-core/audits/works-offline.js | warningNoLoad": { + "message": "You may be not loading offline because your test URL ({requested}) was redirected to \"{final}\". Try testing the second URL directly.", + "description": "" + }, "lighthouse-core/config/default-config.js | a11yAriaGroupDescription": { "message": "These are opportunities to improve the usage of ARIA in your application which may enhance the experience for users of assistive technology, like a screen reader.", "description": "Description of the ARIA validity section within the Accessibility category. Within this section are audits with descriptive titles that highlight if whether all the aria- HTML attributes have been used properly." @@ -1191,6 +1391,18 @@ "message": "Performance", "description": "Title of the Performance category of audits. Equivalent to 'Web performance', this term is inclusive of all web page speed and loading optimization topics. Also used as a label of a score gauge; try to limit to 20 characters." }, + "lighthouse-core/config/default-config.js | pwaCategoryDescription": { + "message": "These checks validate the aspects of a Progressive Web App. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist).", + "description": "" + }, + "lighthouse-core/config/default-config.js | pwaCategoryManualDescription": { + "message": "These checks are required by the baseline [PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are not automatically checked by Lighthouse. They do not affect your score but it's important that you verify them manually.", + "description": "" + }, + "lighthouse-core/config/default-config.js | pwaCategoryTitle": { + "message": "Progressive Web App", + "description": "" + }, "lighthouse-core/config/default-config.js | pwaFastReliableGroupTitle": { "message": "Fast and reliable", "description": "Title of the Fast and Reliable section of the web app category. Within this section are audits that check if the web site loaded quickly and can reliably load even if the internet connection is very slow or goes offline." diff --git a/lighthouse-core/test/audits/is-on-https-test.js b/lighthouse-core/test/audits/is-on-https-test.js index d53717d89749..ec5a65cb8827 100644 --- a/lighthouse-core/test/audits/is-on-https-test.js +++ b/lighthouse-core/test/audits/is-on-https-test.js @@ -28,7 +28,7 @@ describe('Security: HTTPS audit', () => { {url: 'https://google.com/', parsedURL: {scheme: 'https', host: 'google.com'}}, ]), {computedCache: new Map()}).then(result => { assert.strictEqual(result.score, 0); - assert.ok(result.displayValue.includes('requests found')); + expect(result.displayValue).toBeDisplayString('2 requests found'); assert.strictEqual(result.extendedInfo.value.length, 2); }); }); @@ -40,7 +40,7 @@ describe('Security: HTTPS audit', () => { {url: 'https://google.com/', parsedURL: {scheme: 'https', host: 'google.com'}}, ]), {computedCache: new Map()}).then(result => { assert.strictEqual(result.score, 0); - assert.ok(result.displayValue.includes('request found')); + expect(result.displayValue).toBeDisplayString('1 request found'); assert.deepEqual(result.extendedInfo.value[0], {url: 'http://insecure.com/image.jpeg'}); }); }); diff --git a/lighthouse-core/test/audits/offline-start-url-test.js b/lighthouse-core/test/audits/offline-start-url-test.js index 835f78193a65..377730a22632 100644 --- a/lighthouse-core/test/audits/offline-start-url-test.js +++ b/lighthouse-core/test/audits/offline-start-url-test.js @@ -68,6 +68,8 @@ describe('Offline start_url audit', () => { assert.strictEqual(result.score, 1); assert.strictEqual(result.explanation, undefined); assert.strictEqual(result.warnings.length, 1); - assert.ok(result.warnings[0].includes('start_url must be same-origin as document')); + expect(result.warnings[0]).toBeDisplayString('We couldn\'t read the start_url ' + + 'from the manifest. As a result, the start_url was assumed to be the document\'s URL. ' + + 'Error message: \'ERROR: start_url must be same-origin as document\'.'); }); }); diff --git a/lighthouse-core/test/audits/service-worker-test.js b/lighthouse-core/test/audits/service-worker-test.js index d19ddee1f3e6..cc0319ea9bfd 100644 --- a/lighthouse-core/test/audits/service-worker-test.js +++ b/lighthouse-core/test/audits/service-worker-test.js @@ -113,10 +113,9 @@ describe('Offline: service worker audit', () => { const manifest = {start_url: finalUrl}; const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); - expect(output).toMatchObject({ - score: 0, - explanation: expect.stringMatching(new RegExp(`${finalUrl}.*not in scope`)), - }); + assert.strictEqual(output.score, 0); + expect(output.explanation).toBeDisplayString('This origin has one or more service workers, ' + + 'however the page (https://example.com/index.html) is not in scope.'); }); it('fails when start_url is out of scope', () => { @@ -128,13 +127,12 @@ describe('Offline: service worker audit', () => { const startUrl = 'https://example.com/'; const manifest = {start_url: startUrl}; - const scopeURL = 'https://example.com/serviceworker'; + const scopeURL = 'https://example.com/serviceworker/'; const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); - expect(output).toMatchObject({ - score: 0, - explanation: expect.stringMatching(new RegExp(`start_url.*${startUrl}.*${scopeURL}`)), - }); + assert.strictEqual(output.score, 0); + expect(output.explanation).toBeDisplayString('This page is controlled by a service worker, ' + + `however the start_url (${startUrl}) is not in the service worker's scope (${scopeURL})`); }); it('fails when explicit scopeURL puts the page URL out of scope', () => { @@ -147,10 +145,9 @@ describe('Offline: service worker audit', () => { const manifest = {start_url: finalUrl}; const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); - expect(output).toMatchObject({ - score: 0, - explanation: expect.stringMatching(new RegExp(`${finalUrl}.*not in scope`)), - }); + assert.strictEqual(output.score, 0); + expect(output.explanation).toBeDisplayString('This origin has one or more service workers, ' + + `however the page (${finalUrl}) is not in scope.`); }); it('fails when explicit scopeURL puts the start_url out of scope', () => { @@ -165,10 +162,9 @@ describe('Offline: service worker audit', () => { const manifest = {start_url: startUrl}; const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); - expect(output).toMatchObject({ - score: 0, - explanation: expect.stringMatching(new RegExp(`start_url.*${startUrl}.*${scopeURL}`)), - }); + assert.strictEqual(output.score, 0); + expect(output.explanation).toBeDisplayString('This page is controlled by a service worker, ' + + `however the start_url (${startUrl}) is not in the service worker's scope (${scopeURL})`); }); it('passes when both outside default scope but explicit scopeURL puts it back in', () => { @@ -239,10 +235,9 @@ describe('Offline: service worker audit', () => { const manifest = {start_url: finalUrl}; const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); - expect(output).toMatchObject({ - score: 0, - explanation: expect.stringMatching(new RegExp(`${finalUrl}.*not in scope`)), - }); + assert.strictEqual(output.score, 0); + expect(output.explanation).toBeDisplayString('This origin has one or more service workers, ' + + `however the page (${finalUrl}) is not in scope.`); }); it('fails when SW that controls start_url is different than SW that controls page', () => { @@ -258,13 +253,12 @@ describe('Offline: service worker audit', () => { const startUrl = 'https://example.com/index.html'; const manifest = {start_url: startUrl}; - const scopeURL = 'https://example.com/project'; + const scopeURL = 'https://example.com/project/'; const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); - expect(output).toMatchObject({ - score: 0, - explanation: expect.stringMatching(new RegExp(`start_url.*${startUrl}.*${scopeURL}`)), - }); + assert.strictEqual(output.score, 0); + expect(output.explanation).toBeDisplayString('This page is controlled by a service worker, ' + + `however the start_url (${startUrl}) is not in the service worker's scope (${scopeURL})`); }); it('fails when a manifest was not found', () => { @@ -276,10 +270,9 @@ describe('Offline: service worker audit', () => { const manifest = null; const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); - expect(output).toMatchObject({ - score: 0, - explanation: expect.stringMatching(/start_url.*no manifest was fetched/), - }); + assert.strictEqual(output.score, 0); + expect(output.explanation).toBeDisplayString('This page is controlled by a service worker, ' + + 'however no start_url was found because no manifest was fetched.'); }); it('fails when a manifest is invalid', () => { @@ -293,9 +286,8 @@ describe('Offline: service worker audit', () => { artifacts.WebAppManifest = manifestParser('{,;}', finalUrl, finalUrl); const output = ServiceWorker.audit(artifacts); - expect(output).toMatchObject({ - score: 0, - explanation: expect.stringMatching(/start_url.*manifest failed to parse as valid JSON/), - }); + assert.strictEqual(output.score, 0); + expect(output.explanation).toBeDisplayString('This page is controlled by a service worker, ' + + 'however no start_url was found because manifest failed to parse as valid JSON'); }); }); diff --git a/lighthouse-core/test/audits/viewport-test.js b/lighthouse-core/test/audits/viewport-test.js index a0b63baa4711..cf82395c15c1 100644 --- a/lighthouse-core/test/audits/viewport-test.js +++ b/lighthouse-core/test/audits/viewport-test.js @@ -19,7 +19,7 @@ describe('Mobile-friendly: viewport audit', () => { MetaElements: [], }, fakeContext); assert.equal(auditResult.score, 0); - assert.equal(auditResult.explanation, 'No viewport meta tag found'); + expect(auditResult.explanation).toBeDisplayString('No viewport meta tag found'); }); it('fails when HTML contains a non-mobile friendly viewport meta tag', async () => { diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index 76532a9e9b2a..014e8ed35ee8 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -5028,6 +5028,53 @@ "warningHeader": "Warnings: " }, "icuMessagePaths": { + "lighthouse-core/audits/is-on-https.js | failureTitle": [ + "audits[is-on-https].title" + ], + "lighthouse-core/audits/is-on-https.js | description": [ + "audits[is-on-https].description" + ], + "lighthouse-core/audits/is-on-https.js | displayValue": [ + { + "values": { + "itemCount": 1 + }, + "path": "audits[is-on-https].displayValue" + } + ], + "lighthouse-core/audits/is-on-https.js | columnInsecure": [ + "audits[is-on-https].details.headings[0].text" + ], + "lighthouse-core/audits/redirects-http.js | failureTitle": [ + "audits[redirects-http].title" + ], + "lighthouse-core/audits/redirects-http.js | description": [ + "audits[redirects-http].description" + ], + "lighthouse-core/audits/service-worker.js | failureTitle": [ + "audits[service-worker].title" + ], + "lighthouse-core/audits/service-worker.js | description": [ + "audits[service-worker].description" + ], + "lighthouse-core/audits/works-offline.js | failureTitle": [ + "audits[works-offline].title" + ], + "lighthouse-core/audits/works-offline.js | description": [ + "audits[works-offline].description" + ], + "lighthouse-core/audits/viewport.js | title": [ + "audits.viewport.title" + ], + "lighthouse-core/audits/viewport.js | description": [ + "audits.viewport.description" + ], + "lighthouse-core/audits/without-javascript.js | title": [ + "audits[without-javascript].title" + ], + "lighthouse-core/audits/without-javascript.js | description": [ + "audits[without-javascript].description" + ], "lighthouse-core/audits/metrics/first-contentful-paint.js | title": [ "audits[first-contentful-paint].title" ], @@ -5186,12 +5233,36 @@ "lighthouse-core/audits/redirects.js | description": [ "audits.redirects.description" ], + "lighthouse-core/audits/installable-manifest.js | failureTitle": [ + "audits[installable-manifest].title" + ], + "lighthouse-core/audits/installable-manifest.js | description": [ + "audits[installable-manifest].description" + ], "lighthouse-core/audits/apple-touch-icon.js | failureTitle": [ "audits[apple-touch-icon].title" ], "lighthouse-core/audits/apple-touch-icon.js | description": [ "audits[apple-touch-icon].description" ], + "lighthouse-core/audits/splash-screen.js | failureTitle": [ + "audits[splash-screen].title" + ], + "lighthouse-core/audits/splash-screen.js | description": [ + "audits[splash-screen].description" + ], + "lighthouse-core/audits/themed-omnibox.js | failureTitle": [ + "audits[themed-omnibox].title" + ], + "lighthouse-core/audits/themed-omnibox.js | description": [ + "audits[themed-omnibox].description" + ], + "lighthouse-core/audits/content-width.js | title": [ + "audits[content-width].title" + ], + "lighthouse-core/audits/content-width.js | description": [ + "audits[content-width].description" + ], "lighthouse-core/audits/mainthread-work-breakdown.js | title": [ "audits[mainthread-work-breakdown].title" ], @@ -5262,6 +5333,12 @@ "lighthouse-core/audits/network-server-latency.js | description": [ "audits[network-server-latency].description" ], + "lighthouse-core/audits/offline-start-url.js | failureTitle": [ + "audits[offline-start-url].title" + ], + "lighthouse-core/audits/offline-start-url.js | description": [ + "audits[offline-start-url].description" + ], "lighthouse-core/audits/performance-budget.js | title": [ "audits[performance-budget].title" ], @@ -5351,6 +5428,24 @@ "path": "audits[resource-summary].displayValue" } ], + "lighthouse-core/audits/manual/pwa-cross-browser.js | title": [ + "audits[pwa-cross-browser].title" + ], + "lighthouse-core/audits/manual/pwa-cross-browser.js | description": [ + "audits[pwa-cross-browser].description" + ], + "lighthouse-core/audits/manual/pwa-page-transitions.js | title": [ + "audits[pwa-page-transitions].title" + ], + "lighthouse-core/audits/manual/pwa-page-transitions.js | description": [ + "audits[pwa-page-transitions].description" + ], + "lighthouse-core/audits/manual/pwa-each-page-has-url.js | title": [ + "audits[pwa-each-page-has-url].title" + ], + "lighthouse-core/audits/manual/pwa-each-page-has-url.js | description": [ + "audits[pwa-each-page-has-url].description" + ], "lighthouse-core/audits/accessibility/accesskeys.js | title": [ "audits.accesskeys.title" ], @@ -5844,6 +5939,15 @@ "lighthouse-core/config/default-config.js | seoCategoryManualDescription": [ "categories.seo.manualDescription" ], + "lighthouse-core/config/default-config.js | pwaCategoryTitle": [ + "categories.pwa.title" + ], + "lighthouse-core/config/default-config.js | pwaCategoryDescription": [ + "categories.pwa.description" + ], + "lighthouse-core/config/default-config.js | pwaCategoryManualDescription": [ + "categories.pwa.manualDescription" + ], "lighthouse-core/config/default-config.js | metricGroupTitle": [ "categoryGroups.metrics.title" ], From 91d442dd25913f4eaa1a06558755b28c5aedc0f8 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Mon, 3 Jun 2019 13:18:30 -0700 Subject: [PATCH 02/24] String feedback --- lighthouse-core/audits/content-width.js | 2 +- lighthouse-core/audits/works-offline.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lighthouse-core/audits/content-width.js b/lighthouse-core/audits/content-width.js index a6ccfef87e31..08181508ce5f 100644 --- a/lighthouse-core/audits/content-width.js +++ b/lighthouse-core/audits/content-width.js @@ -14,7 +14,7 @@ const UIStrings = { description: 'If the width of your app\'s content doesn\'t match the width ' + 'of the viewport, your app might not be optimized for mobile screens. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).', - explanation: 'The viewport size is {innerWidth}px, whereas the window size is {outerWidth}px.', + explanation: 'The viewport size of {innerWidth}px, does not match the window size of {outerWidth}px.', }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); diff --git a/lighthouse-core/audits/works-offline.js b/lighthouse-core/audits/works-offline.js index ac0594155de4..2b03d9bbc395 100644 --- a/lighthouse-core/audits/works-offline.js +++ b/lighthouse-core/audits/works-offline.js @@ -15,7 +15,7 @@ const UIStrings = { description: 'If you\'re building a Progressive Web App, consider using a service worker ' + 'so that your app can work offline. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', - warningNoLoad: 'You may be not loading offline because your test URL ' + + warningNoLoad: 'The page may be not loading offline because your test URL ' + `({requested}) was redirected to "{final}". ` + 'Try testing the second URL directly.', }; From 56d0ca3f556d8717aaaabb305aa7304e3285d5f5 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Mon, 3 Jun 2019 13:29:40 -0700 Subject: [PATCH 03/24] Changed wording and updated tests. Is-on-https use items.length instead of non-pruned list. --- lighthouse-core/audits/is-on-https.js | 11 ++++---- lighthouse-core/lib/i18n/en-US.json | 8 ++---- .../test/audits/is-on-https-test.js | 4 +-- lighthouse-core/test/results/sample_v2.json | 26 +++++++++---------- proto/sample_v2_round_trip.json | 2 +- 5 files changed, 22 insertions(+), 29 deletions(-) diff --git a/lighthouse-core/audits/is-on-https.js b/lighthouse-core/audits/is-on-https.js index 7d4cd169591f..609d565512ea 100644 --- a/lighthouse-core/audits/is-on-https.js +++ b/lighthouse-core/audits/is-on-https.js @@ -22,7 +22,6 @@ const UIStrings = { =1 {1 insecure request found} other {# insecure requests found} }`, - columnInsecure: 'Insecure URL', }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); @@ -65,16 +64,16 @@ class HTTPS extends Audit { .filter(record => !HTTPS.isSecureRecord(record)) .map(record => URL.elideDataURI(record.url)); + const items = Array.from(new Set(insecureURLs)).map(url => ({url})); + let displayValue = ''; - if (insecureURLs.length > 0) { - displayValue = str_(UIStrings.displayValue, {itemCount: insecureURLs.length}); + if (items.length > 0) { + displayValue = str_(UIStrings.displayValue, {itemCount: items.length}); } - const items = Array.from(new Set(insecureURLs)).map(url => ({url})); - /** @type {LH.Audit.Details.Table['headings']} */ const headings = [ - {key: 'url', itemType: 'url', text: str_(UIStrings.columnInsecure)}, + {key: 'url', itemType: 'url', text: str_(i18n.UIStrings.columnURL)}, ]; return { diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index 2bea3e0d52b9..4b91165ceccf 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -592,7 +592,7 @@ "description": "" }, "lighthouse-core/audits/content-width.js | explanation": { - "message": "The viewport size is {innerWidth}px, whereas the window size is {outerWidth}px.", + "message": "The viewport size of {innerWidth}px, does not match the window size of {outerWidth}px.", "description": "" }, "lighthouse-core/audits/content-width.js | failureTitle": { @@ -679,10 +679,6 @@ "message": "Web app manifest meets the installability requirements", "description": "" }, - "lighthouse-core/audits/is-on-https.js | columnInsecure": { - "message": "Insecure URL", - "description": "" - }, "lighthouse-core/audits/is-on-https.js | description": { "message": "All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/https).", "description": "" @@ -1264,7 +1260,7 @@ "description": "" }, "lighthouse-core/audits/works-offline.js | warningNoLoad": { - "message": "You may be not loading offline because your test URL ({requested}) was redirected to \"{final}\". Try testing the second URL directly.", + "message": "The page may be not loading offline because your test URL ({requested}) was redirected to \"{final}\". Try testing the second URL directly.", "description": "" }, "lighthouse-core/config/default-config.js | a11yAriaGroupDescription": { diff --git a/lighthouse-core/test/audits/is-on-https-test.js b/lighthouse-core/test/audits/is-on-https-test.js index ec5a65cb8827..7bdc837eb9ea 100644 --- a/lighthouse-core/test/audits/is-on-https-test.js +++ b/lighthouse-core/test/audits/is-on-https-test.js @@ -28,7 +28,7 @@ describe('Security: HTTPS audit', () => { {url: 'https://google.com/', parsedURL: {scheme: 'https', host: 'google.com'}}, ]), {computedCache: new Map()}).then(result => { assert.strictEqual(result.score, 0); - expect(result.displayValue).toBeDisplayString('2 requests found'); + expect(result.displayValue).toBeDisplayString('2 insecure requests found'); assert.strictEqual(result.extendedInfo.value.length, 2); }); }); @@ -40,7 +40,7 @@ describe('Security: HTTPS audit', () => { {url: 'https://google.com/', parsedURL: {scheme: 'https', host: 'google.com'}}, ]), {computedCache: new Map()}).then(result => { assert.strictEqual(result.score, 0); - expect(result.displayValue).toBeDisplayString('1 request found'); + expect(result.displayValue).toBeDisplayString('1 insecure request found'); assert.deepEqual(result.extendedInfo.value[0], {url: 'http://insecure.com/image.jpeg'}); }); }); diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index 014e8ed35ee8..45c98fcb69c3 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -24,7 +24,7 @@ { "key": "url", "itemType": "url", - "text": "Insecure URL" + "text": "URL" } ], "items": [ @@ -5042,8 +5042,17 @@ "path": "audits[is-on-https].displayValue" } ], - "lighthouse-core/audits/is-on-https.js | columnInsecure": [ - "audits[is-on-https].details.headings[0].text" + "lighthouse-core/lib/i18n/i18n.js | columnURL": [ + "audits[is-on-https].details.headings[0].text", + "audits[bootup-time].details.headings[0].text", + "audits[network-rtt].details.headings[0].text", + "audits[network-server-latency].details.headings[0].text", + "audits[uses-long-cache-ttl].details.headings[0].text", + "audits[total-byte-weight].details.headings[0].text", + "audits[render-blocking-resources].details.headings[0].label", + "audits[unminified-javascript].details.headings[0].label", + "audits[uses-webp-images].details.headings[1].label", + "audits[uses-text-compression].details.headings[0].label" ], "lighthouse-core/audits/redirects-http.js | failureTitle": [ "audits[redirects-http].title" @@ -5283,17 +5292,6 @@ "lighthouse-core/audits/bootup-time.js | description": [ "audits[bootup-time].description" ], - "lighthouse-core/lib/i18n/i18n.js | columnURL": [ - "audits[bootup-time].details.headings[0].text", - "audits[network-rtt].details.headings[0].text", - "audits[network-server-latency].details.headings[0].text", - "audits[uses-long-cache-ttl].details.headings[0].text", - "audits[total-byte-weight].details.headings[0].text", - "audits[render-blocking-resources].details.headings[0].label", - "audits[unminified-javascript].details.headings[0].label", - "audits[uses-webp-images].details.headings[1].label", - "audits[uses-text-compression].details.headings[0].label" - ], "lighthouse-core/audits/bootup-time.js | columnTotal": [ "audits[bootup-time].details.headings[1].text" ], diff --git a/proto/sample_v2_round_trip.json b/proto/sample_v2_round_trip.json index f0f16a4de298..7bf12819c57e 100644 --- a/proto/sample_v2_round_trip.json +++ b/proto/sample_v2_round_trip.json @@ -1074,7 +1074,7 @@ { "itemType": "url", "key": "url", - "text": "Insecure URL" + "text": "URL" } ], "items": [ From c9fb5d147d7af6b230c86ce5d60220ff985014d0 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Mon, 3 Jun 2019 14:15:41 -0700 Subject: [PATCH 04/24] Added descriptions --- lighthouse-core/audits/content-width.js | 11 ++- .../audits/installable-manifest.js | 3 + lighthouse-core/audits/is-on-https.js | 4 + .../audits/manual/pwa-cross-browser.js | 2 + .../audits/manual/pwa-each-page-has-url.js | 2 + .../audits/manual/pwa-page-transitions.js | 2 + lighthouse-core/audits/redirects-http.js | 3 + lighthouse-core/audits/service-worker.js | 7 ++ lighthouse-core/audits/splash-screen.js | 3 + lighthouse-core/audits/themed-omnibox.js | 3 + lighthouse-core/audits/viewport.js | 4 + lighthouse-core/audits/without-javascript.js | 4 + lighthouse-core/audits/works-offline.js | 4 + lighthouse-core/config/default-config.js | 6 +- lighthouse-core/lib/i18n/en-US.json | 96 +++++++++---------- 15 files changed, 100 insertions(+), 54 deletions(-) diff --git a/lighthouse-core/audits/content-width.js b/lighthouse-core/audits/content-width.js index 08181508ce5f..bd6994836c7e 100644 --- a/lighthouse-core/audits/content-width.js +++ b/lighthouse-core/audits/content-width.js @@ -9,12 +9,17 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on the content size of a site compared to its viewport. This descriptive title is shown to users when the site's content is sized appropriately. */ title: 'Content is sized correctly for the viewport', + /** Title of a Lighthouse audit that provides detail on the content size of a site compared to its viewport. This descriptive title is shown to users when the site's content is not sized appropriately. */ failureTitle: 'Content is not sized correctly for the viewport', + /** Description of a Lighthouse audit that tells the user why they should care that a site's content size should match its viewport size. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'If the width of your app\'s content doesn\'t match the width ' + - 'of the viewport, your app might not be optimized for mobile screens. ' + - '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).', - explanation: 'The viewport size of {innerWidth}px, does not match the window size of {outerWidth}px.', + 'of the viewport, your app might not be optimized for mobile screens. ' + + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).', + /** Explanatory message stating that the viewport size and window size differ. */ + explanation: 'The viewport size of {innerWidth}px, does not match the window ' + + 'size of {outerWidth}px.', }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); diff --git a/lighthouse-core/audits/installable-manifest.js b/lighthouse-core/audits/installable-manifest.js index de96507bada5..153a2f876dc0 100644 --- a/lighthouse-core/audits/installable-manifest.js +++ b/lighthouse-core/audits/installable-manifest.js @@ -10,8 +10,11 @@ const ManifestValues = require('../computed/manifest-values.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on the installability of a website. This descriptive title is shown to users when a webapp is installable. */ title: 'Web app manifest meets the installability requirements', + /** Title of a Lighthouse audit that provides detail on the installability of a website. This descriptive title is shown to users when a webapp is not installable. */ failureTitle: 'Web app manifest does not meet the installability requirements', + /** Description of a Lighthouse audit that tells the user why installability is important for webapps. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Browsers can proactively prompt users to add your app to their homescreen, ' + 'which can lead to higher engagement. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/install-prompt).', diff --git a/lighthouse-core/audits/is-on-https.js b/lighthouse-core/audits/is-on-https.js index 609d565512ea..eca873738b8d 100644 --- a/lighthouse-core/audits/is-on-https.js +++ b/lighthouse-core/audits/is-on-https.js @@ -11,13 +11,17 @@ const NetworkRecords = require('../computed/network-records.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on the use of HTTPS on a website. This descriptive title is shown to users when all network activity uses HTTPS. */ title: 'Uses HTTPS', + /** Title of a Lighthouse audit that provides detail on the use of HTTPS on a website. This descriptive title is shown to users when some network activity does not use HTTPS. */ failureTitle: 'Does not use HTTPS', + /** Description of a Lighthouse audit that tells the user why they should use HTTPS on all requests. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'All sites should be protected with HTTPS, even ones that don\'t handle ' + 'sensitive data. HTTPS prevents intruders from tampering with or passively listening ' + 'in on the communications between your app and your users, and is a prerequisite for ' + 'HTTP/2 and many new web platform APIs. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/https).', + /** [ICU Syntax] Label for the audit identifying the number of insecure requests on the site. */ displayValue: `{itemCount, plural, =1 {1 insecure request found} other {# insecure requests found} diff --git a/lighthouse-core/audits/manual/pwa-cross-browser.js b/lighthouse-core/audits/manual/pwa-cross-browser.js index 352c52743f28..c88286ba0b7c 100644 --- a/lighthouse-core/audits/manual/pwa-cross-browser.js +++ b/lighthouse-core/audits/manual/pwa-cross-browser.js @@ -10,7 +10,9 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on whether or not a site works across different browsers. */ title: 'Site works cross-browser', + /** Description of a Lighthouse audit that tells the user why they should make sites work across different browsers. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'To reach the most number of users, sites should work across ' + 'every major browser. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#site-works-cross-browser).', }; diff --git a/lighthouse-core/audits/manual/pwa-each-page-has-url.js b/lighthouse-core/audits/manual/pwa-each-page-has-url.js index ab89326125fe..29b254e6e8c4 100644 --- a/lighthouse-core/audits/manual/pwa-each-page-has-url.js +++ b/lighthouse-core/audits/manual/pwa-each-page-has-url.js @@ -9,7 +9,9 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on a site's pages all having distinct URLs. */ title: 'Each page has a URL', + /** Description of a Lighthouse audit that tells the user why they should use distinct URLs for each page. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Ensure individual pages are deep linkable via the URLs and that URLs are ' + 'unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).', }; diff --git a/lighthouse-core/audits/manual/pwa-page-transitions.js b/lighthouse-core/audits/manual/pwa-page-transitions.js index 53a9ddc2f647..627cedcda6e5 100644 --- a/lighthouse-core/audits/manual/pwa-page-transitions.js +++ b/lighthouse-core/audits/manual/pwa-page-transitions.js @@ -9,7 +9,9 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on page transitions blocking network requests. */ title: 'Page transitions don\'t feel like they block on the network', + /** Description of a Lighthouse audit that tells the user why they should make the transitions smooth. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Transitions should feel snappy as you tap around, even on a slow network, a ' + 'key to perceived performance. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network).', }; diff --git a/lighthouse-core/audits/redirects-http.js b/lighthouse-core/audits/redirects-http.js index 446d580f7a6c..5b3a505e6eb6 100644 --- a/lighthouse-core/audits/redirects-http.js +++ b/lighthouse-core/audits/redirects-http.js @@ -9,8 +9,11 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on HTTP to HTTPS redirects. This descriptive title is shown to users when HTTP traffic is redirected to HTTPS. */ title: 'Redirects HTTP traffic to HTTPS', + /** Title of a Lighthouse audit that provides detail on HTTP to HTTPS redirects. This descriptive title is shown to users when HTTP traffic is not redirected to HTTPS. */ failureTitle: 'Does not redirect HTTP traffic to HTTPS', + /** Description of a Lighthouse audit that tells the user why they should direct HTTP traffic to HTTPS. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'If you\'ve already set up HTTPS, make sure that you redirect all HTTP ' + 'traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).', }; diff --git a/lighthouse-core/audits/service-worker.js b/lighthouse-core/audits/service-worker.js index c3179aca0299..b69045f8a11f 100644 --- a/lighthouse-core/audits/service-worker.js +++ b/lighthouse-core/audits/service-worker.js @@ -10,17 +10,24 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on a page's service worker. This descriptive title is shown to users when a service worker is registered and valid. */ title: 'Registers a service worker that controls page and start_url', + /** Title of a Lighthouse audit that provides detail on a page's service worker. This descriptive title is shown to users when a service worker is invalid. */ failureTitle: 'Does not register a service worker that controls page and start_url', + /** Description of a Lighthouse audit that tells the user why they should use a service worker. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'The service worker is the technology that enables your app to use many ' + 'Progressive Web App features, such as offline, add to homescreen, and push ' + 'notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).', + /** Explanatory message stating that the page has multiple, or out of scope service workers. */ explanationOutOfScope: 'This origin has one or more service workers, however the page ' + '({pageUrl}) is not in scope.', + /** Explanatory message stating that the page has no manifest. */ explanationNoManifest: 'This page is controlled by a service worker, however ' + 'no start_url was found because no manifest was fetched.', + /** Explanatory message stating that the page's manifest is invalid. */ explanationBadManifest: 'This page is controlled by a service worker, however ' + 'no start_url was found because manifest failed to parse as valid JSON', + /** Explanatory message stating that the manifest's start_url is not in scope, and therefor invalid. */ explanationBadStartUrl: 'This page is controlled by a service worker, however ' + 'the start_url ({startUrl}) is not in the service worker\'s scope ({scopeUrl})', }; diff --git a/lighthouse-core/audits/splash-screen.js b/lighthouse-core/audits/splash-screen.js index e6df7dacfcb7..69f83a3eaa64 100644 --- a/lighthouse-core/audits/splash-screen.js +++ b/lighthouse-core/audits/splash-screen.js @@ -10,8 +10,11 @@ const ManifestValues = require('../computed/manifest-values.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on splash screens. This descriptive title is shown to users when the site has a custom splash screen. */ title: 'Configured for a custom splash screen', + /** Title of a Lighthouse audit that provides detail on splash screens. This descriptive title is shown to users when the site does not have a custom splash screen. */ failureTitle: 'Is not configured for a custom splash screen', + /** Description of a Lighthouse audit that tells the user why they should configure a custom splash screen. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'A themed splash screen ensures a high-quality experience when ' + 'users launch your app from their homescreens. [Learn ' + 'more](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen).', diff --git a/lighthouse-core/audits/themed-omnibox.js b/lighthouse-core/audits/themed-omnibox.js index a17bcf9a71e2..53a9d2283adf 100644 --- a/lighthouse-core/audits/themed-omnibox.js +++ b/lighthouse-core/audits/themed-omnibox.js @@ -11,8 +11,11 @@ const cssParsers = require('cssstyle/lib/parsers'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on address-bar theme colors. This descriptive title is shown to users when an address-bar theme color has been set. */ title: 'Sets an address-bar theme color', + /** Title of a Lighthouse audit that provides detail on address-bar theme colors. This descriptive title is shown to users when an address-bar theme color has not been set. */ failureTitle: 'Does not set an address-bar theme color', + /** Description of a Lighthouse audit that tells the user why they should set a theme color for the address bar. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'The browser address bar can be themed to match your site. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).', }; diff --git a/lighthouse-core/audits/viewport.js b/lighthouse-core/audits/viewport.js index 69e4dae9dfa4..a8d2a1e1677a 100644 --- a/lighthouse-core/audits/viewport.js +++ b/lighthouse-core/audits/viewport.js @@ -10,11 +10,15 @@ const ComputedViewportMeta = require('../computed/viewport-meta.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on the viewport meta tag. This descriptive title is shown to users when a viewport tag is set and configured. */ title: 'Has a `` tag with `width` or `initial-scale`', + /** Title of a Lighthouse audit that provides detail on the viewport meta tag. This descriptive title is shown to users when a viewport tag is not set or configured. */ failureTitle: 'Does not have a `` tag with `width` ' + 'or `initial-scale`', + /** Description of a Lighthouse audit that tells the user why they should have a viewport meta tag. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Add a viewport meta tag to optimize your app for mobile screens. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).', + /** Explanatory message stating that no viewport meta tag exists on the page. */ explanationNoTag: 'No viewport meta tag found', }; diff --git a/lighthouse-core/audits/without-javascript.js b/lighthouse-core/audits/without-javascript.js index d2ab2887be64..0318cb25b641 100644 --- a/lighthouse-core/audits/without-javascript.js +++ b/lighthouse-core/audits/without-javascript.js @@ -9,11 +9,15 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on the page's ability to return content without Javascript. This descriptive title is shown to users when at least some content is shown when Javascript is not available. */ title: 'Contains some content when JavaScript is not available', + /** Title of a Lighthouse audit that provides detail on the page's ability to return content without Javascript. This descriptive title is shown to users when no content is shown when Javascript is not available. */ failureTitle: 'Does not provide fallback content when JavaScript is not available', + /** Description of a Lighthouse audit that tells the user why they should return content even if Javascript is unavailable. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Your app should display some content when JavaScript is disabled, even if ' + 'it\'s just a warning to the user that JavaScript is required to use the app. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/no-js).', + /** Explanatory message stating that the site body should render some (any) content even if the page's scripts cannot be loaded. */ explanation: 'The page body should render some content if its scripts are not available.', }; diff --git a/lighthouse-core/audits/works-offline.js b/lighthouse-core/audits/works-offline.js index 2b03d9bbc395..6b3cc4cfef6d 100644 --- a/lighthouse-core/audits/works-offline.js +++ b/lighthouse-core/audits/works-offline.js @@ -10,11 +10,15 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on the offline responsiveness of a site. This descriptive title is shown to users when the page responds even when offline. */ title: 'Current page responds with a 200 when offline', + /** Title of a Lighthouse audit that provides detail on the offline responsiveness of a site. This descriptive title is shown to users when the page does not respond when offline. */ failureTitle: 'Current page does not respond with a 200 when offline', + /** Description of a Lighthouse audit that tells the user why they should respond to requests when offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'If you\'re building a Progressive Web App, consider using a service worker ' + 'so that your app can work offline. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', + /** Warning that the page redirected during offline load and that may affect offline testing. */ warningNoLoad: 'The page may be not loading offline because your test URL ' + `({requested}) was redirected to "{final}". ` + 'Try testing the second URL directly.', diff --git a/lighthouse-core/config/default-config.js b/lighthouse-core/config/default-config.js index 84f342c1b06d..32f50dd99bf5 100644 --- a/lighthouse-core/config/default-config.js +++ b/lighthouse-core/config/default-config.js @@ -94,12 +94,12 @@ const UIStrings = { seoCrawlingGroupTitle: 'Crawling and Indexing', /* Description of the navigation section within the Search Engine Optimization (SEO) category. Within this section are audits with descriptive titles that highlight ways to make a website accessible to search engine crawlers. */ seoCrawlingGroupDescription: 'To appear in search results, crawlers need access to your app.', - /** */ + /** Title of the Progressive Web Application (PWA) category of audits. This is displayed at the top of a list of audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc. Also used as a label of a score gauge; try to limit to 20 characters. */ pwaCategoryTitle: 'Progressive Web App', - /** */ + /** Description of the Progressive Web Application (PWA) category. This is displayed at the top of a list of audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc. No character length limits. 'Learn More' becomes link text to additional documentation. */ pwaCategoryDescription: 'These checks validate the aspects of a Progressive Web App. ' + '[Learn more](https://developers.google.com/web/progressive-web-apps/checklist).', - /** */ + /** Description of the Progressive Web Application (PWA) manual checks category, the additional validators must be run by hand in order to check all PWA best practices. This is displayed at the top of a list of manually run audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc.. No character length limits. */ pwaCategoryManualDescription: 'These checks are required by the baseline ' + '[PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are ' + 'not automatically checked by Lighthouse. They do not affect your score but it\'s important that you verify them manually.', diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index 4b91165ceccf..784aae1c6e87 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -589,19 +589,19 @@ }, "lighthouse-core/audits/content-width.js | description": { "message": "If the width of your app's content doesn't match the width of the viewport, your app might not be optimized for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should care that a site's content size should match its viewport size. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/content-width.js | explanation": { "message": "The viewport size of {innerWidth}px, does not match the window size of {outerWidth}px.", - "description": "" + "description": "Explanatory message stating that the viewport size and window size differ." }, "lighthouse-core/audits/content-width.js | failureTitle": { "message": "Content is not sized correctly for the viewport", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the content size of a site compared to its viewport. This descriptive title is shown to users when the site's content is not sized appropriately." }, "lighthouse-core/audits/content-width.js | title": { "message": "Content is sized correctly for the viewport", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the content size of a site compared to its viewport. This descriptive title is shown to users when the site's content is sized appropriately." }, "lighthouse-core/audits/critical-request-chains.js | description": { "message": "The Critical Request Chains below show you what resources are loaded with a high priority. Consider reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/critical-request-chains).", @@ -669,31 +669,31 @@ }, "lighthouse-core/audits/installable-manifest.js | description": { "message": "Browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/install-prompt).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why installability is important for webapps. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/installable-manifest.js | failureTitle": { "message": "Web app manifest does not meet the installability requirements", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the installability of a website. This descriptive title is shown to users when a webapp is not installable." }, "lighthouse-core/audits/installable-manifest.js | title": { "message": "Web app manifest meets the installability requirements", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the installability of a website. This descriptive title is shown to users when a webapp is installable." }, "lighthouse-core/audits/is-on-https.js | description": { "message": "All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/https).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should use HTTPS on all requests. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/is-on-https.js | displayValue": { "message": "{itemCount, plural,\n =1 {1 insecure request found}\n other {# insecure requests found}\n }", - "description": "" + "description": "[ICU Syntax] Label for the audit identifying the number of insecure requests on the site." }, "lighthouse-core/audits/is-on-https.js | failureTitle": { "message": "Does not use HTTPS", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the use of HTTPS on a website. This descriptive title is shown to users when some network activity does not use HTTPS." }, "lighthouse-core/audits/is-on-https.js | title": { "message": "Uses HTTPS", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the use of HTTPS on a website. This descriptive title is shown to users when all network activity uses HTTPS." }, "lighthouse-core/audits/load-fast-enough-for-pwa.js | description": { "message": "A fast page load over a cellular network ensures a good mobile user experience. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/fast-3g).", @@ -733,27 +733,27 @@ }, "lighthouse-core/audits/manual/pwa-cross-browser.js | description": { "message": "To reach the most number of users, sites should work across every major browser. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#site-works-cross-browser).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should make sites work across different browsers. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/manual/pwa-cross-browser.js | title": { "message": "Site works cross-browser", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on whether or not a site works across different browsers." }, "lighthouse-core/audits/manual/pwa-each-page-has-url.js | description": { "message": "Ensure individual pages are deep linkable via the URLs and that URLs are unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should use distinct URLs for each page. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/manual/pwa-each-page-has-url.js | title": { "message": "Each page has a URL", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on a site's pages all having distinct URLs." }, "lighthouse-core/audits/manual/pwa-page-transitions.js | description": { "message": "Transitions should feel snappy as you tap around, even on a slow network, a key to perceived performance. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should make the transitions smooth. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/manual/pwa-page-transitions.js | title": { "message": "Page transitions don't feel like they block on the network", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on page transitions blocking network requests." }, "lighthouse-core/audits/metrics/estimated-input-latency.js | description": { "message": "Estimated Input Latency is an estimate of how long your app takes to respond to user input, in milliseconds, during the busiest 5s window of page load. If your latency is higher than 50 ms, users may perceive your app as laggy. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/estimated-input-latency).", @@ -857,15 +857,15 @@ }, "lighthouse-core/audits/redirects-http.js | description": { "message": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should direct HTTP traffic to HTTPS. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/redirects-http.js | failureTitle": { "message": "Does not redirect HTTP traffic to HTTPS", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on HTTP to HTTPS redirects. This descriptive title is shown to users when HTTP traffic is not redirected to HTTPS." }, "lighthouse-core/audits/redirects-http.js | title": { "message": "Redirects HTTP traffic to HTTPS", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on HTTP to HTTPS redirects. This descriptive title is shown to users when HTTP traffic is redirected to HTTPS." }, "lighthouse-core/audits/redirects.js | description": { "message": "Redirects introduce additional delays before the page can be loaded. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/redirects).", @@ -1097,55 +1097,55 @@ }, "lighthouse-core/audits/service-worker.js | description": { "message": "The service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should use a service worker. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/service-worker.js | explanationBadManifest": { "message": "This page is controlled by a service worker, however no start_url was found because manifest failed to parse as valid JSON", - "description": "" + "description": "Explanatory message stating that the page's manifest is invalid." }, "lighthouse-core/audits/service-worker.js | explanationBadStartUrl": { "message": "This page is controlled by a service worker, however the start_url ({startUrl}) is not in the service worker's scope ({scopeUrl})", - "description": "" + "description": "Explanatory message stating that the manifest's start_url is not in scope, and therefor invalid." }, "lighthouse-core/audits/service-worker.js | explanationNoManifest": { "message": "This page is controlled by a service worker, however no start_url was found because no manifest was fetched.", - "description": "" + "description": "Explanatory message stating that the page has no manifest." }, "lighthouse-core/audits/service-worker.js | explanationOutOfScope": { "message": "This origin has one or more service workers, however the page ({pageUrl}) is not in scope.", - "description": "" + "description": "Explanatory message stating that the page has multiple, or out of scope service workers." }, "lighthouse-core/audits/service-worker.js | failureTitle": { "message": "Does not register a service worker that controls page and start_url", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on a page's service worker. This descriptive title is shown to users when a service worker is invalid." }, "lighthouse-core/audits/service-worker.js | title": { "message": "Registers a service worker that controls page and start_url", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on a page's service worker. This descriptive title is shown to users when a service worker is registered and valid." }, "lighthouse-core/audits/splash-screen.js | description": { "message": "A themed splash screen ensures a high-quality experience when users launch your app from their homescreens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should configure a custom splash screen. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/splash-screen.js | failureTitle": { "message": "Is not configured for a custom splash screen", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on splash screens. This descriptive title is shown to users when the site does not have a custom splash screen." }, "lighthouse-core/audits/splash-screen.js | title": { "message": "Configured for a custom splash screen", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on splash screens. This descriptive title is shown to users when the site has a custom splash screen." }, "lighthouse-core/audits/themed-omnibox.js | description": { "message": "The browser address bar can be themed to match your site. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should set a theme color for the address bar. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/themed-omnibox.js | failureTitle": { "message": "Does not set an address-bar theme color", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on address-bar theme colors. This descriptive title is shown to users when an address-bar theme color has not been set." }, "lighthouse-core/audits/themed-omnibox.js | title": { "message": "Sets an address-bar theme color", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on address-bar theme colors. This descriptive title is shown to users when an address-bar theme color has been set." }, "lighthouse-core/audits/time-to-first-byte.js | description": { "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).", @@ -1217,51 +1217,51 @@ }, "lighthouse-core/audits/viewport.js | description": { "message": "Add a viewport meta tag to optimize your app for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should have a viewport meta tag. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/viewport.js | explanationNoTag": { "message": "No viewport meta tag found", - "description": "" + "description": "Explanatory message stating that no viewport meta tag exists on the page." }, "lighthouse-core/audits/viewport.js | failureTitle": { "message": "Does not have a `` tag with `width` or `initial-scale`", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the viewport meta tag. This descriptive title is shown to users when a viewport tag is not set or configured." }, "lighthouse-core/audits/viewport.js | title": { "message": "Has a `` tag with `width` or `initial-scale`", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the viewport meta tag. This descriptive title is shown to users when a viewport tag is set and configured." }, "lighthouse-core/audits/without-javascript.js | description": { "message": "Your app should display some content when JavaScript is disabled, even if it's just a warning to the user that JavaScript is required to use the app. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/no-js).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should return content even if Javascript is unavailable. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/without-javascript.js | explanation": { "message": "The page body should render some content if its scripts are not available.", - "description": "" + "description": "Explanatory message stating that the site body should render some (any) content even if the page's scripts cannot be loaded." }, "lighthouse-core/audits/without-javascript.js | failureTitle": { "message": "Does not provide fallback content when JavaScript is not available", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the page's ability to return content without Javascript. This descriptive title is shown to users when no content is shown when Javascript is not available." }, "lighthouse-core/audits/without-javascript.js | title": { "message": "Contains some content when JavaScript is not available", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the page's ability to return content without Javascript. This descriptive title is shown to users when at least some content is shown when Javascript is not available." }, "lighthouse-core/audits/works-offline.js | description": { "message": "If you're building a Progressive Web App, consider using a service worker so that your app can work offline. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why they should respond to requests when offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/works-offline.js | failureTitle": { "message": "Current page does not respond with a 200 when offline", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the offline responsiveness of a site. This descriptive title is shown to users when the page does not respond when offline." }, "lighthouse-core/audits/works-offline.js | title": { "message": "Current page responds with a 200 when offline", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the offline responsiveness of a site. This descriptive title is shown to users when the page responds even when offline." }, "lighthouse-core/audits/works-offline.js | warningNoLoad": { "message": "The page may be not loading offline because your test URL ({requested}) was redirected to \"{final}\". Try testing the second URL directly.", - "description": "" + "description": "Warning that the page redirected during offline load and that may affect offline testing." }, "lighthouse-core/config/default-config.js | a11yAriaGroupDescription": { "message": "These are opportunities to improve the usage of ARIA in your application which may enhance the experience for users of assistive technology, like a screen reader.", @@ -1389,15 +1389,15 @@ }, "lighthouse-core/config/default-config.js | pwaCategoryDescription": { "message": "These checks validate the aspects of a Progressive Web App. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist).", - "description": "" + "description": "Description of the Progressive Web Application (PWA) category. This is displayed at the top of a list of audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/config/default-config.js | pwaCategoryManualDescription": { "message": "These checks are required by the baseline [PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are not automatically checked by Lighthouse. They do not affect your score but it's important that you verify them manually.", - "description": "" + "description": "Description of the Progressive Web Application (PWA) manual checks category, the additional validators must be run by hand in order to check all PWA best practices. This is displayed at the top of a list of manually run audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc.. No character length limits." }, "lighthouse-core/config/default-config.js | pwaCategoryTitle": { "message": "Progressive Web App", - "description": "" + "description": "Title of the Progressive Web Application (PWA) category of audits. This is displayed at the top of a list of audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc. Also used as a label of a score gauge; try to limit to 20 characters." }, "lighthouse-core/config/default-config.js | pwaFastReliableGroupTitle": { "message": "Fast and reliable", From 7dc454c02f6ecc6167cefeddece8186a5d8a09f1 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Mon, 3 Jun 2019 14:20:55 -0700 Subject: [PATCH 05/24] missed one --- lighthouse-core/audits/offline-start-url.js | 4 ++++ lighthouse-core/lib/i18n/en-US.json | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lighthouse-core/audits/offline-start-url.js b/lighthouse-core/audits/offline-start-url.js index aef0880bd985..981a43ae6873 100644 --- a/lighthouse-core/audits/offline-start-url.js +++ b/lighthouse-core/audits/offline-start-url.js @@ -9,10 +9,14 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { + /** Title of a Lighthouse audit that provides detail on the start_url's offline validity. This descriptive title is shown to users when the manifest's start_url responds when requested offline. */ title: 'start_url responds with a 200 when offline', + /** Title of a Lighthouse audit that provides detail on the start_url's offline validity. This descriptive title is shown to users when the manifest's start_url does not respond when requested offline. */ failureTitle: 'start_url does not respond with a 200 when offline', + /** Description of a Lighthouse audit that tells the user why the start_url should respond when requested offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'A service worker enables your web app to be reliable in unpredictable ' + 'network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', + /** Warning that the audit couldn't find the start_url and used the page's URL instead. */ warningCantStart: 'We couldn\'t read the start_url from the manifest. As a result, the ' + 'start_url was assumed to be the document\'s URL. Error message: \'{manifestWarning}\'.', }; diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index 784aae1c6e87..c975d54b4ae0 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -829,19 +829,19 @@ }, "lighthouse-core/audits/offline-start-url.js | description": { "message": "A service worker enables your web app to be reliable in unpredictable network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).", - "description": "" + "description": "Description of a Lighthouse audit that tells the user why the start_url should respond when requested offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/offline-start-url.js | failureTitle": { "message": "start_url does not respond with a 200 when offline", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the start_url's offline validity. This descriptive title is shown to users when the manifest's start_url does not respond when requested offline." }, "lighthouse-core/audits/offline-start-url.js | title": { "message": "start_url responds with a 200 when offline", - "description": "" + "description": "Title of a Lighthouse audit that provides detail on the start_url's offline validity. This descriptive title is shown to users when the manifest's start_url responds when requested offline." }, "lighthouse-core/audits/offline-start-url.js | warningCantStart": { "message": "We couldn't read the start_url from the manifest. As a result, the start_url was assumed to be the document's URL. Error message: '{manifestWarning}'.", - "description": "" + "description": "Warning that the audit couldn't find the start_url and used the page's URL instead." }, "lighthouse-core/audits/performance-budget.js | description": { "message": "Keep the quantity and size of network requests under the targets set by the provided performance budget. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/budgets).", From 3828cd8e9b794403eeaaf42c45a47962cf4b3121 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Tue, 4 Jun 2019 09:38:21 -0700 Subject: [PATCH 06/24] Removed comma. --- lighthouse-core/audits/content-width.js | 2 +- lighthouse-core/lib/i18n/en-US.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lighthouse-core/audits/content-width.js b/lighthouse-core/audits/content-width.js index bd6994836c7e..b75f3bff92e2 100644 --- a/lighthouse-core/audits/content-width.js +++ b/lighthouse-core/audits/content-width.js @@ -18,7 +18,7 @@ const UIStrings = { 'of the viewport, your app might not be optimized for mobile screens. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).', /** Explanatory message stating that the viewport size and window size differ. */ - explanation: 'The viewport size of {innerWidth}px, does not match the window ' + + explanation: 'The viewport size of {innerWidth}px does not match the window ' + 'size of {outerWidth}px.', }; diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index c975d54b4ae0..11f7c8875240 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -592,7 +592,7 @@ "description": "Description of a Lighthouse audit that tells the user why they should care that a site's content size should match its viewport size. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/content-width.js | explanation": { - "message": "The viewport size of {innerWidth}px, does not match the window size of {outerWidth}px.", + "message": "The viewport size of {innerWidth}px does not match the window size of {outerWidth}px.", "description": "Explanatory message stating that the viewport size and window size differ." }, "lighthouse-core/audits/content-width.js | failureTitle": { From 45e496c5d9543fce04a6eefb56ddf0efffdf46ff Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Tue, 4 Jun 2019 09:42:37 -0700 Subject: [PATCH 07/24] themed omnibox more clear --- lighthouse-core/audits/themed-omnibox.js | 8 ++++---- lighthouse-core/lib/i18n/en-US.json | 8 ++++---- lighthouse-core/test/results/sample_v2.json | 2 +- proto/sample_v2_round_trip.json | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lighthouse-core/audits/themed-omnibox.js b/lighthouse-core/audits/themed-omnibox.js index 53a9d2283adf..6580751049e7 100644 --- a/lighthouse-core/audits/themed-omnibox.js +++ b/lighthouse-core/audits/themed-omnibox.js @@ -11,10 +11,10 @@ const cssParsers = require('cssstyle/lib/parsers'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on address-bar theme colors. This descriptive title is shown to users when an address-bar theme color has been set. */ - title: 'Sets an address-bar theme color', - /** Title of a Lighthouse audit that provides detail on address-bar theme colors. This descriptive title is shown to users when an address-bar theme color has not been set. */ - failureTitle: 'Does not set an address-bar theme color', + /** Title of a Lighthouse audit that provides detail on the theme color the page has set for the browser's address bar. This descriptive title is shown to users when an address-bar theme color has been set. */ + title: 'Sets a theme color for the address bar.', + /** Title of a Lighthouse audit that provides detail on the theme color the page has set for the browser's address bar. This descriptive title is shown to users when an address-bar theme color has not been set. */ + failureTitle: 'Does not set a theme color for the address bar.', /** Description of a Lighthouse audit that tells the user why they should set a theme color for the address bar. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'The browser address bar can be themed to match your site. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).', diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index 11f7c8875240..b4cac4bf40d4 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -1140,12 +1140,12 @@ "description": "Description of a Lighthouse audit that tells the user why they should set a theme color for the address bar. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation." }, "lighthouse-core/audits/themed-omnibox.js | failureTitle": { - "message": "Does not set an address-bar theme color", - "description": "Title of a Lighthouse audit that provides detail on address-bar theme colors. This descriptive title is shown to users when an address-bar theme color has not been set." + "message": "Does not set a theme color for the address bar.", + "description": "Title of a Lighthouse audit that provides detail on the theme color the page has set for the browser's address bar. This descriptive title is shown to users when an address-bar theme color has not been set." }, "lighthouse-core/audits/themed-omnibox.js | title": { - "message": "Sets an address-bar theme color", - "description": "Title of a Lighthouse audit that provides detail on address-bar theme colors. This descriptive title is shown to users when an address-bar theme color has been set." + "message": "Sets a theme color for the address bar.", + "description": "Title of a Lighthouse audit that provides detail on the theme color the page has set for the browser's address bar. This descriptive title is shown to users when an address-bar theme color has been set." }, "lighthouse-core/audits/time-to-first-byte.js | description": { "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).", diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index 45c98fcb69c3..83dfe9745273 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -506,7 +506,7 @@ }, "themed-omnibox": { "id": "themed-omnibox", - "title": "Does not set an address-bar theme color", + "title": "Does not set a theme color for the address bar.", "description": "The browser address bar can be themed to match your site. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).", "score": 0, "scoreDisplayMode": "binary", diff --git a/proto/sample_v2_round_trip.json b/proto/sample_v2_round_trip.json index 7bf12819c57e..8303f69881fd 100644 --- a/proto/sample_v2_round_trip.json +++ b/proto/sample_v2_round_trip.json @@ -2556,7 +2556,7 @@ "id": "themed-omnibox", "score": 0.0, "scoreDisplayMode": "binary", - "title": "Does not set an address-bar theme color" + "title": "Does not set a theme color for the address bar." }, "time-to-first-byte": { "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).", From ee512e90002dba42ba7821c473e549b579f86e7a Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Tue, 25 Jun 2019 14:20:07 -0700 Subject: [PATCH 08/24] revert nulls in proto sample --- proto/sample_v2_round_trip.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proto/sample_v2_round_trip.json b/proto/sample_v2_round_trip.json index 631656d0fbaa..702de5a79a3f 100644 --- a/proto/sample_v2_round_trip.json +++ b/proto/sample_v2_round_trip.json @@ -1125,7 +1125,7 @@ "name": "WordPress" } ], - "summary": null, + "summary": {}, "type": "table" }, "id": "js-libraries", @@ -1257,7 +1257,7 @@ "details": { "headings": [], "items": [], - "summary": null, + "summary": {}, "type": "table" }, "id": "link-text", @@ -1914,7 +1914,7 @@ "vulnCount": 2.0 } ], - "summary": null, + "summary": {}, "type": "table" }, "displayValue": "2 vulnerabilities detected", From 61c023436c737c80e7b73d64de4a9aaa831d19ed Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 26 Jun 2019 09:58:11 -0700 Subject: [PATCH 09/24] collect pwa en-XL, fix untranslated explanation. Thanks en-XL! --- .../audits/load-fast-enough-for-pwa.js | 8 +- lighthouse-core/lib/i18n/en-US.json | 4 + lighthouse-core/lib/i18n/locales/en-XL.json | 147 ++++++++++++++++++ 3 files changed, 156 insertions(+), 3 deletions(-) diff --git a/lighthouse-core/audits/load-fast-enough-for-pwa.js b/lighthouse-core/audits/load-fast-enough-for-pwa.js index 052cedcc2d23..52e1ff06b9d3 100644 --- a/lighthouse-core/audits/load-fast-enough-for-pwa.js +++ b/lighthouse-core/audits/load-fast-enough-for-pwa.js @@ -33,6 +33,10 @@ const UIStrings = { /** Label for the audit identifying the time it took for the page to become interactive on a mobile network. */ displayValueTextWithOverride: 'Interactive on simulated mobile network at ' + '{timeInMs, number, seconds}\xa0s', + /** Explanatory message stating that there was a failure in an audit caused by the page loading too slowly to be considered interactive quickly. This references another Lighthouse auditing category, "Performance", that can give additional details on performance debugging. */ + explanationLoadSlow: 'Your page loads too slowly and is not interactive within 10 seconds. ' + + 'Look at the opportunities and diagnostics in the "Performance" section to learn how to ' + + 'improve.', }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); @@ -86,9 +90,7 @@ class LoadFastEnough4Pwa extends Audit { let explanation; if (!score) { displayValue = str_(displayValueTemplate, {timeInMs: tti.timing}); - explanation = 'Your page loads too slowly and is not interactive within 10 seconds. ' + - 'Look at the opportunities and diagnostics in the "Performance" section to learn how to ' + - 'improve.'; + explanation = str_(UIStrings.explanationLoadSlow); } return { diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index b4081bda1f3a..394126232028 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -987,6 +987,10 @@ "message": "Interactive on simulated mobile network at {timeInMs, number, seconds} s", "description": "Label for the audit identifying the time it took for the page to become interactive on a mobile network." }, + "lighthouse-core/audits/load-fast-enough-for-pwa.js | explanationLoadSlow": { + "message": "Your page loads too slowly and is not interactive within 10 seconds. Look at the opportunities and diagnostics in the \"Performance\" section to learn how to improve.", + "description": "Explanatory message stating that there was a failure in an audit caused by the page loading too slowly to be considered interactive quickly. This references another Lighthouse auditing category, \"Performance\", that can give additional details on performance debugging." + }, "lighthouse-core/audits/load-fast-enough-for-pwa.js | failureTitle": { "message": "Page load is not fast enough on mobile networks", "description": "Imperative title of a Lighthouse audit that tells the user that their page has loaded fast enough to be considered a Progressive Web App. This imperative title is shown to users when the web page has loaded too slowly to be considered a Progressive Web App." diff --git a/lighthouse-core/lib/i18n/locales/en-XL.json b/lighthouse-core/lib/i18n/locales/en-XL.json index d4ccecd4d5bb..57564b1e6b34 100644 --- a/lighthouse-core/lib/i18n/locales/en-XL.json +++ b/lighthouse-core/lib/i18n/locales/en-XL.json @@ -440,6 +440,18 @@ "lighthouse-core/audits/byte-efficiency/uses-webp-images.js | title": { "message": "Ŝér̂v́ê ím̂áĝéŝ ín̂ ńêx́t̂-ǵêń f̂ór̂ḿât́ŝ" }, + "lighthouse-core/audits/content-width.js | description": { + "message": "Îf́ t̂h́ê ẃîd́t̂h́ ôf́ ŷóûŕ âṕp̂'ś ĉón̂t́êńt̂ d́ôéŝń't̂ ḿât́ĉh́ t̂h́ê ẃîd́t̂h́ ôf́ t̂h́ê v́îéŵṕôŕt̂, ýôúr̂ áp̂ṕ m̂íĝh́t̂ ńôt́ b̂é ôṕt̂ím̂íẑéd̂ f́ôŕ m̂ób̂íl̂é ŝćr̂éêńŝ. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/t́ôól̂ś/l̂íĝh́t̂h́ôúŝé/âúd̂ít̂ś/ĉón̂t́êńt̂-śîźêd́-ĉór̂ŕêćt̂ĺŷ-f́ôŕ-v̂íêẃp̂ór̂t́)." + }, + "lighthouse-core/audits/content-width.js | explanation": { + "message": "T̂h́ê v́îéŵṕôŕt̂ śîźê óf̂ {innerWidth}ṕx̂ d́ôéŝ ńôt́ m̂át̂ćĥ t́ĥé ŵín̂d́ôẃ ŝíẑé ôf́ {outerWidth}p̂x́." + }, + "lighthouse-core/audits/content-width.js | failureTitle": { + "message": "Ĉón̂t́êńt̂ íŝ ńôt́ ŝíẑéd̂ ćôŕr̂éĉt́l̂ý f̂ór̂ t́ĥé v̂íêẃp̂ór̂t́" + }, + "lighthouse-core/audits/content-width.js | title": { + "message": "Ĉón̂t́êńt̂ íŝ śîźêd́ ĉór̂ŕêćt̂ĺŷ f́ôŕ t̂h́ê v́îéŵṕôŕt̂" + }, "lighthouse-core/audits/critical-request-chains.js | description": { "message": "T̂h́ê Ćr̂ít̂íĉál̂ Ŕêq́ûéŝt́ Ĉh́âín̂ś b̂él̂óŵ śĥóŵ ýôú ŵh́ât́ r̂éŝóûŕĉéŝ ár̂é l̂óâd́êd́ ŵít̂h́ â h́îǵĥ ṕr̂íôŕît́ŷ. Ćôńŝíd̂ér̂ ŕêd́ûćîńĝ t́ĥé l̂én̂ǵt̂h́ ôf́ ĉh́âín̂ś, r̂éd̂úĉín̂ǵ t̂h́ê d́ôẃn̂ĺôád̂ śîźê óf̂ ŕêśôúr̂ćêś, ôŕ d̂éf̂ér̂ŕîńĝ t́ĥé d̂óŵńl̂óâd́ ôf́ ûńn̂éĉéŝśâŕŷ ŕêśôúr̂ćêś t̂ó îḿp̂ŕôv́ê ṕâǵê ĺôád̂. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/t́ôól̂ś/l̂íĝh́t̂h́ôúŝé/âúd̂ít̂ś/ĉŕît́îćâĺ-r̂éq̂úêśt̂-ćĥáîńŝ)." }, @@ -695,6 +707,15 @@ "lighthouse-core/audits/image-aspect-ratio.js | warningCompute": { "message": "Îńv̂ál̂íd̂ ím̂áĝé ŝíẑín̂ǵ îńf̂ór̂ḿât́îón̂ {url}" }, + "lighthouse-core/audits/installable-manifest.js | description": { + "message": "B̂ŕôẃŝér̂ś ĉán̂ ṕr̂óâćt̂ív̂él̂ý p̂ŕôḿp̂t́ ûśêŕŝ t́ô ád̂d́ ŷóûŕ âṕp̂ t́ô t́ĥéîŕ ĥóm̂éŝćr̂éêń, ŵh́îćĥ ćâń l̂éâd́ t̂ó ĥíĝh́êŕ êńĝáĝém̂én̂t́. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/ín̂śt̂ál̂ĺ-p̂ŕôḿp̂t́)." + }, + "lighthouse-core/audits/installable-manifest.js | failureTitle": { + "message": "Ŵéb̂ áp̂ṕ m̂án̂íf̂éŝt́ d̂óêś n̂ót̂ ḿêét̂ t́ĥé îńŝt́âĺl̂áb̂íl̂ít̂ý r̂éq̂úîŕêḿêńt̂ś" + }, + "lighthouse-core/audits/installable-manifest.js | title": { + "message": "Ŵéb̂ áp̂ṕ m̂án̂íf̂éŝt́ m̂éêt́ŝ t́ĥé îńŝt́âĺl̂áb̂íl̂ít̂ý r̂éq̂úîŕêḿêńt̂ś" + }, "lighthouse-core/audits/is-on-https.js | columnInsecureURL": { "message": "Îńŝéĉúr̂é ÛŔL̂" }, @@ -719,6 +740,9 @@ "lighthouse-core/audits/load-fast-enough-for-pwa.js | displayValueTextWithOverride": { "message": "Îńt̂ér̂áĉt́îv́ê ón̂ śîḿûĺât́êd́ m̂ób̂íl̂é n̂ét̂ẃôŕk̂ át̂ {timeInMs, number, seconds} ś" }, + "lighthouse-core/audits/load-fast-enough-for-pwa.js | explanationLoadSlow": { + "message": "Ŷóûŕ p̂áĝé l̂óâd́ŝ t́ôó ŝĺôẃl̂ý âńd̂ íŝ ńôt́ îńt̂ér̂áĉt́îv́ê ẃît́ĥín̂ 10 śêćôńd̂ś. L̂óôḱ ât́ t̂h́ê óp̂ṕôŕt̂ún̂ít̂íêś âńd̂ d́îáĝńôśt̂íĉś îń t̂h́ê \"Ṕêŕf̂ór̂ḿâńĉé\" ŝéĉt́îón̂ t́ô ĺêár̂ń ĥóŵ t́ô ím̂ṕr̂óv̂é." + }, "lighthouse-core/audits/load-fast-enough-for-pwa.js | failureTitle": { "message": "P̂áĝé l̂óâd́ îś n̂ót̂ f́âśt̂ én̂óûǵĥ ón̂ ḿôb́îĺê ńêt́ŵór̂ḱŝ" }, @@ -737,6 +761,24 @@ "lighthouse-core/audits/mainthread-work-breakdown.js | title": { "message": "M̂ín̂ím̂íẑéŝ ḿâín̂-t́ĥŕêád̂ ẃôŕk̂" }, + "lighthouse-core/audits/manual/pwa-cross-browser.js | description": { + "message": "T̂ó r̂éâćĥ t́ĥé m̂óŝt́ n̂úm̂b́êŕ ôf́ ûśêŕŝ, śît́êś ŝh́ôúl̂d́ ŵór̂ḱ âćr̂óŝś êv́êŕŷ ḿâj́ôŕ b̂ŕôẃŝér̂. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/ṕr̂óĝŕêśŝív̂é-ŵéb̂-áp̂ṕŝ/ćĥéĉḱl̂íŝt́#ŝít̂é-ŵór̂ḱŝ-ćr̂óŝś-b̂ŕôẃŝér̂)." + }, + "lighthouse-core/audits/manual/pwa-cross-browser.js | title": { + "message": "Ŝít̂é ŵór̂ḱŝ ćr̂óŝś-b̂ŕôẃŝér̂" + }, + "lighthouse-core/audits/manual/pwa-each-page-has-url.js | description": { + "message": "Êńŝúr̂é îńd̂ív̂íd̂úâĺ p̂áĝéŝ ár̂é d̂éêṕ l̂ín̂ḱâb́l̂é v̂íâ t́ĥé ÛŔL̂ś âńd̂ t́ĥát̂ ÚR̂Ĺŝ ár̂é ûńîq́ûé f̂ór̂ t́ĥé p̂úr̂ṕôśê óf̂ śĥár̂éâb́îĺît́ŷ ón̂ śôćîál̂ ḿêd́îá. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/p̂ŕôǵr̂éŝśîv́ê-ẃêb́-âṕp̂ś/ĉh́êćk̂ĺîśt̂#éâćĥ-ṕâǵê-h́âś-â-úr̂ĺ)." + }, + "lighthouse-core/audits/manual/pwa-each-page-has-url.js | title": { + "message": "Êáĉh́ p̂áĝé ĥáŝ á ÛŔL̂" + }, + "lighthouse-core/audits/manual/pwa-page-transitions.js | description": { + "message": "T̂ŕâńŝít̂íôńŝ śĥóûĺd̂ f́êél̂ śn̂áp̂ṕŷ áŝ ýôú t̂áp̂ ár̂óûńd̂, év̂én̂ ón̂ á ŝĺôẃ n̂ét̂ẃôŕk̂, á k̂éŷ t́ô ṕêŕĉéîv́êd́ p̂ér̂f́ôŕm̂án̂ćê. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/ṕr̂óĝŕêśŝív̂é-ŵéb̂-áp̂ṕŝ/ćĥéĉḱl̂íŝt́#p̂áĝé-t̂ŕâńŝít̂íôńŝ-d́ôńt̂-f́êél̂-ĺîḱê-t́ĥéŷ-b́l̂óĉḱ-ôń-t̂h́ê-ńêt́ŵór̂ḱ)." + }, + "lighthouse-core/audits/manual/pwa-page-transitions.js | title": { + "message": "P̂áĝé t̂ŕâńŝít̂íôńŝ d́ôń't̂ f́êél̂ ĺîḱê t́ĥéŷ b́l̂óĉḱ ôń t̂h́ê ńêt́ŵór̂ḱ" + }, "lighthouse-core/audits/metrics/estimated-input-latency.js | description": { "message": "Êśt̂ím̂át̂éd̂ Ín̂ṕût́ L̂át̂én̂ćŷ íŝ án̂ éŝt́îḿât́ê óf̂ h́ôẃ l̂ón̂ǵ ŷóûŕ âṕp̂ t́âḱêś t̂ó r̂éŝṕôńd̂ t́ô úŝér̂ ín̂ṕût́, îń m̂íl̂ĺîśêćôńd̂ś, d̂úr̂ín̂ǵ t̂h́ê b́ûśîéŝt́ 5ŝ ẃîńd̂óŵ óf̂ ṕâǵê ĺôád̂. Íf̂ ýôúr̂ ĺât́êńĉý îś ĥíĝh́êŕ t̂h́âń 50 m̂ś, ûśêŕŝ ḿâý p̂ér̂ćêív̂é ŷóûŕ âṕp̂ áŝ ĺâǵĝý. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/éŝt́îḿât́êd́-îńp̂út̂-ĺât́êńĉý)." }, @@ -791,6 +833,18 @@ "lighthouse-core/audits/network-server-latency.js | title": { "message": "Ŝér̂v́êŕ B̂áĉḱêńd̂ Ĺât́êńĉíêś" }, + "lighthouse-core/audits/offline-start-url.js | description": { + "message": " śêŕv̂íĉé ŵór̂ḱêŕ êńâb́l̂éŝ ýôúr̂ ẃêb́ âṕp̂ t́ô b́ê ŕêĺîáb̂ĺê ín̂ ún̂ṕr̂éd̂íĉt́âb́l̂é n̂ét̂ẃôŕk̂ ćôńd̂ít̂íôńŝ. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/t́ôól̂ś/l̂íĝh́t̂h́ôúŝé/âúd̂ít̂ś/ĥt́t̂ṕ-200-ŵh́êń-ôf́f̂ĺîńê)." + }, + "lighthouse-core/audits/offline-start-url.js | failureTitle": { + "message": "ŝt́âŕt̂_úr̂ĺ d̂óêś n̂ót̂ ŕêśp̂ón̂d́ ŵít̂h́ â 200 ẃĥén̂ óf̂f́l̂ín̂é" + }, + "lighthouse-core/audits/offline-start-url.js | title": { + "message": "ŝt́âŕt̂_úr̂ĺ r̂éŝṕôńd̂ś ŵít̂h́ â 200 ẃĥén̂ óf̂f́l̂ín̂é" + }, + "lighthouse-core/audits/offline-start-url.js | warningCantStart": { + "message": "Ŵé ĉóûĺd̂ń't̂ ŕêád̂ t́ĥé ŝt́âŕt̂_úr̂ĺ f̂ŕôḿ t̂h́ê ḿâńîf́êśt̂. Áŝ á r̂éŝúl̂t́, t̂h́ê śt̂ár̂t́_ûŕl̂ ẃâś âśŝúm̂éd̂ t́ô b́ê t́ĥé d̂óĉúm̂én̂t́'ŝ ÚR̂Ĺ. Êŕr̂ór̂ ḿêśŝáĝé: '{manifestWarning}'." + }, "lighthouse-core/audits/performance-budget.js | columnOverBudget": { "message": "Ôv́êŕ B̂úd̂ǵêt́" }, @@ -803,6 +857,15 @@ "lighthouse-core/audits/performance-budget.js | title": { "message": "P̂ér̂f́ôŕm̂án̂ćê b́ûd́ĝét̂" }, + "lighthouse-core/audits/redirects-http.js | description": { + "message": "Îf́ ŷóû'v́ê ál̂ŕêád̂ý ŝét̂ úp̂ H́T̂T́P̂Ś, m̂ák̂é ŝúr̂é t̂h́ât́ ŷóû ŕêd́îŕêćt̂ ál̂ĺ ĤT́T̂Ṕ t̂ŕâf́f̂íĉ t́ô H́T̂T́P̂Ś. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/h́t̂t́p̂-ŕêd́îŕêćt̂ś-t̂ó-ĥt́t̂ṕŝ)." + }, + "lighthouse-core/audits/redirects-http.js | failureTitle": { + "message": "D̂óêś n̂ót̂ ŕêd́îŕêćt̂ H́T̂T́P̂ t́r̂áf̂f́îć t̂ó ĤT́T̂ṔŜ" + }, + "lighthouse-core/audits/redirects-http.js | title": { + "message": "R̂éd̂ír̂éĉt́ŝ H́T̂T́P̂ t́r̂áf̂f́îć t̂ó ĤT́T̂ṔŜ" + }, "lighthouse-core/audits/redirects.js | description": { "message": "R̂éd̂ír̂éĉt́ŝ ín̂t́r̂ód̂úĉé âd́d̂ít̂íôńâĺ d̂él̂áŷś b̂éf̂ór̂é t̂h́ê ṕâǵê ćâń b̂é l̂óâd́êd́. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/ŕêd́îŕêćt̂ś)." }, @@ -974,6 +1037,45 @@ "lighthouse-core/audits/seo/tap-targets.js | title": { "message": "T̂áp̂ t́âŕĝét̂ś âŕê śîźêd́ âṕp̂ŕôṕr̂íât́êĺŷ" }, + "lighthouse-core/audits/service-worker.js | description": { + "message": "T̂h́ê śêŕv̂íĉé ŵór̂ḱêŕ îś t̂h́ê t́êćĥńôĺôǵŷ t́ĥát̂ én̂áb̂ĺêś ŷóûŕ âṕp̂ t́ô úŝé m̂án̂ý P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂ f́êát̂úr̂éŝ, śûćĥ áŝ óf̂f́l̂ín̂é, âd́d̂ t́ô h́ôḿêśĉŕêén̂, án̂d́ p̂úŝh́ n̂ót̂íf̂íĉát̂íôńŝ. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/t́ôól̂ś/l̂íĝh́t̂h́ôúŝé/âúd̂ít̂ś/r̂éĝíŝt́êŕêd́-ŝér̂v́îćê-ẃôŕk̂ér̂)." + }, + "lighthouse-core/audits/service-worker.js | explanationBadManifest": { + "message": "T̂h́îś p̂áĝé îś ĉón̂t́r̂ól̂ĺêd́ b̂ý â śêŕv̂íĉé ŵór̂ḱêŕ, ĥóŵév̂ér̂ ńô śt̂ár̂t́_ûŕl̂ ẃâś f̂óûńd̂ b́êćâúŝé m̂án̂íf̂éŝt́ f̂áîĺêd́ t̂ó p̂ár̂śê áŝ v́âĺîd́ ĴŚÔŃ" + }, + "lighthouse-core/audits/service-worker.js | explanationBadStartUrl": { + "message": "T̂h́îś p̂áĝé îś ĉón̂t́r̂ól̂ĺêd́ b̂ý â śêŕv̂íĉé ŵór̂ḱêŕ, ĥóŵév̂ér̂ t́ĥé ŝt́âŕt̂_úr̂ĺ ({startUrl}) îś n̂ót̂ ín̂ t́ĥé ŝér̂v́îćê ẃôŕk̂ér̂'ś ŝćôṕê ({scopeUrl})" + }, + "lighthouse-core/audits/service-worker.js | explanationNoManifest": { + "message": "T̂h́îś p̂áĝé îś ĉón̂t́r̂ól̂ĺêd́ b̂ý â śêŕv̂íĉé ŵór̂ḱêŕ, ĥóŵév̂ér̂ ńô śt̂ár̂t́_ûŕl̂ ẃâś f̂óûńd̂ b́êćâúŝé n̂ó m̂án̂íf̂éŝt́ ŵáŝ f́êt́ĉh́êd́." + }, + "lighthouse-core/audits/service-worker.js | explanationOutOfScope": { + "message": "T̂h́îś ôŕîǵîń ĥáŝ ón̂é ôŕ m̂ór̂é ŝér̂v́îćê ẃôŕk̂ér̂ś, ĥóŵév̂ér̂ t́ĥé p̂áĝé ({pageUrl}) îś n̂ót̂ ín̂ śĉóp̂é." + }, + "lighthouse-core/audits/service-worker.js | failureTitle": { + "message": "D̂óêś n̂ót̂ ŕêǵîśt̂ér̂ á ŝér̂v́îćê ẃôŕk̂ér̂ t́ĥát̂ ćôńt̂ŕôĺŝ ṕâǵê án̂d́ ŝt́âŕt̂_úr̂ĺ" + }, + "lighthouse-core/audits/service-worker.js | title": { + "message": "R̂éĝíŝt́êŕŝ á ŝér̂v́îćê ẃôŕk̂ér̂ t́ĥát̂ ćôńt̂ŕôĺŝ ṕâǵê án̂d́ ŝt́âŕt̂_úr̂ĺ" + }, + "lighthouse-core/audits/splash-screen.js | description": { + "message": " t́ĥém̂éd̂ śp̂ĺâśĥ śĉŕêén̂ én̂śûŕêś â h́îǵĥ-q́ûál̂ít̂ý êx́p̂ér̂íêńĉé ŵh́êń ûśêŕŝ ĺâún̂ćĥ ýôúr̂ áp̂ṕ f̂ŕôḿ t̂h́êír̂ h́ôḿêśĉŕêén̂ś. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/ćûśt̂óm̂-śp̂ĺâśĥ-śĉŕêén̂)." + }, + "lighthouse-core/audits/splash-screen.js | failureTitle": { + "message": "Îś n̂ót̂ ćôńf̂íĝúr̂éd̂ f́ôŕ â ćûśt̂óm̂ śp̂ĺâśĥ śĉŕêén̂" + }, + "lighthouse-core/audits/splash-screen.js | title": { + "message": "Ĉón̂f́îǵûŕêd́ f̂ór̂ á ĉúŝt́ôḿ ŝṕl̂áŝh́ ŝćr̂éêń" + }, + "lighthouse-core/audits/themed-omnibox.js | description": { + "message": "T̂h́ê b́r̂óŵśêŕ âd́d̂ŕêśŝ b́âŕ ĉán̂ b́ê t́ĥém̂éd̂ t́ô ḿât́ĉh́ ŷóûŕ ŝít̂é. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/ád̂d́r̂éŝś-b̂ár̂)." + }, + "lighthouse-core/audits/themed-omnibox.js | failureTitle": { + "message": "D̂óêś n̂ót̂ śêt́ â t́ĥém̂é ĉól̂ór̂ f́ôŕ t̂h́ê ád̂d́r̂éŝś b̂ár̂." + }, + "lighthouse-core/audits/themed-omnibox.js | title": { + "message": "Ŝét̂ś â t́ĥém̂é ĉól̂ór̂ f́ôŕ t̂h́ê ád̂d́r̂éŝś b̂ár̂." + }, "lighthouse-core/audits/third-party-summary.js | columnMainThreadTime": { "message": "M̂áîń T̂h́r̂éâd́ T̂ím̂é" }, @@ -1040,6 +1142,42 @@ "lighthouse-core/audits/uses-rel-preload.js | title": { "message": "P̂ŕêĺôád̂ ḱêý r̂éq̂úêśt̂ś" }, + "lighthouse-core/audits/viewport.js | description": { + "message": "Âd́d̂ á v̂íêẃp̂ór̂t́ m̂ét̂á t̂áĝ t́ô óp̂t́îḿîźê ýôúr̂ áp̂ṕ f̂ór̂ ḿôb́îĺê śĉŕêén̂ś. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/h́âś-v̂íêẃp̂ór̂t́-m̂ét̂á-t̂áĝ)." + }, + "lighthouse-core/audits/viewport.js | explanationNoTag": { + "message": "N̂ó v̂íêẃp̂ór̂t́ m̂ét̂á t̂áĝ f́ôún̂d́" + }, + "lighthouse-core/audits/viewport.js | failureTitle": { + "message": "D̂óêś n̂ót̂ h́âv́ê á `` t̂áĝ ẃît́ĥ `ẃîd́t̂h́` ôŕ `îńît́îál̂-śĉál̂é`" + }, + "lighthouse-core/audits/viewport.js | title": { + "message": "Ĥáŝ á `` t̂áĝ ẃît́ĥ `ẃîd́t̂h́` ôŕ `îńît́îál̂-śĉál̂é`" + }, + "lighthouse-core/audits/without-javascript.js | description": { + "message": "Ŷóûŕ âṕp̂ śĥóûĺd̂ d́îśp̂ĺâý ŝóm̂é ĉón̂t́êńt̂ ẃĥén̂ J́âv́âŚĉŕîṕt̂ íŝ d́îśâb́l̂éd̂, év̂én̂ íf̂ ít̂'ś ĵúŝt́ â ẃâŕn̂ín̂ǵ t̂ó t̂h́ê úŝér̂ t́ĥát̂ J́âv́âŚĉŕîṕt̂ íŝ ŕêq́ûír̂éd̂ t́ô úŝé t̂h́ê áp̂ṕ. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/ńô-j́ŝ)." + }, + "lighthouse-core/audits/without-javascript.js | explanation": { + "message": "T̂h́ê ṕâǵê b́ôd́ŷ śĥóûĺd̂ ŕêńd̂ér̂ śôḿê ćôńt̂én̂t́ îf́ ît́ŝ śĉŕîṕt̂ś âŕê ńôt́ âv́âíl̂áb̂ĺê." + }, + "lighthouse-core/audits/without-javascript.js | failureTitle": { + "message": "D̂óêś n̂ót̂ ṕr̂óv̂íd̂é f̂ál̂ĺb̂áĉḱ ĉón̂t́êńt̂ ẃĥén̂ J́âv́âŚĉŕîṕt̂ íŝ ńôt́ âv́âíl̂áb̂ĺê" + }, + "lighthouse-core/audits/without-javascript.js | title": { + "message": "Ĉón̂t́âín̂ś ŝóm̂é ĉón̂t́êńt̂ ẃĥén̂ J́âv́âŚĉŕîṕt̂ íŝ ńôt́ âv́âíl̂áb̂ĺê" + }, + "lighthouse-core/audits/works-offline.js | description": { + "message": "Îf́ ŷóû'ŕê b́ûíl̂d́îńĝ á P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂, ćôńŝíd̂ér̂ úŝín̂ǵ â śêŕv̂íĉé ŵór̂ḱêŕ ŝó t̂h́ât́ ŷóûŕ âṕp̂ ćâń ŵór̂ḱ ôf́f̂ĺîńê. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/t́ôól̂ś/l̂íĝh́t̂h́ôúŝé/âúd̂ít̂ś/ĥt́t̂ṕ-200-ŵh́êń-ôf́f̂ĺîńê)." + }, + "lighthouse-core/audits/works-offline.js | failureTitle": { + "message": "Ĉúr̂ŕêńt̂ ṕâǵê d́ôéŝ ńôt́ r̂éŝṕôńd̂ ẃît́ĥ á 200 ŵh́êń ôf́f̂ĺîńê" + }, + "lighthouse-core/audits/works-offline.js | title": { + "message": "Ĉúr̂ŕêńt̂ ṕâǵê ŕêśp̂ón̂d́ŝ ẃît́ĥ á 200 ŵh́êń ôf́f̂ĺîńê" + }, + "lighthouse-core/audits/works-offline.js | warningNoLoad": { + "message": "T̂h́ê ṕâǵê ḿâý b̂é n̂ót̂ ĺôád̂ín̂ǵ ôf́f̂ĺîńê b́êćâúŝé ŷóûŕ t̂éŝt́ ÛŔL̂ ({requested}) ẃâś r̂éd̂ír̂éĉt́êd́ t̂ó \"{final}\". T̂ŕŷ t́êśt̂ín̂ǵ t̂h́ê śêćôńd̂ ÚR̂Ĺ d̂ír̂éĉt́l̂ý." + }, "lighthouse-core/config/default-config.js | a11yAriaGroupDescription": { "message": "T̂h́êśê ár̂é ôṕp̂ór̂t́ûńît́îéŝ t́ô ím̂ṕr̂óv̂é t̂h́ê úŝáĝé ôf́ ÂŔÎÁ îń ŷóûŕ âṕp̂ĺîćât́îón̂ ẃĥíĉh́ m̂áŷ én̂h́âńĉé t̂h́ê éx̂ṕêŕîén̂ćê f́ôŕ ûśêŕŝ óf̂ áŝśîśt̂ív̂é t̂éĉh́n̂ól̂óĝý, l̂ík̂é â śĉŕêén̂ ŕêád̂ér̂." }, @@ -1136,6 +1274,15 @@ "lighthouse-core/config/default-config.js | performanceCategoryTitle": { "message": "P̂ér̂f́ôŕm̂án̂ćê" }, + "lighthouse-core/config/default-config.js | pwaCategoryDescription": { + "message": "T̂h́êśê ćĥéĉḱŝ v́âĺîd́ât́ê t́ĥé âśp̂éĉt́ŝ óf̂ á P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/ṕr̂óĝŕêśŝív̂é-ŵéb̂-áp̂ṕŝ/ćĥéĉḱl̂íŝt́)." + }, + "lighthouse-core/config/default-config.js | pwaCategoryManualDescription": { + "message": "T̂h́êśê ćĥéĉḱŝ ár̂é r̂éq̂úîŕêd́ b̂ý t̂h́ê b́âśêĺîńê [ṔŴÁ Ĉh́êćk̂ĺîśt̂](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/p̂ŕôǵr̂éŝśîv́ê-ẃêb́-âṕp̂ś/ĉh́êćk̂ĺîśt̂) b́ût́ âŕê ńôt́ âút̂óm̂át̂íĉál̂ĺŷ ćĥéĉḱêd́ b̂ý L̂íĝh́t̂h́ôúŝé. T̂h́êý d̂ó n̂ót̂ áf̂f́êćt̂ ýôúr̂ śĉór̂é b̂út̂ ít̂'ś îḿp̂ór̂t́âńt̂ t́ĥát̂ ýôú v̂ér̂íf̂ý t̂h́êḿ m̂án̂úâĺl̂ý." + }, + "lighthouse-core/config/default-config.js | pwaCategoryTitle": { + "message": "P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂" + }, "lighthouse-core/config/default-config.js | pwaFastReliableGroupTitle": { "message": "F̂áŝt́ âńd̂ ŕêĺîáb̂ĺê" }, From e802f1a61ff16d5a77fcbfc14b20c5775e1cb202 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 24 Jul 2019 18:26:51 -0700 Subject: [PATCH 10/24] update descriptions with examples --- lighthouse-core/audits/content-width.js | 6 +- lighthouse-core/audits/offline-start-url.js | 5 +- lighthouse-core/audits/service-worker.js | 11 +- lighthouse-core/audits/works-offline.js | 6 +- lighthouse-core/lib/i18n/locales/en-US.json | 147 ++++++++++++++++++++ lighthouse-core/lib/i18n/locales/en-XL.json | 34 ++--- 6 files changed, 187 insertions(+), 22 deletions(-) diff --git a/lighthouse-core/audits/content-width.js b/lighthouse-core/audits/content-width.js index b75f3bff92e2..1cd638d6b29b 100644 --- a/lighthouse-core/audits/content-width.js +++ b/lighthouse-core/audits/content-width.js @@ -17,7 +17,11 @@ const UIStrings = { description: 'If the width of your app\'s content doesn\'t match the width ' + 'of the viewport, your app might not be optimized for mobile screens. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).', - /** Explanatory message stating that the viewport size and window size differ. */ + /** + * @description Explanatory message stating that the viewport size and window size differ. + * @example {100} innerWidth + * @example {101} outerWidth + * */ explanation: 'The viewport size of {innerWidth}px does not match the window ' + 'size of {outerWidth}px.', }; diff --git a/lighthouse-core/audits/offline-start-url.js b/lighthouse-core/audits/offline-start-url.js index 981a43ae6873..3c9f32d710e3 100644 --- a/lighthouse-core/audits/offline-start-url.js +++ b/lighthouse-core/audits/offline-start-url.js @@ -16,7 +16,10 @@ const UIStrings = { /** Description of a Lighthouse audit that tells the user why the start_url should respond when requested offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'A service worker enables your web app to be reliable in unpredictable ' + 'network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', - /** Warning that the audit couldn't find the start_url and used the page's URL instead. */ + /** + * @description Warning that the audit couldn't find the start_url and used the page's URL instead. + * @example {No Manifest Fetched.} manifestWarning + * */ warningCantStart: 'We couldn\'t read the start_url from the manifest. As a result, the ' + 'start_url was assumed to be the document\'s URL. Error message: \'{manifestWarning}\'.', }; diff --git a/lighthouse-core/audits/service-worker.js b/lighthouse-core/audits/service-worker.js index b69045f8a11f..a1d3c778fa43 100644 --- a/lighthouse-core/audits/service-worker.js +++ b/lighthouse-core/audits/service-worker.js @@ -18,7 +18,10 @@ const UIStrings = { description: 'The service worker is the technology that enables your app to use many ' + 'Progressive Web App features, such as offline, add to homescreen, and push ' + 'notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).', - /** Explanatory message stating that the page has multiple, or out of scope service workers. */ + /** + * @description Explanatory message stating that the page has multiple, or out of scope service workers. + * @example {https://example.com/} pageUrl + * */ explanationOutOfScope: 'This origin has one or more service workers, however the page ' + '({pageUrl}) is not in scope.', /** Explanatory message stating that the page has no manifest. */ @@ -27,7 +30,11 @@ const UIStrings = { /** Explanatory message stating that the page's manifest is invalid. */ explanationBadManifest: 'This page is controlled by a service worker, however ' + 'no start_url was found because manifest failed to parse as valid JSON', - /** Explanatory message stating that the manifest's start_url is not in scope, and therefor invalid. */ + /** + * @description Explanatory message stating that the manifest's start_url is not in scope, and therefor invalid. + * @example {https://example2.com/} startUrl + * @example {https://example.com/} scopeUrl + * */ explanationBadStartUrl: 'This page is controlled by a service worker, however ' + 'the start_url ({startUrl}) is not in the service worker\'s scope ({scopeUrl})', }; diff --git a/lighthouse-core/audits/works-offline.js b/lighthouse-core/audits/works-offline.js index 6b3cc4cfef6d..f247ff82fdd2 100644 --- a/lighthouse-core/audits/works-offline.js +++ b/lighthouse-core/audits/works-offline.js @@ -18,7 +18,11 @@ const UIStrings = { description: 'If you\'re building a Progressive Web App, consider using a service worker ' + 'so that your app can work offline. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', - /** Warning that the page redirected during offline load and that may affect offline testing. */ + /** + * @description Warning that the page redirected during offline load and that may affect offline testing. + * @example {https://example.com/requested/page} requested + * @example {https://example.com/final/resolved/page} final + * */ warningNoLoad: 'The page may be not loading offline because your test URL ' + `({requested}) was redirected to "{final}". ` + 'Try testing the second URL directly.', diff --git a/lighthouse-core/lib/i18n/locales/en-US.json b/lighthouse-core/lib/i18n/locales/en-US.json index cd8d17f1a0fc..5bf71ab41114 100644 --- a/lighthouse-core/lib/i18n/locales/en-US.json +++ b/lighthouse-core/lib/i18n/locales/en-US.json @@ -440,6 +440,18 @@ "lighthouse-core/audits/byte-efficiency/uses-webp-images.js | title": { "message": "Serve images in next-gen formats" }, + "lighthouse-core/audits/content-width.js | description": { + "message": "If the width of your app's content doesn't match the width of the viewport, your app might not be optimized for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport)." + }, + "lighthouse-core/audits/content-width.js | explanation": { + "message": "The viewport size of {innerWidth}px does not match the window size of {outerWidth}px." + }, + "lighthouse-core/audits/content-width.js | failureTitle": { + "message": "Content is not sized correctly for the viewport" + }, + "lighthouse-core/audits/content-width.js | title": { + "message": "Content is sized correctly for the viewport" + }, "lighthouse-core/audits/critical-request-chains.js | description": { "message": "The Critical Request Chains below show you what resources are loaded with a high priority. Consider reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/critical-request-chains)." }, @@ -692,6 +704,15 @@ "lighthouse-core/audits/image-aspect-ratio.js | warningCompute": { "message": "Invalid image sizing information {url}" }, + "lighthouse-core/audits/installable-manifest.js | description": { + "message": "Browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/install-prompt)." + }, + "lighthouse-core/audits/installable-manifest.js | failureTitle": { + "message": "Web app manifest does not meet the installability requirements" + }, + "lighthouse-core/audits/installable-manifest.js | title": { + "message": "Web app manifest meets the installability requirements" + }, "lighthouse-core/audits/is-on-https.js | columnInsecureURL": { "message": "Insecure URL" }, @@ -716,6 +737,9 @@ "lighthouse-core/audits/load-fast-enough-for-pwa.js | displayValueTextWithOverride": { "message": "Interactive on simulated mobile network at {timeInMs, number, seconds} s" }, + "lighthouse-core/audits/load-fast-enough-for-pwa.js | explanationLoadSlow": { + "message": "Your page loads too slowly and is not interactive within 10 seconds. Look at the opportunities and diagnostics in the \"Performance\" section to learn how to improve." + }, "lighthouse-core/audits/load-fast-enough-for-pwa.js | failureTitle": { "message": "Page load is not fast enough on mobile networks" }, @@ -734,6 +758,24 @@ "lighthouse-core/audits/mainthread-work-breakdown.js | title": { "message": "Minimizes main-thread work" }, + "lighthouse-core/audits/manual/pwa-cross-browser.js | description": { + "message": "To reach the most number of users, sites should work across every major browser. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#site-works-cross-browser)." + }, + "lighthouse-core/audits/manual/pwa-cross-browser.js | title": { + "message": "Site works cross-browser" + }, + "lighthouse-core/audits/manual/pwa-each-page-has-url.js | description": { + "message": "Ensure individual pages are deep linkable via the URLs and that URLs are unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url)." + }, + "lighthouse-core/audits/manual/pwa-each-page-has-url.js | title": { + "message": "Each page has a URL" + }, + "lighthouse-core/audits/manual/pwa-page-transitions.js | description": { + "message": "Transitions should feel snappy as you tap around, even on a slow network, a key to perceived performance. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network)." + }, + "lighthouse-core/audits/manual/pwa-page-transitions.js | title": { + "message": "Page transitions don't feel like they block on the network" + }, "lighthouse-core/audits/metrics/estimated-input-latency.js | description": { "message": "Estimated Input Latency is an estimate of how long your app takes to respond to user input, in milliseconds, during the busiest 5s window of page load. If your latency is higher than 50 ms, users may perceive your app as laggy. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/estimated-input-latency)." }, @@ -794,6 +836,18 @@ "lighthouse-core/audits/network-server-latency.js | title": { "message": "Server Backend Latencies" }, + "lighthouse-core/audits/offline-start-url.js | description": { + "message": "A service worker enables your web app to be reliable in unpredictable network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline)." + }, + "lighthouse-core/audits/offline-start-url.js | failureTitle": { + "message": "start_url does not respond with a 200 when offline" + }, + "lighthouse-core/audits/offline-start-url.js | title": { + "message": "start_url responds with a 200 when offline" + }, + "lighthouse-core/audits/offline-start-url.js | warningCantStart": { + "message": "We couldn't read the start_url from the manifest. As a result, the start_url was assumed to be the document's URL. Error message: '{manifestWarning}'." + }, "lighthouse-core/audits/performance-budget.js | columnOverBudget": { "message": "Over Budget" }, @@ -806,6 +860,15 @@ "lighthouse-core/audits/performance-budget.js | title": { "message": "Performance budget" }, + "lighthouse-core/audits/redirects-http.js | description": { + "message": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https)." + }, + "lighthouse-core/audits/redirects-http.js | failureTitle": { + "message": "Does not redirect HTTP traffic to HTTPS" + }, + "lighthouse-core/audits/redirects-http.js | title": { + "message": "Redirects HTTP traffic to HTTPS" + }, "lighthouse-core/audits/redirects.js | description": { "message": "Redirects introduce additional delays before the page can be loaded. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/redirects)." }, @@ -971,6 +1034,45 @@ "lighthouse-core/audits/seo/tap-targets.js | title": { "message": "Tap targets are sized appropriately" }, + "lighthouse-core/audits/service-worker.js | description": { + "message": "The service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker)." + }, + "lighthouse-core/audits/service-worker.js | explanationBadManifest": { + "message": "This page is controlled by a service worker, however no start_url was found because manifest failed to parse as valid JSON" + }, + "lighthouse-core/audits/service-worker.js | explanationBadStartUrl": { + "message": "This page is controlled by a service worker, however the start_url ({startUrl}) is not in the service worker's scope ({scopeUrl})" + }, + "lighthouse-core/audits/service-worker.js | explanationNoManifest": { + "message": "This page is controlled by a service worker, however no start_url was found because no manifest was fetched." + }, + "lighthouse-core/audits/service-worker.js | explanationOutOfScope": { + "message": "This origin has one or more service workers, however the page ({pageUrl}) is not in scope." + }, + "lighthouse-core/audits/service-worker.js | failureTitle": { + "message": "Does not register a service worker that controls page and start_url" + }, + "lighthouse-core/audits/service-worker.js | title": { + "message": "Registers a service worker that controls page and start_url" + }, + "lighthouse-core/audits/splash-screen.js | description": { + "message": "A themed splash screen ensures a high-quality experience when users launch your app from their homescreens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen)." + }, + "lighthouse-core/audits/splash-screen.js | failureTitle": { + "message": "Is not configured for a custom splash screen" + }, + "lighthouse-core/audits/splash-screen.js | title": { + "message": "Configured for a custom splash screen" + }, + "lighthouse-core/audits/themed-omnibox.js | description": { + "message": "The browser address bar can be themed to match your site. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar)." + }, + "lighthouse-core/audits/themed-omnibox.js | failureTitle": { + "message": "Does not set a theme color for the address bar." + }, + "lighthouse-core/audits/themed-omnibox.js | title": { + "message": "Sets a theme color for the address bar." + }, "lighthouse-core/audits/third-party-summary.js | columnMainThreadTime": { "message": "Main Thread Time" }, @@ -1034,6 +1136,42 @@ "lighthouse-core/audits/uses-rel-preload.js | title": { "message": "Preload key requests" }, + "lighthouse-core/audits/viewport.js | description": { + "message": "Add a viewport meta tag to optimize your app for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag)." + }, + "lighthouse-core/audits/viewport.js | explanationNoTag": { + "message": "No viewport meta tag found" + }, + "lighthouse-core/audits/viewport.js | failureTitle": { + "message": "Does not have a `` tag with `width` or `initial-scale`" + }, + "lighthouse-core/audits/viewport.js | title": { + "message": "Has a `` tag with `width` or `initial-scale`" + }, + "lighthouse-core/audits/without-javascript.js | description": { + "message": "Your app should display some content when JavaScript is disabled, even if it's just a warning to the user that JavaScript is required to use the app. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/no-js)." + }, + "lighthouse-core/audits/without-javascript.js | explanation": { + "message": "The page body should render some content if its scripts are not available." + }, + "lighthouse-core/audits/without-javascript.js | failureTitle": { + "message": "Does not provide fallback content when JavaScript is not available" + }, + "lighthouse-core/audits/without-javascript.js | title": { + "message": "Contains some content when JavaScript is not available" + }, + "lighthouse-core/audits/works-offline.js | description": { + "message": "If you're building a Progressive Web App, consider using a service worker so that your app can work offline. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline)." + }, + "lighthouse-core/audits/works-offline.js | failureTitle": { + "message": "Current page does not respond with a 200 when offline" + }, + "lighthouse-core/audits/works-offline.js | title": { + "message": "Current page responds with a 200 when offline" + }, + "lighthouse-core/audits/works-offline.js | warningNoLoad": { + "message": "The page may be not loading offline because your test URL ({requested}) was redirected to \"{final}\". Try testing the second URL directly." + }, "lighthouse-core/config/default-config.js | a11yAriaGroupDescription": { "message": "These are opportunities to improve the usage of ARIA in your application which may enhance the experience for users of assistive technology, like a screen reader." }, @@ -1130,6 +1268,15 @@ "lighthouse-core/config/default-config.js | performanceCategoryTitle": { "message": "Performance" }, + "lighthouse-core/config/default-config.js | pwaCategoryDescription": { + "message": "These checks validate the aspects of a Progressive Web App. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist)." + }, + "lighthouse-core/config/default-config.js | pwaCategoryManualDescription": { + "message": "These checks are required by the baseline [PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are not automatically checked by Lighthouse. They do not affect your score but it's important that you verify them manually." + }, + "lighthouse-core/config/default-config.js | pwaCategoryTitle": { + "message": "Progressive Web App" + }, "lighthouse-core/config/default-config.js | pwaFastReliableGroupTitle": { "message": "Fast and reliable" }, diff --git a/lighthouse-core/lib/i18n/locales/en-XL.json b/lighthouse-core/lib/i18n/locales/en-XL.json index 626bb0de2a52..3ce5b9e7a7fd 100644 --- a/lighthouse-core/lib/i18n/locales/en-XL.json +++ b/lighthouse-core/lib/i18n/locales/en-XL.json @@ -441,7 +441,7 @@ "message": "Ŝér̂v́ê ím̂áĝéŝ ín̂ ńêx́t̂-ǵêń f̂ór̂ḿât́ŝ" }, "lighthouse-core/audits/content-width.js | description": { - "message": "Îf́ t̂h́ê ẃîd́t̂h́ ôf́ ŷóûŕ âṕp̂'ś ĉón̂t́êńt̂ d́ôéŝń't̂ ḿât́ĉh́ t̂h́ê ẃîd́t̂h́ ôf́ t̂h́ê v́îéŵṕôŕt̂, ýôúr̂ áp̂ṕ m̂íĝh́t̂ ńôt́ b̂é ôṕt̂ím̂íẑéd̂ f́ôŕ m̂ób̂íl̂é ŝćr̂éêńŝ. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/t́ôól̂ś/l̂íĝh́t̂h́ôúŝé/âúd̂ít̂ś/ĉón̂t́êńt̂-śîźêd́-ĉór̂ŕêćt̂ĺŷ-f́ôŕ-v̂íêẃp̂ór̂t́)." + "message": "Îf́ t̂h́ê ẃîd́t̂h́ ôf́ ŷóûŕ âṕp̂'ś ĉón̂t́êńt̂ d́ôéŝń't̂ ḿât́ĉh́ t̂h́ê ẃîd́t̂h́ ôf́ t̂h́ê v́îéŵṕôŕt̂, ýôúr̂ áp̂ṕ m̂íĝh́t̂ ńôt́ b̂é ôṕt̂ím̂íẑéd̂ f́ôŕ m̂ób̂íl̂é ŝćr̂éêńŝ. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport)." }, "lighthouse-core/audits/content-width.js | explanation": { "message": "T̂h́ê v́îéŵṕôŕt̂ śîźê óf̂ {innerWidth}ṕx̂ d́ôéŝ ńôt́ m̂át̂ćĥ t́ĥé ŵín̂d́ôẃ ŝíẑé ôf́ {outerWidth}p̂x́." @@ -705,7 +705,7 @@ "message": "Îńv̂ál̂íd̂ ím̂áĝé ŝíẑín̂ǵ îńf̂ór̂ḿât́îón̂ {url}" }, "lighthouse-core/audits/installable-manifest.js | description": { - "message": "B̂ŕôẃŝér̂ś ĉán̂ ṕr̂óâćt̂ív̂él̂ý p̂ŕôḿp̂t́ ûśêŕŝ t́ô ád̂d́ ŷóûŕ âṕp̂ t́ô t́ĥéîŕ ĥóm̂éŝćr̂éêń, ŵh́îćĥ ćâń l̂éâd́ t̂ó ĥíĝh́êŕ êńĝáĝém̂én̂t́. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/ín̂śt̂ál̂ĺ-p̂ŕôḿp̂t́)." + "message": "B̂ŕôẃŝér̂ś ĉán̂ ṕr̂óâćt̂ív̂él̂ý p̂ŕôḿp̂t́ ûśêŕŝ t́ô ád̂d́ ŷóûŕ âṕp̂ t́ô t́ĥéîŕ ĥóm̂éŝćr̂éêń, ŵh́îćĥ ćâń l̂éâd́ t̂ó ĥíĝh́êŕ êńĝáĝém̂én̂t́. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/tools/lighthouse/audits/install-prompt)." }, "lighthouse-core/audits/installable-manifest.js | failureTitle": { "message": "Ŵéb̂ áp̂ṕ m̂án̂íf̂éŝt́ d̂óêś n̂ót̂ ḿêét̂ t́ĥé îńŝt́âĺl̂áb̂íl̂ít̂ý r̂éq̂úîŕêḿêńt̂ś" @@ -759,19 +759,19 @@ "message": "M̂ín̂ím̂íẑéŝ ḿâín̂-t́ĥŕêád̂ ẃôŕk̂" }, "lighthouse-core/audits/manual/pwa-cross-browser.js | description": { - "message": "T̂ó r̂éâćĥ t́ĥé m̂óŝt́ n̂úm̂b́êŕ ôf́ ûśêŕŝ, śît́êś ŝh́ôúl̂d́ ŵór̂ḱ âćr̂óŝś êv́êŕŷ ḿâj́ôŕ b̂ŕôẃŝér̂. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/ṕr̂óĝŕêśŝív̂é-ŵéb̂-áp̂ṕŝ/ćĥéĉḱl̂íŝt́#ŝít̂é-ŵór̂ḱŝ-ćr̂óŝś-b̂ŕôẃŝér̂)." + "message": "T̂ó r̂éâćĥ t́ĥé m̂óŝt́ n̂úm̂b́êŕ ôf́ ûśêŕŝ, śît́êś ŝh́ôúl̂d́ ŵór̂ḱ âćr̂óŝś êv́êŕŷ ḿâj́ôŕ b̂ŕôẃŝér̂. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/progressive-web-apps/checklist#site-works-cross-browser)." }, "lighthouse-core/audits/manual/pwa-cross-browser.js | title": { "message": "Ŝít̂é ŵór̂ḱŝ ćr̂óŝś-b̂ŕôẃŝér̂" }, "lighthouse-core/audits/manual/pwa-each-page-has-url.js | description": { - "message": "Êńŝúr̂é îńd̂ív̂íd̂úâĺ p̂áĝéŝ ár̂é d̂éêṕ l̂ín̂ḱâb́l̂é v̂íâ t́ĥé ÛŔL̂ś âńd̂ t́ĥát̂ ÚR̂Ĺŝ ár̂é ûńîq́ûé f̂ór̂ t́ĥé p̂úr̂ṕôśê óf̂ śĥár̂éâb́îĺît́ŷ ón̂ śôćîál̂ ḿêd́îá. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/p̂ŕôǵr̂éŝśîv́ê-ẃêb́-âṕp̂ś/ĉh́êćk̂ĺîśt̂#éâćĥ-ṕâǵê-h́âś-â-úr̂ĺ)." + "message": "Êńŝúr̂é îńd̂ív̂íd̂úâĺ p̂áĝéŝ ár̂é d̂éêṕ l̂ín̂ḱâb́l̂é v̂íâ t́ĥé ÛŔL̂ś âńd̂ t́ĥát̂ ÚR̂Ĺŝ ár̂é ûńîq́ûé f̂ór̂ t́ĥé p̂úr̂ṕôśê óf̂ śĥár̂éâb́îĺît́ŷ ón̂ śôćîál̂ ḿêd́îá. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url)." }, "lighthouse-core/audits/manual/pwa-each-page-has-url.js | title": { "message": "Êáĉh́ p̂áĝé ĥáŝ á ÛŔL̂" }, "lighthouse-core/audits/manual/pwa-page-transitions.js | description": { - "message": "T̂ŕâńŝít̂íôńŝ śĥóûĺd̂ f́êél̂ śn̂áp̂ṕŷ áŝ ýôú t̂áp̂ ár̂óûńd̂, év̂én̂ ón̂ á ŝĺôẃ n̂ét̂ẃôŕk̂, á k̂éŷ t́ô ṕêŕĉéîv́êd́ p̂ér̂f́ôŕm̂án̂ćê. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/ṕr̂óĝŕêśŝív̂é-ŵéb̂-áp̂ṕŝ/ćĥéĉḱl̂íŝt́#p̂áĝé-t̂ŕâńŝít̂íôńŝ-d́ôńt̂-f́êél̂-ĺîḱê-t́ĥéŷ-b́l̂óĉḱ-ôń-t̂h́ê-ńêt́ŵór̂ḱ)." + "message": "T̂ŕâńŝít̂íôńŝ śĥóûĺd̂ f́êél̂ śn̂áp̂ṕŷ áŝ ýôú t̂áp̂ ár̂óûńd̂, év̂én̂ ón̂ á ŝĺôẃ n̂ét̂ẃôŕk̂, á k̂éŷ t́ô ṕêŕĉéîv́êd́ p̂ér̂f́ôŕm̂án̂ćê. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network)." }, "lighthouse-core/audits/manual/pwa-page-transitions.js | title": { "message": "P̂áĝé t̂ŕâńŝít̂íôńŝ d́ôń't̂ f́êél̂ ĺîḱê t́ĥéŷ b́l̂óĉḱ ôń t̂h́ê ńêt́ŵór̂ḱ" @@ -837,7 +837,7 @@ "message": "Ŝér̂v́êŕ B̂áĉḱêńd̂ Ĺât́êńĉíêś" }, "lighthouse-core/audits/offline-start-url.js | description": { - "message": " śêŕv̂íĉé ŵór̂ḱêŕ êńâb́l̂éŝ ýôúr̂ ẃêb́ âṕp̂ t́ô b́ê ŕêĺîáb̂ĺê ín̂ ún̂ṕr̂éd̂íĉt́âb́l̂é n̂ét̂ẃôŕk̂ ćôńd̂ít̂íôńŝ. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/t́ôól̂ś/l̂íĝh́t̂h́ôúŝé/âúd̂ít̂ś/ĥt́t̂ṕ-200-ŵh́êń-ôf́f̂ĺîńê)." + "message": " śêŕv̂íĉé ŵór̂ḱêŕ êńâb́l̂éŝ ýôúr̂ ẃêb́ âṕp̂ t́ô b́ê ŕêĺîáb̂ĺê ín̂ ún̂ṕr̂éd̂íĉt́âb́l̂é n̂ét̂ẃôŕk̂ ćôńd̂ít̂íôńŝ. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline)." }, "lighthouse-core/audits/offline-start-url.js | failureTitle": { "message": "ŝt́âŕt̂_úr̂ĺ d̂óêś n̂ót̂ ŕêśp̂ón̂d́ ŵít̂h́ â 200 ẃĥén̂ óf̂f́l̂ín̂é" @@ -861,7 +861,7 @@ "message": "P̂ér̂f́ôŕm̂án̂ćê b́ûd́ĝét̂" }, "lighthouse-core/audits/redirects-http.js | description": { - "message": "Îf́ ŷóû'v́ê ál̂ŕêád̂ý ŝét̂ úp̂ H́T̂T́P̂Ś, m̂ák̂é ŝúr̂é t̂h́ât́ ŷóû ŕêd́îŕêćt̂ ál̂ĺ ĤT́T̂Ṕ t̂ŕâf́f̂íĉ t́ô H́T̂T́P̂Ś. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/h́t̂t́p̂-ŕêd́îŕêćt̂ś-t̂ó-ĥt́t̂ṕŝ)." + "message": "Îf́ ŷóû'v́ê ál̂ŕêád̂ý ŝét̂ úp̂ H́T̂T́P̂Ś, m̂ák̂é ŝúr̂é t̂h́ât́ ŷóû ŕêd́îŕêćt̂ ál̂ĺ ĤT́T̂Ṕ t̂ŕâf́f̂íĉ t́ô H́T̂T́P̂Ś. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https)." }, "lighthouse-core/audits/redirects-http.js | failureTitle": { "message": "D̂óêś n̂ót̂ ŕêd́îŕêćt̂ H́T̂T́P̂ t́r̂áf̂f́îć t̂ó ĤT́T̂ṔŜ" @@ -1035,7 +1035,7 @@ "message": "T̂áp̂ t́âŕĝét̂ś âŕê śîźêd́ âṕp̂ŕôṕr̂íât́êĺŷ" }, "lighthouse-core/audits/service-worker.js | description": { - "message": "T̂h́ê śêŕv̂íĉé ŵór̂ḱêŕ îś t̂h́ê t́êćĥńôĺôǵŷ t́ĥát̂ én̂áb̂ĺêś ŷóûŕ âṕp̂ t́ô úŝé m̂án̂ý P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂ f́êát̂úr̂éŝ, śûćĥ áŝ óf̂f́l̂ín̂é, âd́d̂ t́ô h́ôḿêśĉŕêén̂, án̂d́ p̂úŝh́ n̂ót̂íf̂íĉát̂íôńŝ. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/t́ôól̂ś/l̂íĝh́t̂h́ôúŝé/âúd̂ít̂ś/r̂éĝíŝt́êŕêd́-ŝér̂v́îćê-ẃôŕk̂ér̂)." + "message": "T̂h́ê śêŕv̂íĉé ŵór̂ḱêŕ îś t̂h́ê t́êćĥńôĺôǵŷ t́ĥát̂ én̂áb̂ĺêś ŷóûŕ âṕp̂ t́ô úŝé m̂án̂ý P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂ f́êát̂úr̂éŝ, śûćĥ áŝ óf̂f́l̂ín̂é, âd́d̂ t́ô h́ôḿêśĉŕêén̂, án̂d́ p̂úŝh́ n̂ót̂íf̂íĉát̂íôńŝ. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker)." }, "lighthouse-core/audits/service-worker.js | explanationBadManifest": { "message": "T̂h́îś p̂áĝé îś ĉón̂t́r̂ól̂ĺêd́ b̂ý â śêŕv̂íĉé ŵór̂ḱêŕ, ĥóŵév̂ér̂ ńô śt̂ár̂t́_ûŕl̂ ẃâś f̂óûńd̂ b́êćâúŝé m̂án̂íf̂éŝt́ f̂áîĺêd́ t̂ó p̂ár̂śê áŝ v́âĺîd́ ĴŚÔŃ" @@ -1056,7 +1056,7 @@ "message": "R̂éĝíŝt́êŕŝ á ŝér̂v́îćê ẃôŕk̂ér̂ t́ĥát̂ ćôńt̂ŕôĺŝ ṕâǵê án̂d́ ŝt́âŕt̂_úr̂ĺ" }, "lighthouse-core/audits/splash-screen.js | description": { - "message": " t́ĥém̂éd̂ śp̂ĺâśĥ śĉŕêén̂ én̂śûŕêś â h́îǵĥ-q́ûál̂ít̂ý êx́p̂ér̂íêńĉé ŵh́êń ûśêŕŝ ĺâún̂ćĥ ýôúr̂ áp̂ṕ f̂ŕôḿ t̂h́êír̂ h́ôḿêśĉŕêén̂ś. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/ćûśt̂óm̂-śp̂ĺâśĥ-śĉŕêén̂)." + "message": " t́ĥém̂éd̂ śp̂ĺâśĥ śĉŕêén̂ én̂śûŕêś â h́îǵĥ-q́ûál̂ít̂ý êx́p̂ér̂íêńĉé ŵh́êń ûśêŕŝ ĺâún̂ćĥ ýôúr̂ áp̂ṕ f̂ŕôḿ t̂h́êír̂ h́ôḿêśĉŕêén̂ś. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen)." }, "lighthouse-core/audits/splash-screen.js | failureTitle": { "message": "Îś n̂ót̂ ćôńf̂íĝúr̂éd̂ f́ôŕ â ćûśt̂óm̂ śp̂ĺâśĥ śĉŕêén̂" @@ -1065,7 +1065,7 @@ "message": "Ĉón̂f́îǵûŕêd́ f̂ór̂ á ĉúŝt́ôḿ ŝṕl̂áŝh́ ŝćr̂éêń" }, "lighthouse-core/audits/themed-omnibox.js | description": { - "message": "T̂h́ê b́r̂óŵśêŕ âd́d̂ŕêśŝ b́âŕ ĉán̂ b́ê t́ĥém̂éd̂ t́ô ḿât́ĉh́ ŷóûŕ ŝít̂é. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/ád̂d́r̂éŝś-b̂ár̂)." + "message": "T̂h́ê b́r̂óŵśêŕ âd́d̂ŕêśŝ b́âŕ ĉán̂ b́ê t́ĥém̂éd̂ t́ô ḿât́ĉh́ ŷóûŕ ŝít̂é. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/tools/lighthouse/audits/address-bar)." }, "lighthouse-core/audits/themed-omnibox.js | failureTitle": { "message": "D̂óêś n̂ót̂ śêt́ â t́ĥém̂é ĉól̂ór̂ f́ôŕ t̂h́ê ád̂d́r̂éŝś b̂ár̂." @@ -1137,19 +1137,19 @@ "message": "P̂ŕêĺôád̂ ḱêý r̂éq̂úêśt̂ś" }, "lighthouse-core/audits/viewport.js | description": { - "message": "Âd́d̂ á v̂íêẃp̂ór̂t́ m̂ét̂á t̂áĝ t́ô óp̂t́îḿîźê ýôúr̂ áp̂ṕ f̂ór̂ ḿôb́îĺê śĉŕêén̂ś. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/h́âś-v̂íêẃp̂ór̂t́-m̂ét̂á-t̂áĝ)." + "message": "Âd́d̂ á v̂íêẃp̂ór̂t́ m̂ét̂á t̂áĝ t́ô óp̂t́îḿîźê ýôúr̂ áp̂ṕ f̂ór̂ ḿôb́îĺê śĉŕêén̂ś. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag)." }, "lighthouse-core/audits/viewport.js | explanationNoTag": { "message": "N̂ó v̂íêẃp̂ór̂t́ m̂ét̂á t̂áĝ f́ôún̂d́" }, "lighthouse-core/audits/viewport.js | failureTitle": { - "message": "D̂óêś n̂ót̂ h́âv́ê á `` t̂áĝ ẃît́ĥ `ẃîd́t̂h́` ôŕ `îńît́îál̂-śĉál̂é`" + "message": "D̂óêś n̂ót̂ h́âv́ê á `` t̂áĝ ẃît́ĥ `width` ór̂ `initial-scale`" }, "lighthouse-core/audits/viewport.js | title": { - "message": "Ĥáŝ á `` t̂áĝ ẃît́ĥ `ẃîd́t̂h́` ôŕ `îńît́îál̂-śĉál̂é`" + "message": "Ĥáŝ á `` t̂áĝ ẃît́ĥ `width` ór̂ `initial-scale`" }, "lighthouse-core/audits/without-javascript.js | description": { - "message": "Ŷóûŕ âṕp̂ śĥóûĺd̂ d́îśp̂ĺâý ŝóm̂é ĉón̂t́êńt̂ ẃĥén̂ J́âv́âŚĉŕîṕt̂ íŝ d́îśâb́l̂éd̂, év̂én̂ íf̂ ít̂'ś ĵúŝt́ â ẃâŕn̂ín̂ǵ t̂ó t̂h́ê úŝér̂ t́ĥát̂ J́âv́âŚĉŕîṕt̂ íŝ ŕêq́ûír̂éd̂ t́ô úŝé t̂h́ê áp̂ṕ. [L̂éâŕn̂ ḿôŕê](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/t̂óôĺŝ/ĺîǵĥt́ĥóûśê/áûd́ît́ŝ/ńô-j́ŝ)." + "message": "Ŷóûŕ âṕp̂ śĥóûĺd̂ d́îśp̂ĺâý ŝóm̂é ĉón̂t́êńt̂ ẃĥén̂ J́âv́âŚĉŕîṕt̂ íŝ d́îśâb́l̂éd̂, év̂én̂ íf̂ ít̂'ś ĵúŝt́ â ẃâŕn̂ín̂ǵ t̂ó t̂h́ê úŝér̂ t́ĥát̂ J́âv́âŚĉŕîṕt̂ íŝ ŕêq́ûír̂éd̂ t́ô úŝé t̂h́ê áp̂ṕ. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/tools/lighthouse/audits/no-js)." }, "lighthouse-core/audits/without-javascript.js | explanation": { "message": "T̂h́ê ṕâǵê b́ôd́ŷ śĥóûĺd̂ ŕêńd̂ér̂ śôḿê ćôńt̂én̂t́ îf́ ît́ŝ śĉŕîṕt̂ś âŕê ńôt́ âv́âíl̂áb̂ĺê." @@ -1161,7 +1161,7 @@ "message": "Ĉón̂t́âín̂ś ŝóm̂é ĉón̂t́êńt̂ ẃĥén̂ J́âv́âŚĉŕîṕt̂ íŝ ńôt́ âv́âíl̂áb̂ĺê" }, "lighthouse-core/audits/works-offline.js | description": { - "message": "Îf́ ŷóû'ŕê b́ûíl̂d́îńĝ á P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂, ćôńŝíd̂ér̂ úŝín̂ǵ â śêŕv̂íĉé ŵór̂ḱêŕ ŝó t̂h́ât́ ŷóûŕ âṕp̂ ćâń ŵór̂ḱ ôf́f̂ĺîńê. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/t́ôól̂ś/l̂íĝh́t̂h́ôúŝé/âúd̂ít̂ś/ĥt́t̂ṕ-200-ŵh́êń-ôf́f̂ĺîńê)." + "message": "Îf́ ŷóû'ŕê b́ûíl̂d́îńĝ á P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂, ćôńŝíd̂ér̂ úŝín̂ǵ â śêŕv̂íĉé ŵór̂ḱêŕ ŝó t̂h́ât́ ŷóûŕ âṕp̂ ćâń ŵór̂ḱ ôf́f̂ĺîńê. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline)." }, "lighthouse-core/audits/works-offline.js | failureTitle": { "message": "Ĉúr̂ŕêńt̂ ṕâǵê d́ôéŝ ńôt́ r̂éŝṕôńd̂ ẃît́ĥ á 200 ŵh́êń ôf́f̂ĺîńê" @@ -1269,10 +1269,10 @@ "message": "P̂ér̂f́ôŕm̂án̂ćê" }, "lighthouse-core/config/default-config.js | pwaCategoryDescription": { - "message": "T̂h́êśê ćĥéĉḱŝ v́âĺîd́ât́ê t́ĥé âśp̂éĉt́ŝ óf̂ á P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂. [Ĺêár̂ń m̂ór̂é](ĥt́t̂ṕŝ://d́êv́êĺôṕêŕŝ.ǵôóĝĺê.ćôḿ/ŵéb̂/ṕr̂óĝŕêśŝív̂é-ŵéb̂-áp̂ṕŝ/ćĥéĉḱl̂íŝt́)." + "message": "T̂h́êśê ćĥéĉḱŝ v́âĺîd́ât́ê t́ĥé âśp̂éĉt́ŝ óf̂ á P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/progressive-web-apps/checklist)." }, "lighthouse-core/config/default-config.js | pwaCategoryManualDescription": { - "message": "T̂h́êśê ćĥéĉḱŝ ár̂é r̂éq̂úîŕêd́ b̂ý t̂h́ê b́âśêĺîńê [ṔŴÁ Ĉh́êćk̂ĺîśt̂](h́t̂t́p̂ś://d̂év̂él̂óp̂ér̂ś.ĝóôǵl̂é.ĉóm̂/ẃêb́/p̂ŕôǵr̂éŝśîv́ê-ẃêb́-âṕp̂ś/ĉh́êćk̂ĺîśt̂) b́ût́ âŕê ńôt́ âút̂óm̂át̂íĉál̂ĺŷ ćĥéĉḱêd́ b̂ý L̂íĝh́t̂h́ôúŝé. T̂h́êý d̂ó n̂ót̂ áf̂f́êćt̂ ýôúr̂ śĉór̂é b̂út̂ ít̂'ś îḿp̂ór̂t́âńt̂ t́ĥát̂ ýôú v̂ér̂íf̂ý t̂h́êḿ m̂án̂úâĺl̂ý." + "message": "T̂h́êśê ćĥéĉḱŝ ár̂é r̂éq̂úîŕêd́ b̂ý t̂h́ê b́âśêĺîńê [ṔŴÁ Ĉh́êćk̂ĺîśt̂](https://developers.google.com/web/progressive-web-apps/checklist) b́ût́ âŕê ńôt́ âút̂óm̂át̂íĉál̂ĺŷ ćĥéĉḱêd́ b̂ý L̂íĝh́t̂h́ôúŝé. T̂h́êý d̂ó n̂ót̂ áf̂f́êćt̂ ýôúr̂ śĉór̂é b̂út̂ ít̂'ś îḿp̂ór̂t́âńt̂ t́ĥát̂ ýôú v̂ér̂íf̂ý t̂h́êḿ m̂án̂úâĺl̂ý." }, "lighthouse-core/config/default-config.js | pwaCategoryTitle": { "message": "P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂" From 64ae1b75522798ce274bb96784359b41d9c7e582 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Thu, 25 Jul 2019 22:32:15 -0700 Subject: [PATCH 11/24] Patrick string feedback. --- lighthouse-core/audits/installable-manifest.js | 4 ++-- lighthouse-core/audits/manual/pwa-cross-browser.js | 2 +- lighthouse-core/audits/manual/pwa-each-page-has-url.js | 2 +- lighthouse-core/audits/manual/pwa-page-transitions.js | 2 +- lighthouse-core/audits/offline-start-url.js | 8 ++++---- lighthouse-core/audits/redirects-http.js | 2 +- lighthouse-core/audits/service-worker.js | 2 +- lighthouse-core/lib/i18n/locales/en-US.json | 4 ++-- lighthouse-core/lib/i18n/locales/en-XL.json | 4 ++-- lighthouse-core/test/results/sample_v2.json | 2 +- proto/sample_v2_round_trip.json | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lighthouse-core/audits/installable-manifest.js b/lighthouse-core/audits/installable-manifest.js index 153a2f876dc0..07af1695a2f2 100644 --- a/lighthouse-core/audits/installable-manifest.js +++ b/lighthouse-core/audits/installable-manifest.js @@ -10,9 +10,9 @@ const ManifestValues = require('../computed/manifest-values.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the installability of a website. This descriptive title is shown to users when a webapp is installable. */ + /** Title of a Lighthouse audit that provides detail on the desktop installability of a website. This descriptive title is shown to users when a webapp is installable. */ title: 'Web app manifest meets the installability requirements', - /** Title of a Lighthouse audit that provides detail on the installability of a website. This descriptive title is shown to users when a webapp is not installable. */ + /** Title of a Lighthouse audit that provides detail on the desktop installability of a website. This descriptive title is shown to users when a webapp is not installable. */ failureTitle: 'Web app manifest does not meet the installability requirements', /** Description of a Lighthouse audit that tells the user why installability is important for webapps. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Browsers can proactively prompt users to add your app to their homescreen, ' + diff --git a/lighthouse-core/audits/manual/pwa-cross-browser.js b/lighthouse-core/audits/manual/pwa-cross-browser.js index c88286ba0b7c..1dbf74976911 100644 --- a/lighthouse-core/audits/manual/pwa-cross-browser.js +++ b/lighthouse-core/audits/manual/pwa-cross-browser.js @@ -10,7 +10,7 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on whether or not a site works across different browsers. */ + /** Title of a Lighthouse audit that suggests to the user that a site should work across different browsers. */ title: 'Site works cross-browser', /** Description of a Lighthouse audit that tells the user why they should make sites work across different browsers. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'To reach the most number of users, sites should work across ' + diff --git a/lighthouse-core/audits/manual/pwa-each-page-has-url.js b/lighthouse-core/audits/manual/pwa-each-page-has-url.js index 29b254e6e8c4..7e447c2f4fe2 100644 --- a/lighthouse-core/audits/manual/pwa-each-page-has-url.js +++ b/lighthouse-core/audits/manual/pwa-each-page-has-url.js @@ -9,7 +9,7 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on a site's pages all having distinct URLs. */ + /** Title of a Lighthouse audit that suggests a site's pages should all have distinct URLs. */ title: 'Each page has a URL', /** Description of a Lighthouse audit that tells the user why they should use distinct URLs for each page. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Ensure individual pages are deep linkable via the URLs and that URLs are ' + diff --git a/lighthouse-core/audits/manual/pwa-page-transitions.js b/lighthouse-core/audits/manual/pwa-page-transitions.js index 627cedcda6e5..c4c4ff1678ac 100644 --- a/lighthouse-core/audits/manual/pwa-page-transitions.js +++ b/lighthouse-core/audits/manual/pwa-page-transitions.js @@ -9,7 +9,7 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on page transitions blocking network requests. */ + /** Title of a Lighthouse audit that suggests a page's transitions should not block network requests. */ title: 'Page transitions don\'t feel like they block on the network', /** Description of a Lighthouse audit that tells the user why they should make the transitions smooth. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Transitions should feel snappy as you tap around, even on a slow network, a ' + diff --git a/lighthouse-core/audits/offline-start-url.js b/lighthouse-core/audits/offline-start-url.js index 3c9f32d710e3..1db37ec57304 100644 --- a/lighthouse-core/audits/offline-start-url.js +++ b/lighthouse-core/audits/offline-start-url.js @@ -9,18 +9,18 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the start_url's offline validity. This descriptive title is shown to users when the manifest's start_url responds when requested offline. */ + /** Title of a Lighthouse audit that provides detail on the start_url's offline capabilities. This descriptive title is shown to users when the manifest's start_url responds successfully while offline. */ title: 'start_url responds with a 200 when offline', - /** Title of a Lighthouse audit that provides detail on the start_url's offline validity. This descriptive title is shown to users when the manifest's start_url does not respond when requested offline. */ + /** Title of a Lighthouse audit that provides detail on the start_url's offline capabilities. This descriptive title is shown to users when the manifest's start_url does not respond successfully while offline. */ failureTitle: 'start_url does not respond with a 200 when offline', - /** Description of a Lighthouse audit that tells the user why the start_url should respond when requested offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ + /** Description of a Lighthouse audit that tells the user why a site should respond when requested offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'A service worker enables your web app to be reliable in unpredictable ' + 'network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', /** * @description Warning that the audit couldn't find the start_url and used the page's URL instead. * @example {No Manifest Fetched.} manifestWarning * */ - warningCantStart: 'We couldn\'t read the start_url from the manifest. As a result, the ' + + warningCantStart: 'Lighthouse couldn\'t read the start_url from the manifest. As a result, the ' + 'start_url was assumed to be the document\'s URL. Error message: \'{manifestWarning}\'.', }; diff --git a/lighthouse-core/audits/redirects-http.js b/lighthouse-core/audits/redirects-http.js index 5b3a505e6eb6..2efa313a382f 100644 --- a/lighthouse-core/audits/redirects-http.js +++ b/lighthouse-core/audits/redirects-http.js @@ -15,7 +15,7 @@ const UIStrings = { failureTitle: 'Does not redirect HTTP traffic to HTTPS', /** Description of a Lighthouse audit that tells the user why they should direct HTTP traffic to HTTPS. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'If you\'ve already set up HTTPS, make sure that you redirect all HTTP ' + - 'traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).', + 'traffic to HTTPS in order enable secure web features for all your users. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).', }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); diff --git a/lighthouse-core/audits/service-worker.js b/lighthouse-core/audits/service-worker.js index a1d3c778fa43..13e3f359a071 100644 --- a/lighthouse-core/audits/service-worker.js +++ b/lighthouse-core/audits/service-worker.js @@ -12,7 +12,7 @@ const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { /** Title of a Lighthouse audit that provides detail on a page's service worker. This descriptive title is shown to users when a service worker is registered and valid. */ title: 'Registers a service worker that controls page and start_url', - /** Title of a Lighthouse audit that provides detail on a page's service worker. This descriptive title is shown to users when a service worker is invalid. */ + /** Title of a Lighthouse audit that provides detail on a page's service worker. This descriptive title is shown to users when a service worker is not present or invalid. */ failureTitle: 'Does not register a service worker that controls page and start_url', /** Description of a Lighthouse audit that tells the user why they should use a service worker. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'The service worker is the technology that enables your app to use many ' + diff --git a/lighthouse-core/lib/i18n/locales/en-US.json b/lighthouse-core/lib/i18n/locales/en-US.json index 5bf71ab41114..ac3f8da8c7ba 100644 --- a/lighthouse-core/lib/i18n/locales/en-US.json +++ b/lighthouse-core/lib/i18n/locales/en-US.json @@ -846,7 +846,7 @@ "message": "start_url responds with a 200 when offline" }, "lighthouse-core/audits/offline-start-url.js | warningCantStart": { - "message": "We couldn't read the start_url from the manifest. As a result, the start_url was assumed to be the document's URL. Error message: '{manifestWarning}'." + "message": "Lighthouse couldn't read the start_url from the manifest. As a result, the start_url was assumed to be the document's URL. Error message: '{manifestWarning}'." }, "lighthouse-core/audits/performance-budget.js | columnOverBudget": { "message": "Over Budget" @@ -861,7 +861,7 @@ "message": "Performance budget" }, "lighthouse-core/audits/redirects-http.js | description": { - "message": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https)." + "message": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS in order enable secure web features for all your users. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https)." }, "lighthouse-core/audits/redirects-http.js | failureTitle": { "message": "Does not redirect HTTP traffic to HTTPS" diff --git a/lighthouse-core/lib/i18n/locales/en-XL.json b/lighthouse-core/lib/i18n/locales/en-XL.json index 3ce5b9e7a7fd..5e694b679fb7 100644 --- a/lighthouse-core/lib/i18n/locales/en-XL.json +++ b/lighthouse-core/lib/i18n/locales/en-XL.json @@ -846,7 +846,7 @@ "message": "ŝt́âŕt̂_úr̂ĺ r̂éŝṕôńd̂ś ŵít̂h́ â 200 ẃĥén̂ óf̂f́l̂ín̂é" }, "lighthouse-core/audits/offline-start-url.js | warningCantStart": { - "message": "Ŵé ĉóûĺd̂ń't̂ ŕêád̂ t́ĥé ŝt́âŕt̂_úr̂ĺ f̂ŕôḿ t̂h́ê ḿâńîf́êśt̂. Áŝ á r̂éŝúl̂t́, t̂h́ê śt̂ár̂t́_ûŕl̂ ẃâś âśŝúm̂éd̂ t́ô b́ê t́ĥé d̂óĉúm̂én̂t́'ŝ ÚR̂Ĺ. Êŕr̂ór̂ ḿêśŝáĝé: '{manifestWarning}'." + "message": "L̂íĝh́t̂h́ôúŝé ĉóûĺd̂ń't̂ ŕêád̂ t́ĥé ŝt́âŕt̂_úr̂ĺ f̂ŕôḿ t̂h́ê ḿâńîf́êśt̂. Áŝ á r̂éŝúl̂t́, t̂h́ê śt̂ár̂t́_ûŕl̂ ẃâś âśŝúm̂éd̂ t́ô b́ê t́ĥé d̂óĉúm̂én̂t́'ŝ ÚR̂Ĺ. Êŕr̂ór̂ ḿêśŝáĝé: '{manifestWarning}'." }, "lighthouse-core/audits/performance-budget.js | columnOverBudget": { "message": "Ôv́êŕ B̂úd̂ǵêt́" @@ -861,7 +861,7 @@ "message": "P̂ér̂f́ôŕm̂án̂ćê b́ûd́ĝét̂" }, "lighthouse-core/audits/redirects-http.js | description": { - "message": "Îf́ ŷóû'v́ê ál̂ŕêád̂ý ŝét̂ úp̂ H́T̂T́P̂Ś, m̂ák̂é ŝúr̂é t̂h́ât́ ŷóû ŕêd́îŕêćt̂ ál̂ĺ ĤT́T̂Ṕ t̂ŕâf́f̂íĉ t́ô H́T̂T́P̂Ś. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https)." + "message": "Îf́ ŷóû'v́ê ál̂ŕêád̂ý ŝét̂ úp̂ H́T̂T́P̂Ś, m̂ák̂é ŝúr̂é t̂h́ât́ ŷóû ŕêd́îŕêćt̂ ál̂ĺ ĤT́T̂Ṕ t̂ŕâf́f̂íĉ t́ô H́T̂T́P̂Ś îń ôŕd̂ér̂ én̂áb̂ĺê śêćûŕê ẃêb́ f̂éât́ûŕêś f̂ór̂ ál̂ĺ ŷóûŕ ûśêŕŝ. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https)." }, "lighthouse-core/audits/redirects-http.js | failureTitle": { "message": "D̂óêś n̂ót̂ ŕêd́îŕêćt̂ H́T̂T́P̂ t́r̂áf̂f́îć t̂ó ĤT́T̂ṔŜ" diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index df271d126869..784fb36d42a3 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -37,7 +37,7 @@ "redirects-http": { "id": "redirects-http", "title": "Does not redirect HTTP traffic to HTTPS", - "description": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).", + "description": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS in order enable secure web features for all your users. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).", "score": 0, "scoreDisplayMode": "binary" }, diff --git a/proto/sample_v2_round_trip.json b/proto/sample_v2_round_trip.json index 1d9242b6c6e0..1b0ce5330731 100644 --- a/proto/sample_v2_round_trip.json +++ b/proto/sample_v2_round_trip.json @@ -2205,7 +2205,7 @@ "title": "Avoid multiple page redirects" }, "redirects-http": { - "description": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).", + "description": "If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS in order enable secure web features for all your users. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-redirects-to-https).", "id": "redirects-http", "score": 0.0, "scoreDisplayMode": "binary", From 8ffcaee42cabb164c61a745ea076375908c8c8a8 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Fri, 26 Jul 2019 10:21:36 -0700 Subject: [PATCH 12/24] fixed test --- lighthouse-core/test/audits/offline-start-url-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lighthouse-core/test/audits/offline-start-url-test.js b/lighthouse-core/test/audits/offline-start-url-test.js index 377730a22632..222b4358cc96 100644 --- a/lighthouse-core/test/audits/offline-start-url-test.js +++ b/lighthouse-core/test/audits/offline-start-url-test.js @@ -68,7 +68,7 @@ describe('Offline start_url audit', () => { assert.strictEqual(result.score, 1); assert.strictEqual(result.explanation, undefined); assert.strictEqual(result.warnings.length, 1); - expect(result.warnings[0]).toBeDisplayString('We couldn\'t read the start_url ' + + expect(result.warnings[0]).toBeDisplayString('Lighthouse couldn\'t read the start_url ' + 'from the manifest. As a result, the start_url was assumed to be the document\'s URL. ' + 'Error message: \'ERROR: start_url must be same-origin as document\'.'); }); From f96c92c07713436679b20e6fea141a1a64f36ced Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 31 Jul 2019 21:53:53 -0700 Subject: [PATCH 13/24] brendan string foodback 1/few --- lighthouse-core/audits/content-width.js | 6 +++--- lighthouse-core/audits/installable-manifest.js | 4 ++-- lighthouse-core/audits/is-on-https.js | 1 + lighthouse-core/audits/load-fast-enough-for-pwa.js | 2 +- lighthouse-core/audits/manual/pwa-each-page-has-url.js | 4 ++-- lighthouse-core/config/default-config.js | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lighthouse-core/audits/content-width.js b/lighthouse-core/audits/content-width.js index 1cd638d6b29b..308fa393ae15 100644 --- a/lighthouse-core/audits/content-width.js +++ b/lighthouse-core/audits/content-width.js @@ -9,11 +9,11 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the content size of a site compared to its viewport. This descriptive title is shown to users when the site's content is sized appropriately. */ + /** Title of a Lighthouse audit that provides detail on the content size of a web site compared to the viewport, which is the size of the screen the site is displayed on. This descriptive title is shown to users when the site's content is sized appropriately. */ title: 'Content is sized correctly for the viewport', - /** Title of a Lighthouse audit that provides detail on the content size of a site compared to its viewport. This descriptive title is shown to users when the site's content is not sized appropriately. */ + /** Title of a Lighthouse audit that provides detail on the content size of a web site compared to the viewport, which is the size of the screen the site is displayed on. This descriptive title is shown to users when the site's content is not sized appropriately. */ failureTitle: 'Content is not sized correctly for the viewport', - /** Description of a Lighthouse audit that tells the user why they should care that a site's content size should match its viewport size. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ + /** Description of a Lighthouse audit that tells the user why they should care that a site's content size should match its viewport size, which is the size of the screen the site is displayed on. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'If the width of your app\'s content doesn\'t match the width ' + 'of the viewport, your app might not be optimized for mobile screens. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewport).', diff --git a/lighthouse-core/audits/installable-manifest.js b/lighthouse-core/audits/installable-manifest.js index 07af1695a2f2..abf36e5ae770 100644 --- a/lighthouse-core/audits/installable-manifest.js +++ b/lighthouse-core/audits/installable-manifest.js @@ -10,9 +10,9 @@ const ManifestValues = require('../computed/manifest-values.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the desktop installability of a website. This descriptive title is shown to users when a webapp is installable. */ + /** Title of a Lighthouse audit that provides detail on the homepage installability of a website. This descriptive title is shown to users when a webapp is installable. */ title: 'Web app manifest meets the installability requirements', - /** Title of a Lighthouse audit that provides detail on the desktop installability of a website. This descriptive title is shown to users when a webapp is not installable. */ + /** Title of a Lighthouse audit that provides detail on the homepage installability of a website. This descriptive title is shown to users when a webapp is not installable. */ failureTitle: 'Web app manifest does not meet the installability requirements', /** Description of a Lighthouse audit that tells the user why installability is important for webapps. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Browsers can proactively prompt users to add your app to their homescreen, ' + diff --git a/lighthouse-core/audits/is-on-https.js b/lighthouse-core/audits/is-on-https.js index f237e8d559f1..9b1d245fdfff 100644 --- a/lighthouse-core/audits/is-on-https.js +++ b/lighthouse-core/audits/is-on-https.js @@ -31,6 +31,7 @@ const UIStrings = { }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); + const SECURE_SCHEMES = ['data', 'https', 'wss', 'blob', 'chrome', 'chrome-extension', 'about']; const SECURE_DOMAINS = ['localhost', '127.0.0.1']; diff --git a/lighthouse-core/audits/load-fast-enough-for-pwa.js b/lighthouse-core/audits/load-fast-enough-for-pwa.js index 52e1ff06b9d3..68f500eb9c55 100644 --- a/lighthouse-core/audits/load-fast-enough-for-pwa.js +++ b/lighthouse-core/audits/load-fast-enough-for-pwa.js @@ -33,7 +33,7 @@ const UIStrings = { /** Label for the audit identifying the time it took for the page to become interactive on a mobile network. */ displayValueTextWithOverride: 'Interactive on simulated mobile network at ' + '{timeInMs, number, seconds}\xa0s', - /** Explanatory message stating that there was a failure in an audit caused by the page loading too slowly to be considered interactive quickly. This references another Lighthouse auditing category, "Performance", that can give additional details on performance debugging. */ + /** Explanatory message displayed when a web page loads too slowly to be considered quickly interactive. This references another Lighthouse auditing category, "Performance", that can give additional details on performance debugging. */ explanationLoadSlow: 'Your page loads too slowly and is not interactive within 10 seconds. ' + 'Look at the opportunities and diagnostics in the "Performance" section to learn how to ' + 'improve.', diff --git a/lighthouse-core/audits/manual/pwa-each-page-has-url.js b/lighthouse-core/audits/manual/pwa-each-page-has-url.js index 7e447c2f4fe2..92048d9ef439 100644 --- a/lighthouse-core/audits/manual/pwa-each-page-has-url.js +++ b/lighthouse-core/audits/manual/pwa-each-page-has-url.js @@ -9,9 +9,9 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that suggests a site's pages should all have distinct URLs. */ + /** Title of a Lighthouse audit that suggests each page in a web site should have a unique URL. */ title: 'Each page has a URL', - /** Description of a Lighthouse audit that tells the user why they should use distinct URLs for each page. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ + /** Description of a Lighthouse audit that tells the user why they should use unique URLs for each web page. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Ensure individual pages are deep linkable via the URLs and that URLs are ' + 'unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).', }; diff --git a/lighthouse-core/config/default-config.js b/lighthouse-core/config/default-config.js index f4cb28a21ef3..2b761450d842 100644 --- a/lighthouse-core/config/default-config.js +++ b/lighthouse-core/config/default-config.js @@ -94,12 +94,12 @@ const UIStrings = { seoCrawlingGroupTitle: 'Crawling and Indexing', /* Description of the navigation section within the Search Engine Optimization (SEO) category. Within this section are audits with descriptive titles that highlight ways to make a website accessible to search engine crawlers. */ seoCrawlingGroupDescription: 'To appear in search results, crawlers need access to your app.', - /** Title of the Progressive Web Application (PWA) category of audits. This is displayed at the top of a list of audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc. Also used as a label of a score gauge; try to limit to 20 characters. */ + /** Title of the Progressive Web Application (PWA) category of audits. This is displayed at the top of a list of audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc. Also used as a label of a score gauge. */ pwaCategoryTitle: 'Progressive Web App', /** Description of the Progressive Web Application (PWA) category. This is displayed at the top of a list of audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc. No character length limits. 'Learn More' becomes link text to additional documentation. */ pwaCategoryDescription: 'These checks validate the aspects of a Progressive Web App. ' + '[Learn more](https://developers.google.com/web/progressive-web-apps/checklist).', - /** Description of the Progressive Web Application (PWA) manual checks category, the additional validators must be run by hand in order to check all PWA best practices. This is displayed at the top of a list of manually run audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc.. No character length limits. */ + /** Description of the Progressive Web Application (PWA) manual checks category, containing a list of additional validators must be run by hand in order to check all PWA best practices. This is displayed at the top of a list of manually run audits focused on topics related to whether or not a site is a progressive web app, e.g. responds offline, uses a service worker, is on https, etc.. No character length limits. */ pwaCategoryManualDescription: 'These checks are required by the baseline ' + '[PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are ' + 'not automatically checked by Lighthouse. They do not affect your score but it\'s important that you verify them manually.', From ba1ba982a33f5e265271364f3ad16fcc8e058918 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 31 Jul 2019 22:07:20 -0700 Subject: [PATCH 14/24] loosen test regex --- lighthouse-core/test/audits/offline-start-url-test.js | 5 ++--- lighthouse-core/test/audits/service-worker-test.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lighthouse-core/test/audits/offline-start-url-test.js b/lighthouse-core/test/audits/offline-start-url-test.js index 222b4358cc96..85631b7cea96 100644 --- a/lighthouse-core/test/audits/offline-start-url-test.js +++ b/lighthouse-core/test/audits/offline-start-url-test.js @@ -68,8 +68,7 @@ describe('Offline start_url audit', () => { assert.strictEqual(result.score, 1); assert.strictEqual(result.explanation, undefined); assert.strictEqual(result.warnings.length, 1); - expect(result.warnings[0]).toBeDisplayString('Lighthouse couldn\'t read the start_url ' + - 'from the manifest. As a result, the start_url was assumed to be the document\'s URL. ' + - 'Error message: \'ERROR: start_url must be same-origin as document\'.'); + expect(result.warnings[0]).toBeDisplayString( + /Lighthouse couldn't read the start_url.*ERROR: start_url.*\./); }); }); diff --git a/lighthouse-core/test/audits/service-worker-test.js b/lighthouse-core/test/audits/service-worker-test.js index cc0319ea9bfd..1c0eec33a2db 100644 --- a/lighthouse-core/test/audits/service-worker-test.js +++ b/lighthouse-core/test/audits/service-worker-test.js @@ -163,8 +163,8 @@ describe('Offline: service worker audit', () => { const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); assert.strictEqual(output.score, 0); - expect(output.explanation).toBeDisplayString('This page is controlled by a service worker, ' + - `however the start_url (${startUrl}) is not in the service worker's scope (${scopeURL})`); + expect(output.explanation).toBeDisplayString( + /service worker,.*\(.*\) is not in the service worker's scope \(.*\)/); }); it('passes when both outside default scope but explicit scopeURL puts it back in', () => { From 4ab1967e63bad1703f0e48509a7200c28c3bab53 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 31 Jul 2019 22:19:21 -0700 Subject: [PATCH 15/24] point TODO to gh issue --- lighthouse-core/audits/multi-check-audit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lighthouse-core/audits/multi-check-audit.js b/lighthouse-core/audits/multi-check-audit.js index 6361c9dd45b2..22a4def70cc9 100644 --- a/lighthouse-core/audits/multi-check-audit.js +++ b/lighthouse-core/audits/multi-check-audit.js @@ -53,7 +53,7 @@ class MultiCheckAudit extends Audit { if (result.failures.length > 0) { return { score: 0, - // TODO(exterkamp): make this i18n-able. + // TODO(#7238): make this i18n-able. explanation: `Failures: ${result.failures.join(',\n')}.`, details, }; From 1fd138530b7691bb069916c9eef37c2734f120f2 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Thu, 1 Aug 2019 10:17:22 -0700 Subject: [PATCH 16/24] manual audit desc rewording --- lighthouse-core/audits/manual/pwa-cross-browser.js | 2 +- lighthouse-core/audits/manual/pwa-each-page-has-url.js | 2 +- lighthouse-core/audits/manual/pwa-page-transitions.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lighthouse-core/audits/manual/pwa-cross-browser.js b/lighthouse-core/audits/manual/pwa-cross-browser.js index 1dbf74976911..57d073a58d81 100644 --- a/lighthouse-core/audits/manual/pwa-cross-browser.js +++ b/lighthouse-core/audits/manual/pwa-cross-browser.js @@ -10,7 +10,7 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that suggests to the user that a site should work across different browsers. */ + /** Title of a Lighthouse audit that prompts the user to manually check that their site works across different web browsers. */ title: 'Site works cross-browser', /** Description of a Lighthouse audit that tells the user why they should make sites work across different browsers. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'To reach the most number of users, sites should work across ' + diff --git a/lighthouse-core/audits/manual/pwa-each-page-has-url.js b/lighthouse-core/audits/manual/pwa-each-page-has-url.js index 92048d9ef439..2192f3e1304c 100644 --- a/lighthouse-core/audits/manual/pwa-each-page-has-url.js +++ b/lighthouse-core/audits/manual/pwa-each-page-has-url.js @@ -9,7 +9,7 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that suggests each page in a web site should have a unique URL. */ + /** Title of a Lighthouse audit that prompts the user to manually check that each page on their website uses a unique URL. */ title: 'Each page has a URL', /** Description of a Lighthouse audit that tells the user why they should use unique URLs for each web page. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Ensure individual pages are deep linkable via the URLs and that URLs are ' + diff --git a/lighthouse-core/audits/manual/pwa-page-transitions.js b/lighthouse-core/audits/manual/pwa-page-transitions.js index c4c4ff1678ac..61a75c758bcf 100644 --- a/lighthouse-core/audits/manual/pwa-page-transitions.js +++ b/lighthouse-core/audits/manual/pwa-page-transitions.js @@ -9,7 +9,7 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that suggests a page's transitions should not block network requests. */ + /** Title of a Lighthouse audit that prompts the user to manually check that page transitions (navigating to other pages on a website, etc.) shouldn't feel like they are waiting for the network to load. */ title: 'Page transitions don\'t feel like they block on the network', /** Description of a Lighthouse audit that tells the user why they should make the transitions smooth. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Transitions should feel snappy as you tap around, even on a slow network, a ' + From 0e470cd63c6fd38e6aa12ab2b5c86d8da1169120 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 7 Aug 2019 13:47:08 -0700 Subject: [PATCH 17/24] Apply Brendan's suggestions from code review Co-Authored-By: Brendan Kenny --- .../audits/installable-manifest.js | 4 ++-- .../audits/manual/pwa-each-page-has-url.js | 2 +- .../audits/manual/pwa-page-transitions.js | 4 ++-- lighthouse-core/audits/offline-start-url.js | 14 ++++++------ lighthouse-core/audits/service-worker.js | 22 +++++++++---------- lighthouse-core/audits/themed-omnibox.js | 6 ++--- lighthouse-core/audits/viewport.js | 6 ++--- lighthouse-core/audits/without-javascript.js | 8 +++---- lighthouse-core/audits/works-offline.js | 10 ++++----- 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/lighthouse-core/audits/installable-manifest.js b/lighthouse-core/audits/installable-manifest.js index abf36e5ae770..952ab065619c 100644 --- a/lighthouse-core/audits/installable-manifest.js +++ b/lighthouse-core/audits/installable-manifest.js @@ -10,9 +10,9 @@ const ManifestValues = require('../computed/manifest-values.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the homepage installability of a website. This descriptive title is shown to users when a webapp is installable. */ + /** Title of a Lighthouse audit that provides detail on if a website is installable as an application. This descriptive title is shown to users when a webapp is installable. */ title: 'Web app manifest meets the installability requirements', - /** Title of a Lighthouse audit that provides detail on the homepage installability of a website. This descriptive title is shown to users when a webapp is not installable. */ + /** Title of a Lighthouse audit that provides detail on if a website is installable as an application. This descriptive title is shown to users when a webapp is not installable. */ failureTitle: 'Web app manifest does not meet the installability requirements', /** Description of a Lighthouse audit that tells the user why installability is important for webapps. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Browsers can proactively prompt users to add your app to their homescreen, ' + diff --git a/lighthouse-core/audits/manual/pwa-each-page-has-url.js b/lighthouse-core/audits/manual/pwa-each-page-has-url.js index 2192f3e1304c..6b6eec477cde 100644 --- a/lighthouse-core/audits/manual/pwa-each-page-has-url.js +++ b/lighthouse-core/audits/manual/pwa-each-page-has-url.js @@ -12,7 +12,7 @@ const UIStrings = { /** Title of a Lighthouse audit that prompts the user to manually check that each page on their website uses a unique URL. */ title: 'Each page has a URL', /** Description of a Lighthouse audit that tells the user why they should use unique URLs for each web page. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ - description: 'Ensure individual pages are deep linkable via the URLs and that URLs are ' + + description: 'Ensure individual pages are deep linkable via URL and that URLs are ' + 'unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).', }; diff --git a/lighthouse-core/audits/manual/pwa-page-transitions.js b/lighthouse-core/audits/manual/pwa-page-transitions.js index 61a75c758bcf..5de70a73f8ea 100644 --- a/lighthouse-core/audits/manual/pwa-page-transitions.js +++ b/lighthouse-core/audits/manual/pwa-page-transitions.js @@ -9,9 +9,9 @@ const ManualAudit = require('./manual-audit.js'); const i18n = require('../../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that prompts the user to manually check that page transitions (navigating to other pages on a website, etc.) shouldn't feel like they are waiting for the network to load. */ + /** Title of a Lighthouse audit that prompts the user to manually check that page transitions (navigating to other pages on a website) shouldn't feel like they are waiting for the network to load. */ title: 'Page transitions don\'t feel like they block on the network', - /** Description of a Lighthouse audit that tells the user why they should make the transitions smooth. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ + /** Description of a Lighthouse audit that tells the user why they should make transitions in their web app feel fast. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Transitions should feel snappy as you tap around, even on a slow network, a ' + 'key to perceived performance. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network).', }; diff --git a/lighthouse-core/audits/offline-start-url.js b/lighthouse-core/audits/offline-start-url.js index 1db37ec57304..31f972c03aa0 100644 --- a/lighthouse-core/audits/offline-start-url.js +++ b/lighthouse-core/audits/offline-start-url.js @@ -9,19 +9,19 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the start_url's offline capabilities. This descriptive title is shown to users when the manifest's start_url responds successfully while offline. */ - title: 'start_url responds with a 200 when offline', - /** Title of a Lighthouse audit that provides detail on the start_url's offline capabilities. This descriptive title is shown to users when the manifest's start_url does not respond successfully while offline. */ - failureTitle: 'start_url does not respond with a 200 when offline', - /** Description of a Lighthouse audit that tells the user why a site should respond when requested offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ + /** Title of a Lighthouse audit that provides detail on the a website's offline capabilities. "200" refers to the HTTP status code when a site responds successfully. This descriptive title is shown to users when the test page responds successfully while offline. */ + title: '`start_url` responds with a 200 when offline', + /** Title of a Lighthouse audit that provides detail on the a website's offline capabilities. "200" refers to the HTTP status code when a site responds successfully. This descriptive title is shown to users when the test page does not respond successfully while offline. */ + failureTitle: '`start_url` does not respond with a 200 when offline', + /** Description of a Lighthouse audit that tells the user why a website should respond to requests when offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'A service worker enables your web app to be reliable in unpredictable ' + 'network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', /** * @description Warning that the audit couldn't find the start_url and used the page's URL instead. * @example {No Manifest Fetched.} manifestWarning * */ - warningCantStart: 'Lighthouse couldn\'t read the start_url from the manifest. As a result, the ' + - 'start_url was assumed to be the document\'s URL. Error message: \'{manifestWarning}\'.', + warningCantStart: 'Lighthouse couldn\'t read the `start_url` from the manifest. As a result, the ' + + '`start_url` was assumed to be the document\'s URL. Error message: \'{manifestWarning}\'.', }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); diff --git a/lighthouse-core/audits/service-worker.js b/lighthouse-core/audits/service-worker.js index 13e3f359a071..ad2e21490b9d 100644 --- a/lighthouse-core/audits/service-worker.js +++ b/lighthouse-core/audits/service-worker.js @@ -11,32 +11,32 @@ const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { /** Title of a Lighthouse audit that provides detail on a page's service worker. This descriptive title is shown to users when a service worker is registered and valid. */ - title: 'Registers a service worker that controls page and start_url', + title: 'Registers a service worker that controls page and `start_url`', /** Title of a Lighthouse audit that provides detail on a page's service worker. This descriptive title is shown to users when a service worker is not present or invalid. */ - failureTitle: 'Does not register a service worker that controls page and start_url', + failureTitle: 'Does not register a service worker that controls page and `start_url`', /** Description of a Lighthouse audit that tells the user why they should use a service worker. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'The service worker is the technology that enables your app to use many ' + 'Progressive Web App features, such as offline, add to homescreen, and push ' + 'notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).', /** - * @description Explanatory message stating that the page has multiple, or out of scope service workers. + * @description Message explaining that the website may have service workers, but none are in scope to control the tested web page. * @example {https://example.com/} pageUrl * */ explanationOutOfScope: 'This origin has one or more service workers, however the page ' + '({pageUrl}) is not in scope.', - /** Explanatory message stating that the page has no manifest. */ + /** Message explaining that the page has no manifest file so can't specify a starting url. */ explanationNoManifest: 'This page is controlled by a service worker, however ' + - 'no start_url was found because no manifest was fetched.', - /** Explanatory message stating that the page's manifest is invalid. */ + 'no `start_url` was found because no manifest was fetched.', + /** Message explaining that the page had an invalid manifest file so can't specify a starting url. */ explanationBadManifest: 'This page is controlled by a service worker, however ' + - 'no start_url was found because manifest failed to parse as valid JSON', + 'no `start_url` was found because manifest failed to parse as valid JSON', /** - * @description Explanatory message stating that the manifest's start_url is not in scope, and therefor invalid. - * @example {https://example2.com/} startUrl - * @example {https://example.com/} scopeUrl + * @description Message explaining that the website has a service worker, but none are in scope to control the tested starting url. + * @example {https://example.com/} startUrl + * @example {https://othersite.com/} scopeUrl * */ explanationBadStartUrl: 'This page is controlled by a service worker, however ' + - 'the start_url ({startUrl}) is not in the service worker\'s scope ({scopeUrl})', + 'the `start_url` ({startUrl}) is not in the service worker\'s scope ({scopeUrl})', }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); diff --git a/lighthouse-core/audits/themed-omnibox.js b/lighthouse-core/audits/themed-omnibox.js index 6580751049e7..287592826ec5 100644 --- a/lighthouse-core/audits/themed-omnibox.js +++ b/lighthouse-core/audits/themed-omnibox.js @@ -11,11 +11,11 @@ const cssParsers = require('cssstyle/lib/parsers'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the theme color the page has set for the browser's address bar. This descriptive title is shown to users when an address-bar theme color has been set. */ + /** Title of a Lighthouse audit that provides detail on the theme color the web page has set for the browser's address bar. This descriptive title is shown to users when an address-bar theme color has been set. */ title: 'Sets a theme color for the address bar.', - /** Title of a Lighthouse audit that provides detail on the theme color the page has set for the browser's address bar. This descriptive title is shown to users when an address-bar theme color has not been set. */ + /** Title of a Lighthouse audit that provides detail on the theme color the web page has set for the browser's address bar. This descriptive title is shown to users when an address-bar theme color has not been set. */ failureTitle: 'Does not set a theme color for the address bar.', - /** Description of a Lighthouse audit that tells the user why they should set a theme color for the address bar. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ + /** Description of a Lighthouse audit that tells the user why they should set a theme color for the browser's address bar. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'The browser address bar can be themed to match your site. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/address-bar).', }; diff --git a/lighthouse-core/audits/viewport.js b/lighthouse-core/audits/viewport.js index a8d2a1e1677a..172b24ef6f64 100644 --- a/lighthouse-core/audits/viewport.js +++ b/lighthouse-core/audits/viewport.js @@ -10,12 +10,12 @@ const ComputedViewportMeta = require('../computed/viewport-meta.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the viewport meta tag. This descriptive title is shown to users when a viewport tag is set and configured. */ + /** Title of a Lighthouse audit that provides detail on the viewport meta tag in a web page's html. This descriptive title is shown to users when a viewport tag is set and configured. */ title: 'Has a `` tag with `width` or `initial-scale`', - /** Title of a Lighthouse audit that provides detail on the viewport meta tag. This descriptive title is shown to users when a viewport tag is not set or configured. */ + /** Title of a Lighthouse audit that provides detail on the viewport meta tag in a web page's html. This descriptive title is shown to users when a viewport tag is not set or configured. */ failureTitle: 'Does not have a `` tag with `width` ' + 'or `initial-scale`', - /** Description of a Lighthouse audit that tells the user why they should have a viewport meta tag. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ + /** Description of a Lighthouse audit that tells the user why they should have a viewport meta tag in their html. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Add a viewport meta tag to optimize your app for mobile screens. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).', /** Explanatory message stating that no viewport meta tag exists on the page. */ diff --git a/lighthouse-core/audits/without-javascript.js b/lighthouse-core/audits/without-javascript.js index 0318cb25b641..7f93e95fa204 100644 --- a/lighthouse-core/audits/without-javascript.js +++ b/lighthouse-core/audits/without-javascript.js @@ -9,15 +9,15 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the page's ability to return content without Javascript. This descriptive title is shown to users when at least some content is shown when Javascript is not available. */ + /** Title of a Lighthouse audit that provides detail on the web page's ability to return content with Javascript disabled in the browser. This descriptive title is shown to users when at least some content is shown when Javascript is not available. */ title: 'Contains some content when JavaScript is not available', - /** Title of a Lighthouse audit that provides detail on the page's ability to return content without Javascript. This descriptive title is shown to users when no content is shown when Javascript is not available. */ + /** Title of a Lighthouse audit that provides detail on the web page's ability to return content with Javascript disabled in the browser. This descriptive title is shown to users when no content is shown when Javascript is not available. */ failureTitle: 'Does not provide fallback content when JavaScript is not available', - /** Description of a Lighthouse audit that tells the user why they should return content even if Javascript is unavailable. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ + /** Description of a Lighthouse audit that tells the user why they should return content even if Javascript is unavailable in a browser. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Your app should display some content when JavaScript is disabled, even if ' + 'it\'s just a warning to the user that JavaScript is required to use the app. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/no-js).', - /** Explanatory message stating that the site body should render some (any) content even if the page's scripts cannot be loaded. */ + /** Message explaining that a website's body should render some (any) content even if the page's JavaScript cannot be loaded. */ explanation: 'The page body should render some content if its scripts are not available.', }; diff --git a/lighthouse-core/audits/works-offline.js b/lighthouse-core/audits/works-offline.js index f247ff82fdd2..187b3486b49d 100644 --- a/lighthouse-core/audits/works-offline.js +++ b/lighthouse-core/audits/works-offline.js @@ -10,20 +10,20 @@ const Audit = require('./audit.js'); const i18n = require('../lib/i18n/i18n.js'); const UIStrings = { - /** Title of a Lighthouse audit that provides detail on the offline responsiveness of a site. This descriptive title is shown to users when the page responds even when offline. */ + /** Title of a Lighthouse audit that provides detail on the offline responsiveness of a website. "200" refers to the HTTP status code when a site responds successfully. This descriptive title is shown to users when the site responds successfully even when offline. */ title: 'Current page responds with a 200 when offline', - /** Title of a Lighthouse audit that provides detail on the offline responsiveness of a site. This descriptive title is shown to users when the page does not respond when offline. */ + /** Title of a Lighthouse audit that provides detail on the offline responsiveness of a website. "200" refers to the HTTP status code when a site responds successfully. This descriptive title is shown to users when the site does not respond successfully when offline. */ failureTitle: 'Current page does not respond with a 200 when offline', - /** Description of a Lighthouse audit that tells the user why they should respond to requests when offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ + /** Description of a Lighthouse audit that tells the user why a website should respond to requests when offline. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'If you\'re building a Progressive Web App, consider using a service worker ' + 'so that your app can work offline. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).', /** - * @description Warning that the page redirected during offline load and that may affect offline testing. + * @description Warning that the web page redirected during testing and that may have affected the offline load test. * @example {https://example.com/requested/page} requested * @example {https://example.com/final/resolved/page} final * */ - warningNoLoad: 'The page may be not loading offline because your test URL ' + + warningNoLoad: 'The page may not be loading offline because your test URL ' + `({requested}) was redirected to "{final}". ` + 'Try testing the second URL directly.', }; From da299d97d84f1fdfbdbc74f5741450574c137953 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 7 Aug 2019 13:53:00 -0700 Subject: [PATCH 18/24] updating en and en-xl with new strings --- lighthouse-core/lib/i18n/locales/en-US.json | 20 ++++++++++---------- lighthouse-core/lib/i18n/locales/en-XL.json | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lighthouse-core/lib/i18n/locales/en-US.json b/lighthouse-core/lib/i18n/locales/en-US.json index ac3f8da8c7ba..1e34c1dcc22e 100644 --- a/lighthouse-core/lib/i18n/locales/en-US.json +++ b/lighthouse-core/lib/i18n/locales/en-US.json @@ -765,7 +765,7 @@ "message": "Site works cross-browser" }, "lighthouse-core/audits/manual/pwa-each-page-has-url.js | description": { - "message": "Ensure individual pages are deep linkable via the URLs and that URLs are unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url)." + "message": "Ensure individual pages are deep linkable via URL and that URLs are unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url)." }, "lighthouse-core/audits/manual/pwa-each-page-has-url.js | title": { "message": "Each page has a URL" @@ -840,13 +840,13 @@ "message": "A service worker enables your web app to be reliable in unpredictable network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline)." }, "lighthouse-core/audits/offline-start-url.js | failureTitle": { - "message": "start_url does not respond with a 200 when offline" + "message": "`start_url` does not respond with a 200 when offline" }, "lighthouse-core/audits/offline-start-url.js | title": { - "message": "start_url responds with a 200 when offline" + "message": "`start_url` responds with a 200 when offline" }, "lighthouse-core/audits/offline-start-url.js | warningCantStart": { - "message": "Lighthouse couldn't read the start_url from the manifest. As a result, the start_url was assumed to be the document's URL. Error message: '{manifestWarning}'." + "message": "Lighthouse couldn't read the `start_url` from the manifest. As a result, the `start_url` was assumed to be the document's URL. Error message: '{manifestWarning}'." }, "lighthouse-core/audits/performance-budget.js | columnOverBudget": { "message": "Over Budget" @@ -1038,22 +1038,22 @@ "message": "The service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker)." }, "lighthouse-core/audits/service-worker.js | explanationBadManifest": { - "message": "This page is controlled by a service worker, however no start_url was found because manifest failed to parse as valid JSON" + "message": "This page is controlled by a service worker, however no `start_url` was found because manifest failed to parse as valid JSON" }, "lighthouse-core/audits/service-worker.js | explanationBadStartUrl": { - "message": "This page is controlled by a service worker, however the start_url ({startUrl}) is not in the service worker's scope ({scopeUrl})" + "message": "This page is controlled by a service worker, however the `start_url` ({startUrl}) is not in the service worker's scope ({scopeUrl})" }, "lighthouse-core/audits/service-worker.js | explanationNoManifest": { - "message": "This page is controlled by a service worker, however no start_url was found because no manifest was fetched." + "message": "This page is controlled by a service worker, however no `start_url` was found because no manifest was fetched." }, "lighthouse-core/audits/service-worker.js | explanationOutOfScope": { "message": "This origin has one or more service workers, however the page ({pageUrl}) is not in scope." }, "lighthouse-core/audits/service-worker.js | failureTitle": { - "message": "Does not register a service worker that controls page and start_url" + "message": "Does not register a service worker that controls page and `start_url`" }, "lighthouse-core/audits/service-worker.js | title": { - "message": "Registers a service worker that controls page and start_url" + "message": "Registers a service worker that controls page and `start_url`" }, "lighthouse-core/audits/splash-screen.js | description": { "message": "A themed splash screen ensures a high-quality experience when users launch your app from their homescreens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen)." @@ -1170,7 +1170,7 @@ "message": "Current page responds with a 200 when offline" }, "lighthouse-core/audits/works-offline.js | warningNoLoad": { - "message": "The page may be not loading offline because your test URL ({requested}) was redirected to \"{final}\". Try testing the second URL directly." + "message": "The page may not be loading offline because your test URL ({requested}) was redirected to \"{final}\". Try testing the second URL directly." }, "lighthouse-core/config/default-config.js | a11yAriaGroupDescription": { "message": "These are opportunities to improve the usage of ARIA in your application which may enhance the experience for users of assistive technology, like a screen reader." diff --git a/lighthouse-core/lib/i18n/locales/en-XL.json b/lighthouse-core/lib/i18n/locales/en-XL.json index 5e694b679fb7..a15b503d5935 100644 --- a/lighthouse-core/lib/i18n/locales/en-XL.json +++ b/lighthouse-core/lib/i18n/locales/en-XL.json @@ -765,7 +765,7 @@ "message": "Ŝít̂é ŵór̂ḱŝ ćr̂óŝś-b̂ŕôẃŝér̂" }, "lighthouse-core/audits/manual/pwa-each-page-has-url.js | description": { - "message": "Êńŝúr̂é îńd̂ív̂íd̂úâĺ p̂áĝéŝ ár̂é d̂éêṕ l̂ín̂ḱâb́l̂é v̂íâ t́ĥé ÛŔL̂ś âńd̂ t́ĥát̂ ÚR̂Ĺŝ ár̂é ûńîq́ûé f̂ór̂ t́ĥé p̂úr̂ṕôśê óf̂ śĥár̂éâb́îĺît́ŷ ón̂ śôćîál̂ ḿêd́îá. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url)." + "message": "Êńŝúr̂é îńd̂ív̂íd̂úâĺ p̂áĝéŝ ár̂é d̂éêṕ l̂ín̂ḱâb́l̂é v̂íâ ÚR̂Ĺ âńd̂ t́ĥát̂ ÚR̂Ĺŝ ár̂é ûńîq́ûé f̂ór̂ t́ĥé p̂úr̂ṕôśê óf̂ śĥár̂éâb́îĺît́ŷ ón̂ śôćîál̂ ḿêd́îá. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url)." }, "lighthouse-core/audits/manual/pwa-each-page-has-url.js | title": { "message": "Êáĉh́ p̂áĝé ĥáŝ á ÛŔL̂" @@ -840,13 +840,13 @@ "message": " śêŕv̂íĉé ŵór̂ḱêŕ êńâb́l̂éŝ ýôúr̂ ẃêb́ âṕp̂ t́ô b́ê ŕêĺîáb̂ĺê ín̂ ún̂ṕr̂éd̂íĉt́âb́l̂é n̂ét̂ẃôŕk̂ ćôńd̂ít̂íôńŝ. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline)." }, "lighthouse-core/audits/offline-start-url.js | failureTitle": { - "message": "ŝt́âŕt̂_úr̂ĺ d̂óêś n̂ót̂ ŕêśp̂ón̂d́ ŵít̂h́ â 200 ẃĥén̂ óf̂f́l̂ín̂é" + "message": "`start_url` d̂óêś n̂ót̂ ŕêśp̂ón̂d́ ŵít̂h́ â 200 ẃĥén̂ óf̂f́l̂ín̂é" }, "lighthouse-core/audits/offline-start-url.js | title": { - "message": "ŝt́âŕt̂_úr̂ĺ r̂éŝṕôńd̂ś ŵít̂h́ â 200 ẃĥén̂ óf̂f́l̂ín̂é" + "message": "`start_url` r̂éŝṕôńd̂ś ŵít̂h́ â 200 ẃĥén̂ óf̂f́l̂ín̂é" }, "lighthouse-core/audits/offline-start-url.js | warningCantStart": { - "message": "L̂íĝh́t̂h́ôúŝé ĉóûĺd̂ń't̂ ŕêád̂ t́ĥé ŝt́âŕt̂_úr̂ĺ f̂ŕôḿ t̂h́ê ḿâńîf́êśt̂. Áŝ á r̂éŝúl̂t́, t̂h́ê śt̂ár̂t́_ûŕl̂ ẃâś âśŝúm̂éd̂ t́ô b́ê t́ĥé d̂óĉúm̂én̂t́'ŝ ÚR̂Ĺ. Êŕr̂ór̂ ḿêśŝáĝé: '{manifestWarning}'." + "message": "L̂íĝh́t̂h́ôúŝé ĉóûĺd̂ń't̂ ŕêád̂ t́ĥé `start_url` f̂ŕôḿ t̂h́ê ḿâńîf́êśt̂. Áŝ á r̂éŝúl̂t́, t̂h́ê `start_url` ẃâś âśŝúm̂éd̂ t́ô b́ê t́ĥé d̂óĉúm̂én̂t́'ŝ ÚR̂Ĺ. Êŕr̂ór̂ ḿêśŝáĝé: '{manifestWarning}'." }, "lighthouse-core/audits/performance-budget.js | columnOverBudget": { "message": "Ôv́êŕ B̂úd̂ǵêt́" @@ -1038,22 +1038,22 @@ "message": "T̂h́ê śêŕv̂íĉé ŵór̂ḱêŕ îś t̂h́ê t́êćĥńôĺôǵŷ t́ĥát̂ én̂áb̂ĺêś ŷóûŕ âṕp̂ t́ô úŝé m̂án̂ý P̂ŕôǵr̂éŝśîv́ê Ẃêb́ Âṕp̂ f́êát̂úr̂éŝ, śûćĥ áŝ óf̂f́l̂ín̂é, âd́d̂ t́ô h́ôḿêśĉŕêén̂, án̂d́ p̂úŝh́ n̂ót̂íf̂íĉát̂íôńŝ. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker)." }, "lighthouse-core/audits/service-worker.js | explanationBadManifest": { - "message": "T̂h́îś p̂áĝé îś ĉón̂t́r̂ól̂ĺêd́ b̂ý â śêŕv̂íĉé ŵór̂ḱêŕ, ĥóŵév̂ér̂ ńô śt̂ár̂t́_ûŕl̂ ẃâś f̂óûńd̂ b́êćâúŝé m̂án̂íf̂éŝt́ f̂áîĺêd́ t̂ó p̂ár̂śê áŝ v́âĺîd́ ĴŚÔŃ" + "message": "T̂h́îś p̂áĝé îś ĉón̂t́r̂ól̂ĺêd́ b̂ý â śêŕv̂íĉé ŵór̂ḱêŕ, ĥóŵév̂ér̂ ńô `start_url` ẃâś f̂óûńd̂ b́êćâúŝé m̂án̂íf̂éŝt́ f̂áîĺêd́ t̂ó p̂ár̂śê áŝ v́âĺîd́ ĴŚÔŃ" }, "lighthouse-core/audits/service-worker.js | explanationBadStartUrl": { - "message": "T̂h́îś p̂áĝé îś ĉón̂t́r̂ól̂ĺêd́ b̂ý â śêŕv̂íĉé ŵór̂ḱêŕ, ĥóŵév̂ér̂ t́ĥé ŝt́âŕt̂_úr̂ĺ ({startUrl}) îś n̂ót̂ ín̂ t́ĥé ŝér̂v́îćê ẃôŕk̂ér̂'ś ŝćôṕê ({scopeUrl})" + "message": "T̂h́îś p̂áĝé îś ĉón̂t́r̂ól̂ĺêd́ b̂ý â śêŕv̂íĉé ŵór̂ḱêŕ, ĥóŵév̂ér̂ t́ĥé `start_url` ({startUrl}) îś n̂ót̂ ín̂ t́ĥé ŝér̂v́îćê ẃôŕk̂ér̂'ś ŝćôṕê ({scopeUrl})" }, "lighthouse-core/audits/service-worker.js | explanationNoManifest": { - "message": "T̂h́îś p̂áĝé îś ĉón̂t́r̂ól̂ĺêd́ b̂ý â śêŕv̂íĉé ŵór̂ḱêŕ, ĥóŵév̂ér̂ ńô śt̂ár̂t́_ûŕl̂ ẃâś f̂óûńd̂ b́êćâúŝé n̂ó m̂án̂íf̂éŝt́ ŵáŝ f́êt́ĉh́êd́." + "message": "T̂h́îś p̂áĝé îś ĉón̂t́r̂ól̂ĺêd́ b̂ý â śêŕv̂íĉé ŵór̂ḱêŕ, ĥóŵév̂ér̂ ńô `start_url` ẃâś f̂óûńd̂ b́êćâúŝé n̂ó m̂án̂íf̂éŝt́ ŵáŝ f́êt́ĉh́êd́." }, "lighthouse-core/audits/service-worker.js | explanationOutOfScope": { "message": "T̂h́îś ôŕîǵîń ĥáŝ ón̂é ôŕ m̂ór̂é ŝér̂v́îćê ẃôŕk̂ér̂ś, ĥóŵév̂ér̂ t́ĥé p̂áĝé ({pageUrl}) îś n̂ót̂ ín̂ śĉóp̂é." }, "lighthouse-core/audits/service-worker.js | failureTitle": { - "message": "D̂óêś n̂ót̂ ŕêǵîśt̂ér̂ á ŝér̂v́îćê ẃôŕk̂ér̂ t́ĥát̂ ćôńt̂ŕôĺŝ ṕâǵê án̂d́ ŝt́âŕt̂_úr̂ĺ" + "message": "D̂óêś n̂ót̂ ŕêǵîśt̂ér̂ á ŝér̂v́îćê ẃôŕk̂ér̂ t́ĥát̂ ćôńt̂ŕôĺŝ ṕâǵê án̂d́ `start_url`" }, "lighthouse-core/audits/service-worker.js | title": { - "message": "R̂éĝíŝt́êŕŝ á ŝér̂v́îćê ẃôŕk̂ér̂ t́ĥát̂ ćôńt̂ŕôĺŝ ṕâǵê án̂d́ ŝt́âŕt̂_úr̂ĺ" + "message": "R̂éĝíŝt́êŕŝ á ŝér̂v́îćê ẃôŕk̂ér̂ t́ĥát̂ ćôńt̂ŕôĺŝ ṕâǵê án̂d́ `start_url`" }, "lighthouse-core/audits/splash-screen.js | description": { "message": " t́ĥém̂éd̂ śp̂ĺâśĥ śĉŕêén̂ én̂śûŕêś â h́îǵĥ-q́ûál̂ít̂ý êx́p̂ér̂íêńĉé ŵh́êń ûśêŕŝ ĺâún̂ćĥ ýôúr̂ áp̂ṕ f̂ŕôḿ t̂h́êír̂ h́ôḿêśĉŕêén̂ś. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen)." @@ -1170,7 +1170,7 @@ "message": "Ĉúr̂ŕêńt̂ ṕâǵê ŕêśp̂ón̂d́ŝ ẃît́ĥ á 200 ŵh́êń ôf́f̂ĺîńê" }, "lighthouse-core/audits/works-offline.js | warningNoLoad": { - "message": "T̂h́ê ṕâǵê ḿâý b̂é n̂ót̂ ĺôád̂ín̂ǵ ôf́f̂ĺîńê b́êćâúŝé ŷóûŕ t̂éŝt́ ÛŔL̂ ({requested}) ẃâś r̂éd̂ír̂éĉt́êd́ t̂ó \"{final}\". T̂ŕŷ t́êśt̂ín̂ǵ t̂h́ê śêćôńd̂ ÚR̂Ĺ d̂ír̂éĉt́l̂ý." + "message": "T̂h́ê ṕâǵê ḿâý n̂ót̂ b́ê ĺôád̂ín̂ǵ ôf́f̂ĺîńê b́êćâúŝé ŷóûŕ t̂éŝt́ ÛŔL̂ ({requested}) ẃâś r̂éd̂ír̂éĉt́êd́ t̂ó \"{final}\". T̂ŕŷ t́êśt̂ín̂ǵ t̂h́ê śêćôńd̂ ÚR̂Ĺ d̂ír̂éĉt́l̂ý." }, "lighthouse-core/config/default-config.js | a11yAriaGroupDescription": { "message": "T̂h́êśê ár̂é ôṕp̂ór̂t́ûńît́îéŝ t́ô ím̂ṕr̂óv̂é t̂h́ê úŝáĝé ôf́ ÂŔÎÁ îń ŷóûŕ âṕp̂ĺîćât́îón̂ ẃĥíĉh́ m̂áŷ én̂h́âńĉé t̂h́ê éx̂ṕêŕîén̂ćê f́ôŕ ûśêŕŝ óf̂ áŝśîśt̂ív̂é t̂éĉh́n̂ól̂óĝý, l̂ík̂é â śĉŕêén̂ ŕêád̂ér̂." From 227c97c98e385728215c3e2decb7da99dc59a7ae Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 7 Aug 2019 14:34:55 -0700 Subject: [PATCH 19/24] update tests, update sample json, fix linting. --- lighthouse-core/audits/offline-start-url.js | 4 ++-- lighthouse-core/test/audits/offline-start-url-test.js | 2 +- lighthouse-core/test/audits/service-worker-test.js | 8 ++++---- lighthouse-core/test/results/sample_v2.json | 6 +++--- proto/sample_v2_round_trip.json | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lighthouse-core/audits/offline-start-url.js b/lighthouse-core/audits/offline-start-url.js index 31f972c03aa0..88b78d248a63 100644 --- a/lighthouse-core/audits/offline-start-url.js +++ b/lighthouse-core/audits/offline-start-url.js @@ -20,8 +20,8 @@ const UIStrings = { * @description Warning that the audit couldn't find the start_url and used the page's URL instead. * @example {No Manifest Fetched.} manifestWarning * */ - warningCantStart: 'Lighthouse couldn\'t read the `start_url` from the manifest. As a result, the ' + - '`start_url` was assumed to be the document\'s URL. Error message: \'{manifestWarning}\'.', + warningCantStart: 'Lighthouse couldn\'t read the `start_url` from the manifest. As a result, ' + + 'the `start_url` was assumed to be the document\'s URL. Error message: \'{manifestWarning}\'.', }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); diff --git a/lighthouse-core/test/audits/offline-start-url-test.js b/lighthouse-core/test/audits/offline-start-url-test.js index 85631b7cea96..ac0af0264228 100644 --- a/lighthouse-core/test/audits/offline-start-url-test.js +++ b/lighthouse-core/test/audits/offline-start-url-test.js @@ -69,6 +69,6 @@ describe('Offline start_url audit', () => { assert.strictEqual(result.explanation, undefined); assert.strictEqual(result.warnings.length, 1); expect(result.warnings[0]).toBeDisplayString( - /Lighthouse couldn't read the start_url.*ERROR: start_url.*\./); + /Lighthouse couldn't read the `start_url`.*ERROR: start_url.*\./); }); }); diff --git a/lighthouse-core/test/audits/service-worker-test.js b/lighthouse-core/test/audits/service-worker-test.js index 1c0eec33a2db..1149b18f2e3d 100644 --- a/lighthouse-core/test/audits/service-worker-test.js +++ b/lighthouse-core/test/audits/service-worker-test.js @@ -132,7 +132,7 @@ describe('Offline: service worker audit', () => { const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); assert.strictEqual(output.score, 0); expect(output.explanation).toBeDisplayString('This page is controlled by a service worker, ' + - `however the start_url (${startUrl}) is not in the service worker's scope (${scopeURL})`); + `however the \`start_url\` (${startUrl}) is not in the service worker's scope (${scopeURL})`); }); it('fails when explicit scopeURL puts the page URL out of scope', () => { @@ -258,7 +258,7 @@ describe('Offline: service worker audit', () => { const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); assert.strictEqual(output.score, 0); expect(output.explanation).toBeDisplayString('This page is controlled by a service worker, ' + - `however the start_url (${startUrl}) is not in the service worker's scope (${scopeURL})`); + `however the \`start_url\` (${startUrl}) is not in the service worker's scope (${scopeURL})`); }); it('fails when a manifest was not found', () => { @@ -272,7 +272,7 @@ describe('Offline: service worker audit', () => { const output = ServiceWorker.audit(createArtifacts(swOpts, finalUrl, manifest)); assert.strictEqual(output.score, 0); expect(output.explanation).toBeDisplayString('This page is controlled by a service worker, ' + - 'however no start_url was found because no manifest was fetched.'); + 'however no `start_url` was found because no manifest was fetched.'); }); it('fails when a manifest is invalid', () => { @@ -288,6 +288,6 @@ describe('Offline: service worker audit', () => { const output = ServiceWorker.audit(artifacts); assert.strictEqual(output.score, 0); expect(output.explanation).toBeDisplayString('This page is controlled by a service worker, ' + - 'however no start_url was found because manifest failed to parse as valid JSON'); + 'however no `start_url` was found because manifest failed to parse as valid JSON'); }); }); diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index 784fb36d42a3..0da2d09c0390 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -43,7 +43,7 @@ }, "service-worker": { "id": "service-worker", - "title": "Does not register a service worker that controls page and start_url", + "title": "Does not register a service worker that controls page and `start_url`", "description": "The service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).", "score": 0, "scoreDisplayMode": "binary" @@ -1285,7 +1285,7 @@ }, "offline-start-url": { "id": "offline-start-url", - "title": "start_url does not respond with a 200 when offline", + "title": "`start_url` does not respond with a 200 when offline", "description": "A service worker enables your web app to be reliable in unpredictable network conditions. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/http-200-when-offline).", "score": 0, "scoreDisplayMode": "binary", @@ -1541,7 +1541,7 @@ "pwa-each-page-has-url": { "id": "pwa-each-page-has-url", "title": "Each page has a URL", - "description": "Ensure individual pages are deep linkable via the URLs and that URLs are unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).", + "description": "Ensure individual pages are deep linkable via URL and that URLs are unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).", "score": null, "scoreDisplayMode": "manual" }, diff --git a/proto/sample_v2_round_trip.json b/proto/sample_v2_round_trip.json index 1b0ce5330731..a48ef2737253 100644 --- a/proto/sample_v2_round_trip.json +++ b/proto/sample_v2_round_trip.json @@ -1998,7 +1998,7 @@ "id": "offline-start-url", "score": 0.0, "scoreDisplayMode": "binary", - "title": "start_url does not respond with a 200 when offline", + "title": "`start_url` does not respond with a 200 when offline", "warnings": [] }, "offscreen-content-hidden": { @@ -2177,7 +2177,7 @@ "title": "Site works cross-browser" }, "pwa-each-page-has-url": { - "description": "Ensure individual pages are deep linkable via the URLs and that URLs are unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).", + "description": "Ensure individual pages are deep linkable via URL and that URLs are unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).", "id": "pwa-each-page-has-url", "score": null, "scoreDisplayMode": "manual", @@ -2427,7 +2427,7 @@ "id": "service-worker", "score": 0.0, "scoreDisplayMode": "binary", - "title": "Does not register a service worker that controls page and start_url" + "title": "Does not register a service worker that controls page and `start_url`" }, "speed-index": { "description": "Speed Index shows how quickly the contents of a page are visibly populated. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/speed-index).", From f2bb698e427f3ed63a22113040b39576ef9a8441 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 7 Aug 2019 15:00:02 -0700 Subject: [PATCH 20/24] fixed offline-start-url test --- lighthouse-core/test/audits/offline-start-url-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lighthouse-core/test/audits/offline-start-url-test.js b/lighthouse-core/test/audits/offline-start-url-test.js index ac0af0264228..3e238720ab39 100644 --- a/lighthouse-core/test/audits/offline-start-url-test.js +++ b/lighthouse-core/test/audits/offline-start-url-test.js @@ -69,6 +69,6 @@ describe('Offline start_url audit', () => { assert.strictEqual(result.explanation, undefined); assert.strictEqual(result.warnings.length, 1); expect(result.warnings[0]).toBeDisplayString( - /Lighthouse couldn't read the `start_url`.*ERROR: start_url.*\./); + /Lighthouse couldn't read the `start_url`.*ERROR: start_url must be same-origin as document/); }); }); From bf154380b21294c20d8bf781be98d10a247699c1 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 7 Aug 2019 15:01:37 -0700 Subject: [PATCH 21/24] TODO to issue from username --- lighthouse-core/audits/themed-omnibox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lighthouse-core/audits/themed-omnibox.js b/lighthouse-core/audits/themed-omnibox.js index 287592826ec5..2295a98ff8e1 100644 --- a/lighthouse-core/audits/themed-omnibox.js +++ b/lighthouse-core/audits/themed-omnibox.js @@ -60,7 +60,7 @@ class ThemedOmnibox extends MultiCheckAudit { */ static assessMetaThemecolor(themeColorMeta, failures) { if (!themeColorMeta) { - // TODO(exterkamp): i18n + // TODO(#7238): i18n failures.push('No `` tag found'); } else if (!ThemedOmnibox.isValidColor(themeColorMeta.content || '')) { failures.push('The theme-color meta tag did not contain a valid CSS color'); From 27984af2db8f9aedc8e7b5ac51c8d5435b5338f1 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Wed, 7 Aug 2019 15:05:47 -0700 Subject: [PATCH 22/24] add viewport code spans! --- lighthouse-core/audits/viewport.js | 4 ++-- lighthouse-core/lib/i18n/locales/en-US.json | 4 ++-- lighthouse-core/lib/i18n/locales/en-XL.json | 4 ++-- lighthouse-core/test/audits/viewport-test.js | 2 +- lighthouse-core/test/results/sample_v2.json | 2 +- proto/sample_v2_round_trip.json | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lighthouse-core/audits/viewport.js b/lighthouse-core/audits/viewport.js index 172b24ef6f64..6f67a0de1978 100644 --- a/lighthouse-core/audits/viewport.js +++ b/lighthouse-core/audits/viewport.js @@ -16,10 +16,10 @@ const UIStrings = { failureTitle: 'Does not have a `` tag with `width` ' + 'or `initial-scale`', /** Description of a Lighthouse audit that tells the user why they should have a viewport meta tag in their html. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ - description: 'Add a viewport meta tag to optimize your app for mobile screens. ' + + description: 'Add a `` tag to optimize your app for mobile screens. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).', /** Explanatory message stating that no viewport meta tag exists on the page. */ - explanationNoTag: 'No viewport meta tag found', + explanationNoTag: 'No `` tag found', }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); diff --git a/lighthouse-core/lib/i18n/locales/en-US.json b/lighthouse-core/lib/i18n/locales/en-US.json index 1e34c1dcc22e..3f7e81129932 100644 --- a/lighthouse-core/lib/i18n/locales/en-US.json +++ b/lighthouse-core/lib/i18n/locales/en-US.json @@ -1137,10 +1137,10 @@ "message": "Preload key requests" }, "lighthouse-core/audits/viewport.js | description": { - "message": "Add a viewport meta tag to optimize your app for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag)." + "message": "Add a `` tag to optimize your app for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag)." }, "lighthouse-core/audits/viewport.js | explanationNoTag": { - "message": "No viewport meta tag found" + "message": "No `` tag found" }, "lighthouse-core/audits/viewport.js | failureTitle": { "message": "Does not have a `` tag with `width` or `initial-scale`" diff --git a/lighthouse-core/lib/i18n/locales/en-XL.json b/lighthouse-core/lib/i18n/locales/en-XL.json index a15b503d5935..6c002b3e2942 100644 --- a/lighthouse-core/lib/i18n/locales/en-XL.json +++ b/lighthouse-core/lib/i18n/locales/en-XL.json @@ -1137,10 +1137,10 @@ "message": "P̂ŕêĺôád̂ ḱêý r̂éq̂úêśt̂ś" }, "lighthouse-core/audits/viewport.js | description": { - "message": "Âd́d̂ á v̂íêẃp̂ór̂t́ m̂ét̂á t̂áĝ t́ô óp̂t́îḿîźê ýôúr̂ áp̂ṕ f̂ór̂ ḿôb́îĺê śĉŕêén̂ś. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag)." + "message": "Âd́d̂ á `` t̂áĝ t́ô óp̂t́îḿîźê ýôúr̂ áp̂ṕ f̂ór̂ ḿôb́îĺê śĉŕêén̂ś. [L̂éâŕn̂ ḿôŕê](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag)." }, "lighthouse-core/audits/viewport.js | explanationNoTag": { - "message": "N̂ó v̂íêẃp̂ór̂t́ m̂ét̂á t̂áĝ f́ôún̂d́" + "message": "N̂ó `` t̂áĝ f́ôún̂d́" }, "lighthouse-core/audits/viewport.js | failureTitle": { "message": "D̂óêś n̂ót̂ h́âv́ê á `` t̂áĝ ẃît́ĥ `width` ór̂ `initial-scale`" diff --git a/lighthouse-core/test/audits/viewport-test.js b/lighthouse-core/test/audits/viewport-test.js index cf82395c15c1..a129d0268e30 100644 --- a/lighthouse-core/test/audits/viewport-test.js +++ b/lighthouse-core/test/audits/viewport-test.js @@ -19,7 +19,7 @@ describe('Mobile-friendly: viewport audit', () => { MetaElements: [], }, fakeContext); assert.equal(auditResult.score, 0); - expect(auditResult.explanation).toBeDisplayString('No viewport meta tag found'); + expect(auditResult.explanation).toBeDisplayString('No `` tag found'); }); it('fails when HTML contains a non-mobile friendly viewport meta tag', async () => { diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index 0da2d09c0390..4972ad2f1af1 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -59,7 +59,7 @@ "viewport": { "id": "viewport", "title": "Has a `` tag with `width` or `initial-scale`", - "description": "Add a viewport meta tag to optimize your app for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).", + "description": "Add a `` tag to optimize your app for mobile screens. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag).", "score": 1, "scoreDisplayMode": "binary", "warnings": [] diff --git a/proto/sample_v2_round_trip.json b/proto/sample_v2_round_trip.json index a48ef2737253..2374ed153783 100644 --- a/proto/sample_v2_round_trip.json +++ b/proto/sample_v2_round_trip.json @@ -3183,7 +3183,7 @@ "title": "`