[Feature Request] separate `translations` from vendor.js to app.js
See original GitHub issueHi, @jasonmit , i have a new building problem after instead of ember-i18n
:
in i18n addon, the translations
texts is bundled to app.js
, not vendor.js
, so, i have a stable vendor file hash in a long dev iteration cycle; and , i can produce bundles for different locale ,with same vendor
output file.
in intl addon, translations
is merge to addon tree by treeForAddon
,
vendor will be changed once locales file edited , and now , i can’t get output with same vendor , btw, i don’t perfer to make load lazy.
it not seems to be a necessary requirement for classic ember app building, but can we discuss for a solution ? thanks
one choice is :
like ember-i18n
, we can merge translations files to app
;
and in addon/translations.js
, it can get locales by requirejs.entries
,
or use ember inject
api .
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
@houfeng0923 ya
require()
with modulePrefix or another option I’ve been considering is programmatically creating an initializer with the translations inlined. It would then lookup the service andaddTranslations
.Unsure if the initializer approach would complicate the unit testing story or not. I truthfully don’t use Ember anymore (though I wish I was…), so I’m all ears on newer/other approaches that I’m may not be considering.
Why I dislike walking entries is because I believe it’s private and we should be able to look it up at a fixed/known location since we’re the ones writing the translations into the bundle for those that choose that translation loading strategy.
hi @sandstrom i am not sure How and when can use Embroider in production . i need to pay attention to it later .
and , for a util addon, i prefer intl addon can ·realize this vision· 🤝