-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add localize-mixin sandbox demo #3503
Conversation
5a9b0b3
to
9d9ed5a
Compare
2fd1f4e
to
ece82ae
Compare
"files": "mixins/demo/**.html", | ||
"rules": { | ||
"quotes": 0, | ||
"no-undef": 0, | ||
"indent": 0 | ||
} |
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.
This was added here, unnecessarily because we reverted the related demo changes.
d773c24
to
67305df
Compare
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.
This is very cool! 😎
67305df
to
b8252cb
Compare
b8252cb
to
8b22a90
Compare
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
|
9966d0a
to
cd26fc5
Compare
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.
Really cool! As mentioned in standup, this might get even more visibility and use if it became part of our (currently sparse but hopefully better one day) localization documentation on the Daylight Site.
@@ -0,0 +1,63 @@ | |||
export const langResources = { | |||
basic: `The octopus has eight legs`, | |||
arguments: `The {animalType} has {animalLegCount} legs`, |
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.
Maybe we should use a different analogy than number of legs for the basic & arguments templates? As it is, they might confuse people about how to actually do plurality. Maybe something like "The octopus lives in the ocean" and "The {animalType} lives {animalHome}"? 🤷
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.
Yep, it confused me during my own demo
I'm going to look into this now |
Adds a
localize-mixin
sandbox demo to interactively show how the mixin andmessageformat
itself works. It also includes generator templates and various message templates to demonstrate proper usage and formatting.