-
Notifications
You must be signed in to change notification settings - Fork 167
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
Implementing new CLDR extracting #68
Conversation
This allows for ember-intl to be easily extended for complex use-cases. For example, hitting an API for fetching translations.
CLA is valid! |
normalizeEntityName: function (localeName) { | ||
entityName = Blueprint.prototype.normalizeEntityName.apply(this, arguments); | ||
|
||
if (!extract.isValidLocale(localeName)) { | ||
if (!cldrLocales.locales.has(localeName)) { |
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.
Remove this
return fullName.toLowerCase(); | ||
} | ||
|
||
export default IntlAdapter.extend({ |
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.
Not documenting this yet, but it will eventually be exposed for those people who want to specify their own way of loading translations. The CLDR portion of this hasn't been thought out yet, but it will ideally be another hook off this.
See: #69
"intl": "0.1.4", | ||
"intl-messageformat": "1.0.4", | ||
"intl-messageformat": "1.1.0", | ||
"intl-relativeformat": "1.0.3", |
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 plan to bump this now that you published
} | ||
|
||
if (result.fields) { | ||
data.push(' fields: ' + serialize(result.fields) + ','); |
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.
You can build up a JSON/JavaScript object and then call serialize()
once for the whole thing.
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.
👍
Implementing new CLDR extracting
This is not yet complete, waiting on relative format npm publish, but verified everything works locally.