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

Implementing new CLDR extracting #68

Merged
merged 22 commits into from
Mar 15, 2015
Merged

Implementing new CLDR extracting #68

merged 22 commits into from
Mar 15, 2015

Conversation

jasonmit
Copy link
Member

  • Improve fallback functionality
  • Implement new message format
  • Implement new relative format
  • Move cldr extracter logic to a more reusable broccoli library (still not standalone yet)
  • Translations can now be loaded async
  • Adapter pattern implemented for overriding how translations are retrieved

This is not yet complete, waiting on relative format npm publish, but verified everything works locally.

@yahoocla
Copy link

CLA is valid!

normalizeEntityName: function (localeName) {
entityName = Blueprint.prototype.normalizeEntityName.apply(this, arguments);

if (!extract.isValidLocale(localeName)) {
if (!cldrLocales.locales.has(localeName)) {
Copy link
Member Author

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({
Copy link
Member Author

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",
Copy link
Member Author

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) + ',');
Copy link

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

jasonmit added a commit that referenced this pull request Mar 15, 2015
Implementing new CLDR extracting
@jasonmit jasonmit merged commit 06c80df into master Mar 15, 2015
@jasonmit jasonmit deleted the formatjs-cldr branch March 15, 2015 06:21
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.

None yet

3 participants