-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
@@ -34,7 +34,8 @@ module.exports = function (grunt) { | |||
|
|||
extract_cldr_data: { | |||
options: { | |||
pluralRules: true | |||
pluralRules: true, | |||
numberFields: true |
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.
hmmm. Seems this will increase the bundle size quite a bit...
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.
Thanks for calling that out.
For our ember bundles, we pay as you go since we import only the locale data that's targeted. Not terribly concerned.
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.
@jasonmit Yeah that is a good point! The only thing I noticed is we are duplicating pluralRuleFunction
for a particular lang. One in the vendor dist and the other in the app bundle.
I'm not 100% sure the locale data for this lib is needed in the vendor.js file, but perhaps you know much better than I do. My understanding was that at runtime, we handoff the relevant data generated from broccoli-cldr-data to IntlMessageFormat
. Don't see us require
ing this data from intl-messageformat
anywhere. Lmk your thoughts!
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.
The only thing I noticed is we are duplicating pluralRuleFunction for a particular lang. One in the vendor dist and the other in the app bundle.
Sounds like a bug, this is happening on master & easy to reproduce? If so, will investigate soon.
I could see where this could be the case for en
but would not expect it for any other locales (lib defaults https://github.com/yahoo/intl-messageformat/blob/master/dist/intl-messageformat.js#L1921 https://github.com/yahoo/intl-relativeformat/blob/master/dist/intl-relativeformat.js#L1879)
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.
Oh you are right! Other languages does not add anything to the vendor output. 👍
@snewcomer as always, version accordingly :) |
ember-intl/formatjs-extract-cldr-data#5
Ref #1