Integrates i18next into Ember CLI apps.
MIT License
Bot releases are hidden (Show)
Updates dependencies and adds the ability to catch errors thrown during initialization.
ember-i18next 5.0.0 updates the i18next dependency to version 19, which contains breaking changes. Review the i18next migration guide carefully prior to upgrading.
This release adds the ability to customize the behavior when a promise rejects in initLibraryAsync
. Previously ember-i18next would only log the error to the console. For compatibility with previous versions, this is still the default behavior. However, you can now handle errors in a catch block if the rejectError
configuration property is truthy. See the README for details.
Thanks to @mpirio for implementing this new feature.
initLibraryAsync
. Thanks to @mpirio for this PR.Published by heathharrelson over 5 years ago
Updates i18next and i18next-xhr-backend. No changes to ember-i18next API.
ember-i18next 4.0.0 contains no changes to the ember-i18next API, but it updates the i18next dependency to version 15, which contains breaking changes. Review the i18next migration guide prior to upgrading.
Published by heathharrelson over 5 years ago
Updates dependencies.
Published by heathharrelson almost 6 years ago
Updates dependencies.
Published by heathharrelson almost 6 years ago
Updates dependencies and migrates to use the new Ember testing APIs.
ember-i18next 3.0.0 drops support for Ember 1.13. The addon has been tested with Ember 2.16 LTS, 2.18 LTS and Ember 3.x, but it should work down to version 2.3.
Version 3.0.0 also updates the i18next dependency to version 11, which contains breaking changes. Review the i18next migration guide prior to upgrading.
Published by heathharrelson almost 6 years ago
This release updates dependencies.
Published by heathharrelson over 6 years ago
This release updates dependencies and adds a new computed property macro that updates computed text on locale change. See the README for details on use.
Published by heathharrelson over 6 years ago
Updates the i18next dependency to version 10, which contains breaking changes. Review README.md and the i18next migration guide prior to upgrading.
Published by heathharrelson over 8 years ago
Updates the i18next dependency to version 3, which contains breaking changes. Review README.md and the i18next migration guide prior to upgrading.
{{t}}
helper, allowing translations to contain markup.Published by heathharrelson almost 9 years ago
Specify the version string to add to the bower.json when the addon is installed, preventing broken builds (see issue #25).
Published by heathharrelson almost 9 years ago
Now passes a locale to the pre- and post-init actions, allowing them to perform work that depends on the locale, such as loading or unloading additional resources. The new locale is passed to pre-init actions, and the old locale is passed to post-init actions. See #24 for details. Thanks to @mpirio for making this happen.
Published by heathharrelson about 9 years ago
Includes changes needed to work with Ember 1.13, 2.0, and 2.1, and canary. Does not support versions of Ember prior to 1.13.
Published by heathharrelson over 9 years ago
Includes updates due to transfer to OCTRI organization. No code changes are included.
Published by heathharrelson over 9 years ago
Adds hooks that run around initialization of the i18next library. Any registered actions will be run when the i18next library is initialized as a result of a call to initLibraryAsyc
or changing the locale.
To register a function to run before the i18next library is initialized, use the i18n service's registerPreInitAction
method. Similarly, to register a function to run after the i18next library is initialized, use the registerPostInitAction
method. Pre- and post-init actions can be unregistered using the unregisterPreInitAction
/ unregisterPostInitAction
methods.
See the README for details and examples.
Published by heathharrelson over 9 years ago
Fixes an issue introduced in 0.3.0-beta.2 where the i18n service's locale property was not getting initialized.
Published by heathharrelson over 9 years ago
Fixes a race condition where post-init actions were being called before library initialization completed after a change in locale.
Published by heathharrelson over 9 years ago
Adds experimental hooks that run around initialization of the i18next library. Any registered actions will be run when the i18next library is initialized as a result of a call to initLibraryAsyc
or changing the locale.
To register a function to run before the i18next library is initialized, use the i18n service's registerPreInitAction
method. Similarly, to register a function to run after the i18next library is initialized, use the registerPostInitAction
method. Pre- and post-init actions can be unregistered using the unregisterPreInitAction
/ unregisterPostInitAction
methods.
Published by heathharrelson over 9 years ago
To make working with i18next's capabilities easier and better encapsulate the library, the i18n service now exports all of i18next's public API. With this change, code like the following:
import Ember from 'ember';
import I18nMixin from '../mixins/i18n';
export default Ember.Route.extend(I18nMixin, {
// ...
afterModel: function (model) {
var translations = model.get('translations');
var i18next = this.get('i18n.i18next');
i18next.addResources(translations.get('locale'), 'namespace', translations.get('keys'));
}
});
Can be replaced with this instead:
import Ember from 'ember';
import I18nMixin from '../mixins/i18n';
export default Ember.Route.extend(I18nMixin, {
// ...
afterModel: function (model) {
var translations = model.get('translations');
var i18n = this.get('i18n');
i18n.addResources(translations.get('locale'), 'namespace', translations.get('keys'));
}
});
Published by heathharrelson over 9 years ago
In this release, the addon has been restructured so that the internationalization capabilities provided by i18next are exposed through an Ember service object. In addition, a mixin is provided that injects the service into the including class.
This release also removes all XHR requests from the initializer. Applications using the addon should now use the service's initLibraryAsync()
method to initialize i18next in a route.
See the pull request for the complete changes included.
Published by heathharrelson over 9 years ago
Fixes issue #5, allowing the HTMLBars helper to work on Ember.js 1.11.x.