-
Notifications
You must be signed in to change notification settings - Fork 220
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
react-i18n - add from-dictionary-index
plugin mode
#1197
Conversation
832c796
to
947257b
Compare
from-dictionary-index
plugin mode
e23d529
to
4df7856
Compare
4df7856
to
2f55579
Compare
@@ -15,7 +15,7 @@ matrix: | |||
- <<: *node_container | |||
name: 'Node - build, type-check, and end-to-end tests' | |||
script: | |||
- yarn build | |||
- yarn build --verbose |
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.
Travis keeps timing out because the build takes >10m with no output. Making it verbose works around Travis' behaviour 🤷🏻♂️
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.
tbh it also works around my behaviour, I get a gut feeling that it's broken every time since we changed it from the old setup :P
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.
Some small comments but this looks rad
); | ||
} | ||
|
||
const translationBuckets = findTranslationBuckets(rootDir); |
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 a pretty great mental image
@@ -15,7 +15,7 @@ matrix: | |||
- <<: *node_container | |||
name: 'Node - build, type-check, and end-to-end tests' | |||
script: | |||
- yarn build | |||
- yarn build --verbose |
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.
tbh it also works around my behaviour, I get a gut feeling that it's broken every time since we changed it from the old setup :P
translationFilePaths, | ||
); | ||
const acc = await accPromise; | ||
acc[locale] = merge( |
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 guess we have to use lodash merge here because this needs to merge deeply and whatnot? Does make me wonder if we want to use groupBy
from lodash for our bucketing operations to make them clearer, but /shrug
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.
Mmmmm, I'm conflicted about this because I hate adding lodash to anything 😸 The merge/clone things were unavoidable, but in for a penny...
I've created an issue to track this enhancement: #1200
f035f33
to
c97c80c
Compare
c97c80c
to
a8f418f
Compare
Description
Adds a
from-dictionary-index
plugin. With this, folks with lots of CPU (or time) can generate multiple versions of their app. Each with a specific locale embedded directly into its JS. The advantages of this are:🎩
solo-i18n-test
branch of web-rails-proving-groundnode -e "require('@shopify/react-i18n/generate-dictionaries').generateTranslationDictionaries(['fr'])"
rm -fr tmp/sewing-kit/cache/webpack
dev run
customers
routeType of change
Checklist