-
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
docs: add i18n overview & authoring documentation #9361
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.
LGTM thanks for reorganizing this stream of conscious into a real README!
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!
boy do I want a snack now though :)
|
||
# Writing UIStrings with LHL | ||
|
||
❗TODO(exterkamp): explain all the comments and where they go/what they become. |
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.
should we leave this out/file issues for them?
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.
imo I was going to handle that in #9114 once it was reimported 🤷♂️
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.
should we just block this PR on #9114? The implementation may still change until that lands...
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.
let's land the doc. 9114 can always adjust anything as need be.
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.
I'd like to do a review then, please, so I'm not just doing a review of it in #9114 after all
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.
Ooops. Sorry just saw this right after i merged. Happy to take your review and i'll do whatever followups you're thinking
lighthouse-core/lib/i18n/README.md
Outdated
* To specify the description, use | ||
* `@description <description>` | ||
* To specify an example for an ICU replacement, use | ||
* `@example {<ICU variable name>} <example for ICU replacement>` |
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.
are we leaving it at {variableName} replacement example
then?
|
||
`{timeInMs, number, milliseconds}` is called _Complex ICU_ since the replacement is for complex numbers and uses the custom formatters in Lighthouse. The supported complex ICU formats are: `milliseconds`, `seconds`, `bytes`, `percent`, and `extendedPercent`. | ||
|
||
These complex ICU formats are automatically given @example values during `yarn i18n`. Therefore, a normal description string can be used: |
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.
❤️ dope!
Co-Authored-By: Patrick Hulce <[email protected]>
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Patrick Hulce <[email protected]>
Co-Authored-By: Patrick Hulce <[email protected]>
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
@exterkamp deserves credit for writing this.
I've just spent some time reorganizing it and editing things.
Figured we'd just land this separate to keep the review separate from shane's great placeholders PR (#9114).