Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

report(i18n): set lang attribute according to locale #5805

Closed
wants to merge 1 commit into from

Conversation

paulirish
Copy link
Member

No description provided.

@paulirish paulirish changed the title set lang attribute on HTML report report(i18n): set lang attribute according to locale Aug 7, 2018
Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • what's the best practice here...is this superior to setting it with JS?
  • needs a test

@@ -40,6 +40,7 @@ class ReportGenerator {
const sanitizedJavascript = htmlReportAssets.REPORT_JAVASCRIPT.replace(/<\//g, '\\u003c/');

return ReportGenerator.replaceStrings(htmlReportAssets.REPORT_TEMPLATE, [
{search: '%%LIGHTHOUSE_LOCALE%%', replacement: lhr.configSettings.locale},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should have a fallback for older lhrs without a locale?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants