lighthouse 12.8.2-dev.20250924 → 12.8.2-dev.20250925
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/test/smokehouse/version-check.d.ts +1 -1
- package/core/config/default-config.js +0 -3
- package/core/gather/gatherers/image-elements.js +32 -6
- package/core/lib/emulation.d.ts +10 -0
- package/core/lib/emulation.js +21 -6
- package/core/lib/legacy-javascript/legacy-javascript.js +4 -11
- package/core/lib/proto-preprocessor.js +5 -3
- package/package.json +3 -4
- package/readme.md +1 -1
- package/report/renderer/details-renderer.d.ts +1 -2
- package/report/renderer/details-renderer.js +0 -1
- package/shared/localization/locales/ar-XB.json +0 -30
- package/shared/localization/locales/ar.json +0 -30
- package/shared/localization/locales/bg.json +0 -30
- package/shared/localization/locales/ca.json +0 -30
- package/shared/localization/locales/cs.json +0 -30
- package/shared/localization/locales/da.json +0 -30
- package/shared/localization/locales/de.json +0 -30
- package/shared/localization/locales/el.json +0 -30
- package/shared/localization/locales/en-GB.json +0 -30
- package/shared/localization/locales/en-US.json +0 -30
- package/shared/localization/locales/en-XA.json +0 -30
- package/shared/localization/locales/en-XL.json +0 -30
- package/shared/localization/locales/es-419.json +0 -30
- package/shared/localization/locales/es.json +0 -30
- package/shared/localization/locales/fi.json +0 -30
- package/shared/localization/locales/fil.json +0 -30
- package/shared/localization/locales/fr.json +0 -30
- package/shared/localization/locales/he.json +0 -30
- package/shared/localization/locales/hi.json +0 -30
- package/shared/localization/locales/hr.json +0 -30
- package/shared/localization/locales/hu.json +0 -30
- package/shared/localization/locales/id.json +0 -30
- package/shared/localization/locales/it.json +0 -30
- package/shared/localization/locales/ja.json +0 -30
- package/shared/localization/locales/ko.json +0 -30
- package/shared/localization/locales/lt.json +0 -30
- package/shared/localization/locales/lv.json +0 -30
- package/shared/localization/locales/nl.json +0 -30
- package/shared/localization/locales/no.json +0 -30
- package/shared/localization/locales/pl.json +0 -30
- package/shared/localization/locales/pt-PT.json +0 -30
- package/shared/localization/locales/pt.json +0 -30
- package/shared/localization/locales/ro.json +0 -30
- package/shared/localization/locales/ru.json +0 -30
- package/shared/localization/locales/sk.json +0 -30
- package/shared/localization/locales/sl.json +0 -30
- package/shared/localization/locales/sr-Latn.json +0 -30
- package/shared/localization/locales/sr.json +0 -30
- package/shared/localization/locales/sv.json +0 -30
- package/shared/localization/locales/ta.json +0 -30
- package/shared/localization/locales/te.json +0 -30
- package/shared/localization/locales/th.json +0 -30
- package/shared/localization/locales/tr.json +0 -30
- package/shared/localization/locales/uk.json +0 -30
- package/shared/localization/locales/vi.json +0 -30
- package/shared/localization/locales/zh-HK.json +0 -30
- package/shared/localization/locales/zh-TW.json +0 -30
- package/shared/localization/locales/zh.json +0 -30
- package/shared/localization/locales.d.ts +2 -0
- package/shared/localization/locales.js +130 -139
- package/shared/tsconfig.json +2 -0
- package/tsconfig-base.json +1 -1
- package/tsconfig.json +1 -1
- package/types/artifacts.d.ts +0 -33
- package/core/audits/seo/font-size.d.ts +0 -24
- package/core/audits/seo/font-size.js +0 -344
- package/core/gather/gatherers/seo/font-size.d.ts +0 -131
- package/core/gather/gatherers/seo/font-size.js +0 -347
|
@@ -1316,36 +1316,6 @@
|
|
|
1316
1316
|
"core/audits/seo/crawlable-anchors.js | title": {
|
|
1317
1317
|
"message": "รวบรวมข้อมูลลิงก์ได้"
|
|
1318
1318
|
},
|
|
1319
|
-
"core/audits/seo/font-size.js | additionalIllegibleText": {
|
|
1320
|
-
"message": "ข้อความอื่นที่อ่านได้ไม่ชัดเจน"
|
|
1321
|
-
},
|
|
1322
|
-
"core/audits/seo/font-size.js | columnFontSize": {
|
|
1323
|
-
"message": "ขนาดแบบอักษร"
|
|
1324
|
-
},
|
|
1325
|
-
"core/audits/seo/font-size.js | columnPercentPageText": {
|
|
1326
|
-
"message": "% ของข้อความในหน้า"
|
|
1327
|
-
},
|
|
1328
|
-
"core/audits/seo/font-size.js | columnSelector": {
|
|
1329
|
-
"message": "ตัวเลือก"
|
|
1330
|
-
},
|
|
1331
|
-
"core/audits/seo/font-size.js | description": {
|
|
1332
|
-
"message": "ขนาดตัวอักษรที่เล็กกว่า 12 พิกเซลจะเล็กเกินไปจนอ่านไม่ออกและทำให้ผู้เข้าชมบนมือถือต้องใช้นิ้วซูมเพื่ออ่าน พยายามให้ข้อความในหน้าเว็บมากกว่า 60% มีขนาดอย่างน้อย 12 พิกเซล [ดูข้อมูลเพิ่มเติมเกี่ยวกับขนาดแบบอักษรที่อ่านง่าย](https://developer.chrome.com/docs/lighthouse/seo/font-size/)"
|
|
1333
|
-
},
|
|
1334
|
-
"core/audits/seo/font-size.js | displayValue": {
|
|
1335
|
-
"message": "ข้อความที่อ่านได้ชัดเจน {decimalProportion, number, extendedPercent}"
|
|
1336
|
-
},
|
|
1337
|
-
"core/audits/seo/font-size.js | explanationViewport": {
|
|
1338
|
-
"message": "ข้อความอ่านได้ไม่ชัดเจนเพราะไม่มีเมตาแท็กวิวพอร์ตที่เพิ่มประสิทธิภาพให้เหมาะกับหน้าจอมือถือ"
|
|
1339
|
-
},
|
|
1340
|
-
"core/audits/seo/font-size.js | failureTitle": {
|
|
1341
|
-
"message": "เอกสารไม่ได้ใช้ขนาดตัวอักษรที่อ่านได้ชัดเจน"
|
|
1342
|
-
},
|
|
1343
|
-
"core/audits/seo/font-size.js | legibleText": {
|
|
1344
|
-
"message": "ข้อความที่อ่านได้ชัดเจน"
|
|
1345
|
-
},
|
|
1346
|
-
"core/audits/seo/font-size.js | title": {
|
|
1347
|
-
"message": "เอกสารใช้ขนาดตัวอักษรที่อ่านได้ชัดเจน"
|
|
1348
|
-
},
|
|
1349
1319
|
"core/audits/seo/hreflang.js | description": {
|
|
1350
1320
|
"message": "ลิงก์ hreflang จะบอกให้เครื่องมือค้นหาทราบถึงเวอร์ชันของหน้าเว็บที่ควรแสดงในผลการค้นหาสำหรับแต่ละภาษาหรือภูมิภาค [ดูข้อมูลเพิ่มเติมเกี่ยวกับ `hreflang`](https://developer.chrome.com/docs/lighthouse/seo/hreflang/)"
|
|
1351
1321
|
},
|
|
@@ -1316,36 +1316,6 @@
|
|
|
1316
1316
|
"core/audits/seo/crawlable-anchors.js | title": {
|
|
1317
1317
|
"message": "Bağlantılar taranabilir"
|
|
1318
1318
|
},
|
|
1319
|
-
"core/audits/seo/font-size.js | additionalIllegibleText": {
|
|
1320
|
-
"message": "Okunabilir olmayan ek metin"
|
|
1321
|
-
},
|
|
1322
|
-
"core/audits/seo/font-size.js | columnFontSize": {
|
|
1323
|
-
"message": "Yazı Tipi Boyutu"
|
|
1324
|
-
},
|
|
1325
|
-
"core/audits/seo/font-size.js | columnPercentPageText": {
|
|
1326
|
-
"message": "Sayfa Metninin %'si"
|
|
1327
|
-
},
|
|
1328
|
-
"core/audits/seo/font-size.js | columnSelector": {
|
|
1329
|
-
"message": "Seçici"
|
|
1330
|
-
},
|
|
1331
|
-
"core/audits/seo/font-size.js | description": {
|
|
1332
|
-
"message": "12 pikselden küçük yazı tipi boyutları okunamayacak kadar küçüktür ve mobil cihaz kullanıcılarının içeriği okuyabilmek için parmaklarıyla sıkıştırma hareketi yaparak yakınlaştırmalarını gerektirir. Sayfanın %60'ından fazlasının en az 12 piksel boyutunda olmasını sağlamaya çalışın. [Okunaklı yazı tipi boyutları hakkında daha fazla bilgi edinin](https://developer.chrome.com/docs/lighthouse/seo/font-size/)."
|
|
1333
|
-
},
|
|
1334
|
-
"core/audits/seo/font-size.js | displayValue": {
|
|
1335
|
-
"message": "{decimalProportion, number, extendedPercent} kadar okunabilir metin"
|
|
1336
|
-
},
|
|
1337
|
-
"core/audits/seo/font-size.js | explanationViewport": {
|
|
1338
|
-
"message": "Mobil ekranlar için optimize edilmiş görüntü alanı meta etiketi olmadığından metin okunaklı değil."
|
|
1339
|
-
},
|
|
1340
|
-
"core/audits/seo/font-size.js | failureTitle": {
|
|
1341
|
-
"message": "Dokümanda okunabilir yazı tipi boyutları kullanılmıyor"
|
|
1342
|
-
},
|
|
1343
|
-
"core/audits/seo/font-size.js | legibleText": {
|
|
1344
|
-
"message": "Okunabilir metin"
|
|
1345
|
-
},
|
|
1346
|
-
"core/audits/seo/font-size.js | title": {
|
|
1347
|
-
"message": "Dokümanda okunabilir yazı tipi boyutları kullanılıyor"
|
|
1348
|
-
},
|
|
1349
1319
|
"core/audits/seo/hreflang.js | description": {
|
|
1350
1320
|
"message": "hreflang bağlantıları, arama motorlarına, belirli bir dildeki veya bölgedeki arama sonuçlarında bir sayfanın hangi sürümünün listeleneceğini bildirir. [`hreflang` hakkında daha fazla bilgi edinin](https://developer.chrome.com/docs/lighthouse/seo/hreflang/)."
|
|
1351
1321
|
},
|
|
@@ -1316,36 +1316,6 @@
|
|
|
1316
1316
|
"core/audits/seo/crawlable-anchors.js | title": {
|
|
1317
1317
|
"message": "Посилання можна сканувати"
|
|
1318
1318
|
},
|
|
1319
|
-
"core/audits/seo/font-size.js | additionalIllegibleText": {
|
|
1320
|
-
"message": "Інший нечитабельний текст"
|
|
1321
|
-
},
|
|
1322
|
-
"core/audits/seo/font-size.js | columnFontSize": {
|
|
1323
|
-
"message": "Розмір шрифту"
|
|
1324
|
-
},
|
|
1325
|
-
"core/audits/seo/font-size.js | columnPercentPageText": {
|
|
1326
|
-
"message": "% тексту на сторінці"
|
|
1327
|
-
},
|
|
1328
|
-
"core/audits/seo/font-size.js | columnSelector": {
|
|
1329
|
-
"message": "Селектор"
|
|
1330
|
-
},
|
|
1331
|
-
"core/audits/seo/font-size.js | description": {
|
|
1332
|
-
"message": "Розміри шрифту до 12px замалі й нечитабельні. Щоб користувачі мобільних пристроїв змогли прочитати текст, їм потрібно буде збільшувати масштаб пальцями. Бажано, щоб понад 60% тексту на сторінці було написано щонайменше шрифтом 12px. [Докладніше про читабельні розміри шрифтів.](https://developer.chrome.com/docs/lighthouse/seo/font-size/)"
|
|
1333
|
-
},
|
|
1334
|
-
"core/audits/seo/font-size.js | displayValue": {
|
|
1335
|
-
"message": "{decimalProportion, number, extendedPercent} читабельного тексту"
|
|
1336
|
-
},
|
|
1337
|
-
"core/audits/seo/font-size.js | explanationViewport": {
|
|
1338
|
-
"message": "Текст нечитабельний, оскільки метатег області перегляду не оптимізовано для мобільних пристроїв."
|
|
1339
|
-
},
|
|
1340
|
-
"core/audits/seo/font-size.js | failureTitle": {
|
|
1341
|
-
"message": "У документі використано нечитабельні розміри шрифтів"
|
|
1342
|
-
},
|
|
1343
|
-
"core/audits/seo/font-size.js | legibleText": {
|
|
1344
|
-
"message": "Читабельний текст"
|
|
1345
|
-
},
|
|
1346
|
-
"core/audits/seo/font-size.js | title": {
|
|
1347
|
-
"message": "У документі використано читабельні розміри шрифтів"
|
|
1348
|
-
},
|
|
1349
1319
|
"core/audits/seo/hreflang.js | description": {
|
|
1350
1320
|
"message": "Посилання hreflang указують пошуковим системам версію сторінки, яку потрібно додати в результати пошуку для певної мови чи регіону. [Докладніше про атрибут `hreflang`.](https://developer.chrome.com/docs/lighthouse/seo/hreflang/)"
|
|
1351
1321
|
},
|
|
@@ -1316,36 +1316,6 @@
|
|
|
1316
1316
|
"core/audits/seo/crawlable-anchors.js | title": {
|
|
1317
1317
|
"message": "Các đường liên kết có thể thu thập thông tin"
|
|
1318
1318
|
},
|
|
1319
|
-
"core/audits/seo/font-size.js | additionalIllegibleText": {
|
|
1320
|
-
"message": "Văn bản bổ sung khó đọc"
|
|
1321
|
-
},
|
|
1322
|
-
"core/audits/seo/font-size.js | columnFontSize": {
|
|
1323
|
-
"message": "Cỡ chữ"
|
|
1324
|
-
},
|
|
1325
|
-
"core/audits/seo/font-size.js | columnPercentPageText": {
|
|
1326
|
-
"message": "% văn bản trên trang"
|
|
1327
|
-
},
|
|
1328
|
-
"core/audits/seo/font-size.js | columnSelector": {
|
|
1329
|
-
"message": "Bộ chọn"
|
|
1330
|
-
},
|
|
1331
|
-
"core/audits/seo/font-size.js | description": {
|
|
1332
|
-
"message": "Cỡ chữ dưới 12 pixel là quá nhỏ và khó đọc, buộc khách truy cập trên thiết bị di động phải \"chụm để thu phóng\" mới đọc được. Tốt nhất là hơn 60% văn bản trên trang có cỡ chữ lớn hơn hoặc bằng 12 pixel. [Tìm hiểu thêm về cỡ chữ dễ đọc](https://developer.chrome.com/docs/lighthouse/seo/font-size/)."
|
|
1333
|
-
},
|
|
1334
|
-
"core/audits/seo/font-size.js | displayValue": {
|
|
1335
|
-
"message": "{decimalProportion, number, extendedPercent} văn bản dễ đọc"
|
|
1336
|
-
},
|
|
1337
|
-
"core/audits/seo/font-size.js | explanationViewport": {
|
|
1338
|
-
"message": "Văn bản không đọc được vì không có thẻ meta viewport nào được tối ưu hóa cho màn hình thiết bị di động."
|
|
1339
|
-
},
|
|
1340
|
-
"core/audits/seo/font-size.js | failureTitle": {
|
|
1341
|
-
"message": "Tài liệu không sử dụng cỡ chữ dễ đọc"
|
|
1342
|
-
},
|
|
1343
|
-
"core/audits/seo/font-size.js | legibleText": {
|
|
1344
|
-
"message": "Văn bản dễ đọc"
|
|
1345
|
-
},
|
|
1346
|
-
"core/audits/seo/font-size.js | title": {
|
|
1347
|
-
"message": "Tài liệu sử dụng cỡ chữ dễ đọc"
|
|
1348
|
-
},
|
|
1349
1319
|
"core/audits/seo/hreflang.js | description": {
|
|
1350
1320
|
"message": "Các phần tử liên kết hreflang cho công cụ tìm kiếm biết nên liệt kê phiên bản trang nào trong kết quả tìm kiếm cho một ngôn ngữ hoặc khu vực cụ thể. [Tìm hiểu thêm về `hreflang`](https://developer.chrome.com/docs/lighthouse/seo/hreflang/)."
|
|
1351
1321
|
},
|
|
@@ -1316,36 +1316,6 @@
|
|
|
1316
1316
|
"core/audits/seo/crawlable-anchors.js | title": {
|
|
1317
1317
|
"message": "可檢索的連結"
|
|
1318
1318
|
},
|
|
1319
|
-
"core/audits/seo/font-size.js | additionalIllegibleText": {
|
|
1320
|
-
"message": "其他難以辨識的文字"
|
|
1321
|
-
},
|
|
1322
|
-
"core/audits/seo/font-size.js | columnFontSize": {
|
|
1323
|
-
"message": "字型大小"
|
|
1324
|
-
},
|
|
1325
|
-
"core/audits/seo/font-size.js | columnPercentPageText": {
|
|
1326
|
-
"message": "頁面文字百分比"
|
|
1327
|
-
},
|
|
1328
|
-
"core/audits/seo/font-size.js | columnSelector": {
|
|
1329
|
-
"message": "選取器"
|
|
1330
|
-
},
|
|
1331
|
-
"core/audits/seo/font-size.js | description": {
|
|
1332
|
-
"message": "如果字型小於 12 像素,文字會太小而難以辨識,流動裝置訪客需要「兩指縮放」才能閱讀內容。網頁中應有超過 60% 採用最少 12 像素的文字。[進一步瞭解清晰易讀的字型大小](https://developer.chrome.com/docs/lighthouse/seo/font-size/)。"
|
|
1333
|
-
},
|
|
1334
|
-
"core/audits/seo/font-size.js | displayValue": {
|
|
1335
|
-
"message": "{decimalProportion, number, extendedPercent} 的文字清晰可讀"
|
|
1336
|
-
},
|
|
1337
|
-
"core/audits/seo/font-size.js | explanationViewport": {
|
|
1338
|
-
"message": "由於網頁沒有為流動裝置螢幕設定合適的檢視區中繼標記,因文字難以辨識。"
|
|
1339
|
-
},
|
|
1340
|
-
"core/audits/seo/font-size.js | failureTitle": {
|
|
1341
|
-
"message": "文件使用的字型大小難以辨識"
|
|
1342
|
-
},
|
|
1343
|
-
"core/audits/seo/font-size.js | legibleText": {
|
|
1344
|
-
"message": "清晰可讀的文字"
|
|
1345
|
-
},
|
|
1346
|
-
"core/audits/seo/font-size.js | title": {
|
|
1347
|
-
"message": "文件使用的字型大小清晰可讀"
|
|
1348
|
-
},
|
|
1349
1319
|
"core/audits/seo/hreflang.js | description": {
|
|
1350
1320
|
"message": "hreflang 連結會通知搜尋引擎,應在特定語言或區域的搜尋結果中該顯示哪個版本的網頁。[進一步瞭解 `hreflang`](https://developer.chrome.com/docs/lighthouse/seo/hreflang/)。"
|
|
1351
1321
|
},
|
|
@@ -1316,36 +1316,6 @@
|
|
|
1316
1316
|
"core/audits/seo/crawlable-anchors.js | title": {
|
|
1317
1317
|
"message": "可檢索的連結"
|
|
1318
1318
|
},
|
|
1319
|
-
"core/audits/seo/font-size.js | additionalIllegibleText": {
|
|
1320
|
-
"message": "其他難以辨識的文字"
|
|
1321
|
-
},
|
|
1322
|
-
"core/audits/seo/font-size.js | columnFontSize": {
|
|
1323
|
-
"message": "字型大小"
|
|
1324
|
-
},
|
|
1325
|
-
"core/audits/seo/font-size.js | columnPercentPageText": {
|
|
1326
|
-
"message": "頁面文字百分比"
|
|
1327
|
-
},
|
|
1328
|
-
"core/audits/seo/font-size.js | columnSelector": {
|
|
1329
|
-
"message": "選取器"
|
|
1330
|
-
},
|
|
1331
|
-
"core/audits/seo/font-size.js | description": {
|
|
1332
|
-
"message": "如果字型小於 12 像素,文字會太小而難以辨識;行動裝置訪客必須「以雙指撥動縮放」才能閱讀內容。網頁中應有超過 60% 的文字採用 12 像素以上的大小。[進一步瞭解清晰易讀的字型大小](https://developer.chrome.com/docs/lighthouse/seo/font-size/)。"
|
|
1333
|
-
},
|
|
1334
|
-
"core/audits/seo/font-size.js | displayValue": {
|
|
1335
|
-
"message": "{decimalProportion, number, extendedPercent} 的文字清晰易讀"
|
|
1336
|
-
},
|
|
1337
|
-
"core/audits/seo/font-size.js | explanationViewport": {
|
|
1338
|
-
"message": "文字難以辨識,這是因為網頁沒有針對行動裝置螢幕設定合適的可視區域中繼標記。"
|
|
1339
|
-
},
|
|
1340
|
-
"core/audits/seo/font-size.js | failureTitle": {
|
|
1341
|
-
"message": "文件使用的字型大小難以辨識"
|
|
1342
|
-
},
|
|
1343
|
-
"core/audits/seo/font-size.js | legibleText": {
|
|
1344
|
-
"message": "清晰易讀的文字"
|
|
1345
|
-
},
|
|
1346
|
-
"core/audits/seo/font-size.js | title": {
|
|
1347
|
-
"message": "文件使用的字型大小清晰易讀"
|
|
1348
|
-
},
|
|
1349
1319
|
"core/audits/seo/hreflang.js | description": {
|
|
1350
1320
|
"message": "hreflang 連結會告訴搜尋引擎在特定語言或區域的搜尋結果中應顯示哪種版本的網頁。[進一步瞭解 `hreflang`](https://developer.chrome.com/docs/lighthouse/seo/hreflang/)。"
|
|
1351
1321
|
},
|
|
@@ -1316,36 +1316,6 @@
|
|
|
1316
1316
|
"core/audits/seo/crawlable-anchors.js | title": {
|
|
1317
1317
|
"message": "链接都是可抓取的"
|
|
1318
1318
|
},
|
|
1319
|
-
"core/audits/seo/font-size.js | additionalIllegibleText": {
|
|
1320
|
-
"message": "其他无法辨认的文字"
|
|
1321
|
-
},
|
|
1322
|
-
"core/audits/seo/font-size.js | columnFontSize": {
|
|
1323
|
-
"message": "字号"
|
|
1324
|
-
},
|
|
1325
|
-
"core/audits/seo/font-size.js | columnPercentPageText": {
|
|
1326
|
-
"message": "网页文本百分比"
|
|
1327
|
-
},
|
|
1328
|
-
"core/audits/seo/font-size.js | columnSelector": {
|
|
1329
|
-
"message": "选择器"
|
|
1330
|
-
},
|
|
1331
|
-
"core/audits/seo/font-size.js | description": {
|
|
1332
|
-
"message": "12px 以下的字体过小,会导致用户无法辨认;此外,这样的字体需要移动设备访问者“张合双指进行缩放”才能阅读。请尽量让 60% 以上的页面文字不小于 12px。[详细了解清晰可辨的字体大小](https://developer.chrome.com/docs/lighthouse/seo/font-size/)。"
|
|
1333
|
-
},
|
|
1334
|
-
"core/audits/seo/font-size.js | displayValue": {
|
|
1335
|
-
"message": "{decimalProportion, number, extendedPercent} 清晰可辨的文字"
|
|
1336
|
-
},
|
|
1337
|
-
"core/audits/seo/font-size.js | explanationViewport": {
|
|
1338
|
-
"message": "无法辨认文字,因为缺少已针对移动设备屏幕进行优化的 viewport meta 标记。"
|
|
1339
|
-
},
|
|
1340
|
-
"core/audits/seo/font-size.js | failureTitle": {
|
|
1341
|
-
"message": "文档未使用清晰可辨的字体大小"
|
|
1342
|
-
},
|
|
1343
|
-
"core/audits/seo/font-size.js | legibleText": {
|
|
1344
|
-
"message": "清晰可辨的文字"
|
|
1345
|
-
},
|
|
1346
|
-
"core/audits/seo/font-size.js | title": {
|
|
1347
|
-
"message": "文档所用的字体大小清晰可辨"
|
|
1348
|
-
},
|
|
1349
1319
|
"core/audits/seo/hreflang.js | description": {
|
|
1350
1320
|
"message": "hreflang 链接用于告知搜索引擎应在特定语言或地区的搜索结果中显示哪种版本的网页。[详细了解 `hreflang`](https://developer.chrome.com/docs/lighthouse/seo/hreflang/)。"
|
|
1351
1321
|
},
|
|
@@ -2,6 +2,8 @@ export type Locale = import("../../types/lhr/settings").Locale;
|
|
|
2
2
|
export type LhlMessages = Record<string, {
|
|
3
3
|
message: string;
|
|
4
4
|
}>;
|
|
5
|
+
/** @typedef {import('../../types/lhr/settings').Locale} Locale */
|
|
6
|
+
/** @typedef {Record<string, {message: string}>} LhlMessages */
|
|
5
7
|
/** @type {Record<Locale, LhlMessages>} */
|
|
6
8
|
export const locales: Record<Locale, LhlMessages>;
|
|
7
9
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -21,158 +21,149 @@
|
|
|
21
21
|
|
|
22
22
|
// TODO(paulirish): Centralize locale inheritance (combining this & i18n.lookupLocale()), adopt cldr parentLocale rules.
|
|
23
23
|
|
|
24
|
-
import
|
|
25
|
-
|
|
26
|
-
import
|
|
24
|
+
import ar from './locales/ar.json' with { type: 'json' };
|
|
25
|
+
import arXB from './locales/ar-XB.json' with { type: 'json' };
|
|
26
|
+
import bg from './locales/bg.json' with { type: 'json' };
|
|
27
|
+
import ca from './locales/ca.json' with { type: 'json'};
|
|
28
|
+
import cs from './locales/cs.json' with { type: 'json'};
|
|
29
|
+
import da from './locales/da.json' with { type: 'json'};
|
|
30
|
+
import de from './locales/de.json' with { type: 'json'};
|
|
31
|
+
import el from './locales/el.json' with { type: 'json'};
|
|
32
|
+
import enGB from './locales/en-GB.json' with { type: 'json'};
|
|
33
|
+
import enUS from './locales/en-US.json' with { type: 'json'};
|
|
34
|
+
import enXA from './locales/en-XA.json' with { type: 'json'};
|
|
35
|
+
import enXL from './locales/en-XL.json' with { type: 'json'};
|
|
36
|
+
import es from './locales/es.json' with { type: 'json'};
|
|
37
|
+
import es419 from './locales/es-419.json' with { type: 'json'};
|
|
38
|
+
import fi from './locales/fi.json' with { type: 'json'};
|
|
39
|
+
import fil from './locales/fil.json' with { type: 'json'};
|
|
40
|
+
import fr from './locales/fr.json' with { type: 'json'};
|
|
41
|
+
import he from './locales/he.json' with { type: 'json'};
|
|
42
|
+
import hi from './locales/hi.json' with { type: 'json'};
|
|
43
|
+
import hr from './locales/hr.json' with { type: 'json'};
|
|
44
|
+
import hu from './locales/hu.json' with { type: 'json'};
|
|
45
|
+
import id from './locales/id.json' with { type: 'json'};
|
|
46
|
+
import it from './locales/it.json' with { type: 'json'};
|
|
47
|
+
import ja from './locales/ja.json' with { type: 'json'};
|
|
48
|
+
import ko from './locales/ko.json' with { type: 'json'};
|
|
49
|
+
import lt from './locales/lt.json' with { type: 'json'};
|
|
50
|
+
import lv from './locales/lv.json' with { type: 'json'};
|
|
51
|
+
import nl from './locales/nl.json' with { type: 'json'};
|
|
52
|
+
import no from './locales/no.json' with { type: 'json'};
|
|
53
|
+
import pl from './locales/pl.json' with { type: 'json'};
|
|
54
|
+
import pt from './locales/pt.json' with { type: 'json'};
|
|
55
|
+
import ptPT from './locales/pt-PT.json' with { type: 'json'};
|
|
56
|
+
import ro from './locales/ro.json' with { type: 'json'};
|
|
57
|
+
import ru from './locales/ru.json' with { type: 'json'};
|
|
58
|
+
import sk from './locales/sk.json' with { type: 'json'};
|
|
59
|
+
import sl from './locales/sl.json' with { type: 'json'};
|
|
60
|
+
import sr from './locales/sr.json' with { type: 'json'};
|
|
61
|
+
import srLatn from './locales/sr-Latn.json' with { type: 'json'};
|
|
62
|
+
import sv from './locales/sv.json' with { type: 'json'};
|
|
63
|
+
import ta from './locales/ta.json' with { type: 'json'};
|
|
64
|
+
import te from './locales/te.json' with { type: 'json'};
|
|
65
|
+
import th from './locales/th.json' with { type: 'json'};
|
|
66
|
+
import tr from './locales/tr.json' with { type: 'json'};
|
|
67
|
+
import uk from './locales/uk.json' with { type: 'json'};
|
|
68
|
+
import vi from './locales/vi.json' with { type: 'json'};
|
|
69
|
+
import zh from './locales/zh.json' with { type: 'json'};
|
|
70
|
+
import zhHK from './locales/zh-HK.json' with { type: 'json'};
|
|
71
|
+
import zhTW from './locales/zh-TW.json' with { type: 'json'};
|
|
27
72
|
|
|
28
73
|
/** @typedef {import('../../types/lhr/settings').Locale} Locale */
|
|
29
74
|
/** @typedef {Record<string, {message: string}>} LhlMessages */
|
|
30
75
|
|
|
31
|
-
const moduleDir = getModuleDirectory(import.meta);
|
|
32
|
-
|
|
33
|
-
/** @type {Record<string, LhlMessages>} */
|
|
34
|
-
const files = {
|
|
35
|
-
'ar': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ar.json`, 'utf8')),
|
|
36
|
-
'ar-XB': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ar-XB.json`, 'utf8')),
|
|
37
|
-
'bg': JSON.parse(fs.readFileSync(`${moduleDir}/locales/bg.json`, 'utf8')),
|
|
38
|
-
'ca': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ca.json`, 'utf8')),
|
|
39
|
-
'cs': JSON.parse(fs.readFileSync(`${moduleDir}/locales/cs.json`, 'utf8')),
|
|
40
|
-
'da': JSON.parse(fs.readFileSync(`${moduleDir}/locales/da.json`, 'utf8')),
|
|
41
|
-
'de': JSON.parse(fs.readFileSync(`${moduleDir}/locales/de.json`, 'utf8')),
|
|
42
|
-
'el': JSON.parse(fs.readFileSync(`${moduleDir}/locales/el.json`, 'utf8')),
|
|
43
|
-
'en-GB': JSON.parse(fs.readFileSync(`${moduleDir}/locales/en-GB.json`, 'utf8')),
|
|
44
|
-
'en-US': JSON.parse(fs.readFileSync(`${moduleDir}/locales/en-US.json`, 'utf8')),
|
|
45
|
-
'en-XA': JSON.parse(fs.readFileSync(`${moduleDir}/locales/en-XA.json`, 'utf8')),
|
|
46
|
-
'en-XL': JSON.parse(fs.readFileSync(`${moduleDir}/locales/en-XL.json`, 'utf8')),
|
|
47
|
-
'es': JSON.parse(fs.readFileSync(`${moduleDir}/locales/es.json`, 'utf8')),
|
|
48
|
-
'es-419': JSON.parse(fs.readFileSync(`${moduleDir}/locales/es-419.json`, 'utf8')),
|
|
49
|
-
'fi': JSON.parse(fs.readFileSync(`${moduleDir}/locales/fi.json`, 'utf8')),
|
|
50
|
-
'fil': JSON.parse(fs.readFileSync(`${moduleDir}/locales/fil.json`, 'utf8')),
|
|
51
|
-
'fr': JSON.parse(fs.readFileSync(`${moduleDir}/locales/fr.json`, 'utf8')),
|
|
52
|
-
'he': JSON.parse(fs.readFileSync(`${moduleDir}/locales/he.json`, 'utf8')),
|
|
53
|
-
'hi': JSON.parse(fs.readFileSync(`${moduleDir}/locales/hi.json`, 'utf8')),
|
|
54
|
-
'hr': JSON.parse(fs.readFileSync(`${moduleDir}/locales/hr.json`, 'utf8')),
|
|
55
|
-
'hu': JSON.parse(fs.readFileSync(`${moduleDir}/locales/hu.json`, 'utf8')),
|
|
56
|
-
'id': JSON.parse(fs.readFileSync(`${moduleDir}/locales/id.json`, 'utf8')),
|
|
57
|
-
'it': JSON.parse(fs.readFileSync(`${moduleDir}/locales/it.json`, 'utf8')),
|
|
58
|
-
'ja': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ja.json`, 'utf8')),
|
|
59
|
-
'ko': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ko.json`, 'utf8')),
|
|
60
|
-
'lt': JSON.parse(fs.readFileSync(`${moduleDir}/locales/lt.json`, 'utf8')),
|
|
61
|
-
'lv': JSON.parse(fs.readFileSync(`${moduleDir}/locales/lv.json`, 'utf8')),
|
|
62
|
-
'nl': JSON.parse(fs.readFileSync(`${moduleDir}/locales/nl.json`, 'utf8')),
|
|
63
|
-
'no': JSON.parse(fs.readFileSync(`${moduleDir}/locales/no.json`, 'utf8')),
|
|
64
|
-
'pl': JSON.parse(fs.readFileSync(`${moduleDir}/locales/pl.json`, 'utf8')),
|
|
65
|
-
'pt': JSON.parse(fs.readFileSync(`${moduleDir}/locales/pt.json`, 'utf8')),
|
|
66
|
-
'pt-PT': JSON.parse(fs.readFileSync(`${moduleDir}/locales/pt-PT.json`, 'utf8')),
|
|
67
|
-
'ro': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ro.json`, 'utf8')),
|
|
68
|
-
'ru': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ru.json`, 'utf8')),
|
|
69
|
-
'sk': JSON.parse(fs.readFileSync(`${moduleDir}/locales/sk.json`, 'utf8')),
|
|
70
|
-
'sl': JSON.parse(fs.readFileSync(`${moduleDir}/locales/sl.json`, 'utf8')),
|
|
71
|
-
'sr': JSON.parse(fs.readFileSync(`${moduleDir}/locales/sr.json`, 'utf8')),
|
|
72
|
-
'sr-Latn': JSON.parse(fs.readFileSync(`${moduleDir}/locales/sr-Latn.json`, 'utf8')),
|
|
73
|
-
'sv': JSON.parse(fs.readFileSync(`${moduleDir}/locales/sv.json`, 'utf8')),
|
|
74
|
-
'ta': JSON.parse(fs.readFileSync(`${moduleDir}/locales/ta.json`, 'utf8')),
|
|
75
|
-
'te': JSON.parse(fs.readFileSync(`${moduleDir}/locales/te.json`, 'utf8')),
|
|
76
|
-
'th': JSON.parse(fs.readFileSync(`${moduleDir}/locales/th.json`, 'utf8')),
|
|
77
|
-
'tr': JSON.parse(fs.readFileSync(`${moduleDir}/locales/tr.json`, 'utf8')),
|
|
78
|
-
'uk': JSON.parse(fs.readFileSync(`${moduleDir}/locales/uk.json`, 'utf8')),
|
|
79
|
-
'vi': JSON.parse(fs.readFileSync(`${moduleDir}/locales/vi.json`, 'utf8')),
|
|
80
|
-
'zh': JSON.parse(fs.readFileSync(`${moduleDir}/locales/zh.json`, 'utf8')),
|
|
81
|
-
'zh-HK': JSON.parse(fs.readFileSync(`${moduleDir}/locales/zh-HK.json`, 'utf8')),
|
|
82
|
-
'zh-TW': JSON.parse(fs.readFileSync(`${moduleDir}/locales/zh-TW.json`, 'utf8')),
|
|
83
|
-
};
|
|
84
|
-
|
|
85
76
|
// The keys within this const must exactly match the LH.Locale type in externs.d.ts
|
|
86
77
|
/** @type {Record<Locale, LhlMessages>} */
|
|
87
78
|
const locales = {
|
|
88
|
-
'en-US':
|
|
89
|
-
'en':
|
|
79
|
+
'en-US': enUS, // The 'source' strings, with descriptions
|
|
80
|
+
'en': enUS, // According to CLDR/ICU, 'en' == 'en-US' dates/numbers (Why?!)
|
|
90
81
|
|
|
91
82
|
// TODO: en-GB has just ~10 messages that are different from en-US. We should only ship those.
|
|
92
|
-
'en-AU':
|
|
93
|
-
'en-GB':
|
|
94
|
-
'en-IE':
|
|
95
|
-
'en-SG':
|
|
96
|
-
'en-ZA':
|
|
97
|
-
'en-IN':
|
|
83
|
+
'en-AU': enGB, // Alias of 'en-GB'
|
|
84
|
+
'en-GB': enGB, // Alias of 'en-GB'
|
|
85
|
+
'en-IE': enGB, // Alias of 'en-GB'
|
|
86
|
+
'en-SG': enGB, // Alias of 'en-GB'
|
|
87
|
+
'en-ZA': enGB, // Alias of 'en-GB'
|
|
88
|
+
'en-IN': enGB, // Alias of 'en-GB'
|
|
98
89
|
|
|
99
90
|
// All locales from here have a messages file, though we allow fallback to the base locale when the files are identical
|
|
100
|
-
'ar-XB':
|
|
101
|
-
'ar':
|
|
102
|
-
'bg':
|
|
103
|
-
'ca':
|
|
104
|
-
'cs':
|
|
105
|
-
'da':
|
|
106
|
-
'de':
|
|
107
|
-
'el':
|
|
108
|
-
'en-XA':
|
|
109
|
-
'en-XL':
|
|
110
|
-
'es':
|
|
111
|
-
'es-419':
|
|
91
|
+
'ar-XB': arXB, // psuedolocalization
|
|
92
|
+
'ar': ar,
|
|
93
|
+
'bg': bg,
|
|
94
|
+
'ca': ca,
|
|
95
|
+
'cs': cs,
|
|
96
|
+
'da': da,
|
|
97
|
+
'de': de, // de-AT, de-CH identical, so they fall back into de
|
|
98
|
+
'el': el,
|
|
99
|
+
'en-XA': enXA, // psuedolocalization
|
|
100
|
+
'en-XL': enXL, // local psuedolocalization
|
|
101
|
+
'es': es,
|
|
102
|
+
'es-419': es419,
|
|
112
103
|
// Aliases of es-419: https://raw.githubusercontent.com/unicode-cldr/cldr-core/master/supplemental/parentLocales.json
|
|
113
|
-
'es-AR':
|
|
114
|
-
'es-BO':
|
|
115
|
-
'es-BR':
|
|
116
|
-
'es-BZ':
|
|
117
|
-
'es-CL':
|
|
118
|
-
'es-CO':
|
|
119
|
-
'es-CR':
|
|
120
|
-
'es-CU':
|
|
121
|
-
'es-DO':
|
|
122
|
-
'es-EC':
|
|
123
|
-
'es-GT':
|
|
124
|
-
'es-HN':
|
|
125
|
-
'es-MX':
|
|
126
|
-
'es-NI':
|
|
127
|
-
'es-PA':
|
|
128
|
-
'es-PE':
|
|
129
|
-
'es-PR':
|
|
130
|
-
'es-PY':
|
|
131
|
-
'es-SV':
|
|
132
|
-
'es-US':
|
|
133
|
-
'es-UY':
|
|
134
|
-
'es-VE':
|
|
104
|
+
'es-AR': es419,
|
|
105
|
+
'es-BO': es419,
|
|
106
|
+
'es-BR': es419,
|
|
107
|
+
'es-BZ': es419,
|
|
108
|
+
'es-CL': es419,
|
|
109
|
+
'es-CO': es419,
|
|
110
|
+
'es-CR': es419,
|
|
111
|
+
'es-CU': es419,
|
|
112
|
+
'es-DO': es419,
|
|
113
|
+
'es-EC': es419,
|
|
114
|
+
'es-GT': es419,
|
|
115
|
+
'es-HN': es419,
|
|
116
|
+
'es-MX': es419,
|
|
117
|
+
'es-NI': es419,
|
|
118
|
+
'es-PA': es419,
|
|
119
|
+
'es-PE': es419,
|
|
120
|
+
'es-PR': es419,
|
|
121
|
+
'es-PY': es419,
|
|
122
|
+
'es-SV': es419,
|
|
123
|
+
'es-US': es419,
|
|
124
|
+
'es-UY': es419,
|
|
125
|
+
'es-VE': es419,
|
|
135
126
|
|
|
136
|
-
'fi':
|
|
137
|
-
'fil':
|
|
138
|
-
'fr':
|
|
139
|
-
'he':
|
|
140
|
-
'hi':
|
|
141
|
-
'hr':
|
|
142
|
-
'hu':
|
|
143
|
-
'gsw':
|
|
144
|
-
'id':
|
|
145
|
-
'in':
|
|
146
|
-
'it':
|
|
147
|
-
'iw':
|
|
148
|
-
'ja':
|
|
149
|
-
'ko':
|
|
150
|
-
'lt':
|
|
151
|
-
'lv':
|
|
152
|
-
'mo':
|
|
153
|
-
'nl':
|
|
154
|
-
'nb':
|
|
155
|
-
'no':
|
|
156
|
-
'pl':
|
|
157
|
-
'pt':
|
|
158
|
-
'pt-PT':
|
|
159
|
-
'ro':
|
|
160
|
-
'ru':
|
|
161
|
-
'sk':
|
|
162
|
-
'sl':
|
|
163
|
-
'sr':
|
|
164
|
-
'sr-Latn':
|
|
165
|
-
'sv':
|
|
166
|
-
'ta':
|
|
167
|
-
'te':
|
|
168
|
-
'th':
|
|
169
|
-
'tl':
|
|
170
|
-
'tr':
|
|
171
|
-
'uk':
|
|
172
|
-
'vi':
|
|
173
|
-
'zh':
|
|
174
|
-
'zh-HK':
|
|
175
|
-
'zh-TW':
|
|
127
|
+
'fi': fi,
|
|
128
|
+
'fil': fil,
|
|
129
|
+
'fr': fr, // fr-CH identical, so it falls back into fr
|
|
130
|
+
'he': he,
|
|
131
|
+
'hi': hi,
|
|
132
|
+
'hr': hr,
|
|
133
|
+
'hu': hu,
|
|
134
|
+
'gsw': de, // swiss german. identical (for our purposes) to 'de'
|
|
135
|
+
'id': id,
|
|
136
|
+
'in': id, // Alias of 'id'
|
|
137
|
+
'it': it,
|
|
138
|
+
'iw': he, // Alias of 'he'
|
|
139
|
+
'ja': ja,
|
|
140
|
+
'ko': ko,
|
|
141
|
+
'lt': lt,
|
|
142
|
+
'lv': lv,
|
|
143
|
+
'mo': ro, // Alias of 'ro'
|
|
144
|
+
'nl': nl,
|
|
145
|
+
'nb': no, // Alias of 'no'
|
|
146
|
+
'no': no,
|
|
147
|
+
'pl': pl,
|
|
148
|
+
'pt': pt, // pt-BR identical, so it falls back into pt
|
|
149
|
+
'pt-PT': ptPT,
|
|
150
|
+
'ro': ro,
|
|
151
|
+
'ru': ru,
|
|
152
|
+
'sk': sk,
|
|
153
|
+
'sl': sl,
|
|
154
|
+
'sr': sr,
|
|
155
|
+
'sr-Latn': srLatn,
|
|
156
|
+
'sv': sv,
|
|
157
|
+
'ta': ta,
|
|
158
|
+
'te': te,
|
|
159
|
+
'th': th,
|
|
160
|
+
'tl': fil, // Alias of 'fil'
|
|
161
|
+
'tr': tr,
|
|
162
|
+
'uk': uk,
|
|
163
|
+
'vi': vi,
|
|
164
|
+
'zh': zh, // aka ZH-Hans, sometimes seen as zh-CN, zh-Hans-CN, Simplified Chinese
|
|
165
|
+
'zh-HK': zhHK, // aka zh-Hant-HK. Note: yue-Hant-HK is not supported.
|
|
166
|
+
'zh-TW': zhTW, // aka zh-Hant, zh-Hant-TW, Traditional Chinese
|
|
176
167
|
};
|
|
177
168
|
|
|
178
169
|
export {locales};
|
package/shared/tsconfig.json
CHANGED
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
// Only include `@types/node` from node_modules/.
|
|
7
7
|
"types": ["node"],
|
|
8
8
|
// "listFiles": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
9
10
|
},
|
|
10
11
|
"references": [
|
|
11
12
|
{"path": "../types/lhr/"},
|
|
12
13
|
],
|
|
13
14
|
"include": [
|
|
14
15
|
"**/*.js",
|
|
16
|
+
"**/*.json",
|
|
15
17
|
"types/**/*.d.ts",
|
|
16
18
|
],
|
|
17
19
|
"exclude": [
|
package/tsconfig-base.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"core/test/fixtures/unresolved-perflog.json",
|
|
26
26
|
"core/test/fixtures/traces/lcp-m78.devtools.log.json",
|
|
27
27
|
"core/lib/legacy-javascript/polyfill-graph-data.json",
|
|
28
|
+
"core/lib/legacy-javascript/polyfill-module-data.json",
|
|
28
29
|
"shared/localization/locales/en-US.json",
|
|
29
30
|
],
|
|
30
31
|
"exclude": [
|
|
@@ -55,7 +56,6 @@
|
|
|
55
56
|
"core/test/gather/gatherers/link-elements-test.js",
|
|
56
57
|
"core/test/gather/gatherers/offline-test.js",
|
|
57
58
|
"core/test/gather/gatherers/runtime-exceptions-test.js",
|
|
58
|
-
"core/test/gather/gatherers/seo/font-size-test.js",
|
|
59
59
|
"core/test/gather/gatherers/source-maps-test.js",
|
|
60
60
|
"core/test/gather/gatherers/stack-collector-test.js",
|
|
61
61
|
"core/test/gather/gatherers/start-url-test.js",
|