-
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
report: rename i18n to i18n-formatter, move strings to Util #13933
Conversation
9a816ae
to
b770045
Compare
@@ -805,6 +819,7 @@ const UIStrings = { | |||
runtimeCustom: 'Custom throttling', | |||
}; | |||
Util.UIStrings = UIStrings; | |||
Util.strings = {...UIStrings}; |
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.
What was the reason we set these "static" variables here rather than in the class declaration? Might be a good comment to add.
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.
In this case, it's because moving UIStrings declaration to be before the class
will be bad for git blame
history. I'm not sure that's a particularly useful thing to call out in a comment tho
return i18n; | ||
return { | ||
formatter: Util.formatter, | ||
strings: Util.strings as typeof UIStrings & typeof Util.UIStrings, |
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.
nit
strings: Util.strings as typeof UIStrings & typeof Util.UIStrings, | |
strings: Util.strings as (typeof UIStrings & typeof Util.UIStrings), |
bumping |
the main idea was to disambiguate these files: I guess I'm fine with the property still being |
Descriptive but not optimal in this context, maybe? FWIW there's also |
All of
renderer/i18n.js
is formatting stuff, but it also doubled as a home for strings (including state, applying strings from the LHR). this pr:strings
stuff toUtil