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

Add localize-mixin sandbox demo #3503

Closed
wants to merge 17 commits into from
Closed

Add localize-mixin sandbox demo #3503

wants to merge 17 commits into from

Conversation

bearfriend
Copy link
Contributor

@bearfriend bearfriend commented Apr 9, 2023

Adds a localize-mixin sandbox demo to interactively show how the mixin and messageformat itself works. It also includes generator templates and various message templates to demonstrate proper usage and formatting.

Comment on lines -24 to -29
"files": "mixins/demo/**.html",
"rules": {
"quotes": 0,
"no-undef": 0,
"indent": 0
}
Copy link
Contributor Author

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.

@bearfriend bearfriend marked this pull request as ready for review April 10, 2023 13:51
@bearfriend bearfriend requested a review from a team as a code owner April 10, 2023 13:51
Copy link
Member

@dlockhart dlockhart left a 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! 😎

mixins/localize/demo/localize-mixin-sandbox.js Outdated Show resolved Hide resolved
mixins/localize/demo/localize-mixin-sandbox.js Outdated Show resolved Hide resolved
mixins/localize/demo/localize-mixin-sandbox.js Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-3503/

Note
The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

Copy link
Member

@dlockhart dlockhart left a 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`,
Copy link
Member

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}"? 🤷

Copy link
Contributor Author

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

@bearfriend
Copy link
Contributor Author

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.

I'm going to look into this now

@bearfriend bearfriend closed this Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants