core: use LCP specific message for NO_LCP (#14556)

This commit is contained in:
Adam Raine 2022-11-22 11:56:09 -08:00 коммит произвёл GitHub
Родитель 184865a987
Коммит e3f2337d73
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -23,6 +23,11 @@ const UIStrings = {
* @example {NO_FCP} errorCode
* */
noFcp: 'The page did not paint any content. Please ensure you keep the browser window in the foreground during the load and try again. ({errorCode})',
/**
* @description Error message explaining that the Largest Contentful Paint metric was not seen during the page load.
* @example {NO_LCP} errorCode
* */
noLcp: 'The page did not display content that qualifies as a Largest Contentful Paint (LCP). Ensure the page has a valid LCP element and then try again. ({errorCode})',
/**
* @description Error message explaining that the page loaded too slowly to perform a Lighthouse run.
* @example {NO_TTI_CPU_IDLE_PERIOD} errorCode
@ -273,11 +278,11 @@ const ERRORS = {
},
NO_LCP: {
code: 'NO_LCP',
message: UIStrings.badTraceRecording,
message: UIStrings.noLcp,
},
NO_LCP_ALL_FRAMES: {
code: 'NO_LCP_ALL_FRAMES',
message: UIStrings.badTraceRecording,
message: UIStrings.noLcp,
},
UNSUPPORTED_OLD_CHROME: {
code: 'UNSUPPORTED_OLD_CHROME',

3
shared/localization/locales/en-US.json сгенерированный
Просмотреть файл

@ -2384,6 +2384,9 @@
"core/lib/lh-error.js | noFcp": {
"message": "The page did not paint any content. Please ensure you keep the browser window in the foreground during the load and try again. ({errorCode})"
},
"core/lib/lh-error.js | noLcp": {
"message": "The page did not display content that qualifies as a Largest Contentful Paint (LCP). Ensure the page has a valid LCP element and then try again. ({errorCode})"
},
"core/lib/lh-error.js | notHtml": {
"message": "The page provided is not HTML (served as MIME type {mimeType})."
},

3
shared/localization/locales/en-XL.json сгенерированный
Просмотреть файл

@ -2384,6 +2384,9 @@
"core/lib/lh-error.js | noFcp": {
"message": "T̂h́ê ṕâǵê d́îd́ n̂ót̂ ṕâín̂t́ âńŷ ćôńt̂én̂t́. P̂ĺêáŝé êńŝúr̂é ŷóû ḱêép̂ t́ĥé b̂ŕôẃŝér̂ ẃîńd̂óŵ ín̂ t́ĥé f̂ór̂éĝŕôún̂d́ d̂úr̂ín̂ǵ t̂h́ê ĺôád̂ án̂d́ t̂ŕŷ áĝáîń. ({errorCode})"
},
"core/lib/lh-error.js | noLcp": {
"message": "T̂h́ê ṕâǵê d́îd́ n̂ót̂ d́îśp̂ĺâý ĉón̂t́êńt̂ t́ĥát̂ q́ûál̂íf̂íêś âś â Ĺâŕĝéŝt́ Ĉón̂t́êńt̂f́ûĺ P̂áîńt̂ (ĹĈṔ). Êńŝúr̂é t̂h́ê ṕâǵê h́âś â v́âĺîd́ L̂ĆP̂ él̂ém̂én̂t́ âńd̂ t́ĥén̂ t́r̂ý âǵâín̂. ({errorCode})"
},
"core/lib/lh-error.js | notHtml": {
"message": "T̂h́ê ṕâǵê ṕr̂óv̂íd̂éd̂ íŝ ńôt́ ĤT́M̂Ĺ (ŝér̂v́êd́ âś M̂ÍM̂É t̂ýp̂é {mimeType})."
},