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

misc(treemap): add lang to html tag #13454

Merged
merged 2 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions treemap/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->

<!doctype html>
<html>
<html lang="en">

<head>
<meta charset="utf-8">
Expand Down Expand Up @@ -76,7 +76,7 @@ <h1 class="treemap-placeholder__heading">Lighthouse Treemap</h1>
<path fill="url(#lh-topbar__logo--d)" fill-rule="nonzero" d="M6 0l4.125 2.625v3.75H12v2.25h-1.688l1.5 9.375H.188l1.5-9.375H0v-2.25h1.875V2.648z" transform="translate(6 3)"/>
</g>
</svg>

<span class="lh-header--title lh-text-dim">Lighthouse Treemap</span>
</span>

Expand Down
4 changes: 3 additions & 1 deletion treemap/app/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,9 @@ class LighthouseTreemap {
TreemapUtil.find('.treemap-placeholder').classList.add('hidden');
TreemapUtil.find('main').classList.remove('hidden');

const i18n = new I18n(options.lhr.configSettings.locale, {
const locale = options.lhr.configSettings.locale;
document.documentElement.lang = locale;
const i18n = new I18n(locale, {
// Set missing renderer strings to default (english) values.
...TreemapUtil.UIStrings,
// `strings` is generated in build/build-treemap.js
Expand Down