-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
i18n(report): runtime settings and tools #9166
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice @exterkamp!!
dropdownSaveHTML: 'Save as HTML', | ||
/** Option in a dropdown menu that save the Lighthouse JSON object to the local system as a '.json' file. */ | ||
dropdownSaveJSON: 'Save as JSON', | ||
/** Option in a dropdown menu that opens the current report in the Lighthouse Viewer Application. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LVA, I like it 😎
@@ -418,69 +418,67 @@ class Util { | |||
|
|||
return [ | |||
{ | |||
name: 'Device', | |||
name: this.UIStrings.runtimeSettingsDevice, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason we need to use this
instead of Util
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No not really, I was following the prior art for that file, but using this.
for only this file seems bad.
|
||
return { | ||
deviceEmulation, | ||
cpuThrottling, | ||
networkThrottling, | ||
summary: `${deviceEmulation}, ${summary}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did we just not use this? 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah forgot to mention, we removed this in the new report redesign. It was on the top header, but no more!
Changed collision count to 17 for util collisions. Improved how collect-strings surfaces collisions in error msg.
lighthouse-core/test/report/html/renderer/report-ui-features-test.js
Outdated
Show resolved
Hide resolved
Co-Authored-By: Connor Clark <cjamcl@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/** Descriptive explanation for emulation setting when no device emulation is set. */ | ||
runtimeNoEmulation: 'No emulation', | ||
/** Descriptive explanation for emulation setting when emulating a Nexus 5X mobile device. */ | ||
runtimeMobileEmulation: 'Emulated Nexus 5X', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heads up Moto G4 conflict ahead :) #10191
@exterkamp FYI there appear to be axe-related unit test failures on the report |
Nevermind all that snapshotting stuff, my repo was messed up. The ignoring of |
Summary
i18n runtime settings (static strings only) and dropdown tools. Also modify report-ui-features so that it i18n's it's strings (third-party-resources wasn't actually i18n'ing).
Notes:
{var}
syntax) in order to incorporate strings like150 ms TCP RTT, 1,638.4 Kbps throughput (Simulated)
properly, e.g.{timeInMs, number, milliseconds} TCP RTT, {throughput, number, bytes} throughput (Simulated)
. So they are left as-is in this PR, with a follow up TODO.Generated by Lighthouse 5.1.0
needs to be an ICU replacement as well, but for the same reason cannot be 😦, so I added a TODO.Summary
is no longer used in runtime settings post 5.x report renderersproto
is a crime. Who would possibly think proto was a good idea?Screenshot examples of i18n'd runtime settings in
ja
(google translate translations, they probably don't really make a ton of sense in Japanese)Related Issues/PRs
part of: #7238