lighthouse 9.5.0-dev.20220605 → 9.5.0-dev.20220608

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.
@@ -5757,6 +5757,30 @@ function renderReport(lhr, opts = {}) {
5757
5757
  return rootEl;
5758
5758
  }
5759
5759
 
5760
- const swapLocale = _ => {}; const format = _ => {};
5760
+ /**
5761
+ * Returns a new LHR with all strings changed to the new requestedLocale.
5762
+ * @param {LH.Result} lhr
5763
+ * @param {LH.Locale} requestedLocale
5764
+ * @return {{lhr: LH.Result, missingIcuMessageIds: string[]}}
5765
+ */
5766
+ function swapLocale(lhr, requestedLocale) {
5767
+ // Stub function only included for types
5768
+ return {
5769
+ lhr,
5770
+ missingIcuMessageIds: [],
5771
+ };
5772
+ }
5773
+
5774
+ /**
5775
+ * Populate the i18n string lookup dict with locale data
5776
+ * Used when the host environment selects the locale and serves lighthouse the intended locale file
5777
+ * @see https://docs.google.com/document/d/1jnt3BqKB-4q3AE94UWFA0Gqspx8Sd_jivlB7gQMlmfk/edit
5778
+ * @param {LH.Locale} locale
5779
+ * @param {Record<string, {message: string}>} lhlMessages
5780
+ */
5781
+ function registerLocaleData(locale, lhlMessages) {
5782
+ // Stub function only included for types
5783
+ }
5784
+ const format = {registerLocaleData};
5761
5785
 
5762
5786
  export { DOM, ReportRenderer, ReportUIFeatures, format, renderReport, swapLocale };