- Added support for default locale fallback with a new configuration named
defaultFallback
- Expose test helpers in
addon-test-support/
, which is now standard for Ember addons
- Add Danish language config.
- More ES6 syntax
- Turkish
pluralForm
always returnsONE
- Fix null-pointer-exception for
ember-i18n@config:zh
introduced in v5.0.0
- [BREAKING] Dropped support for Ember 1.X
- Use new
owner.factoryFor
(thanks toember-getowner-polyfill
) to fix deprecations in Ember 2.12
{{t}}
helper supports a context object as a second ordered argument; named (hash) arguments override context object ones when interpolating
- Do not observe computed properties that are not consumed
- Update use of
ember-getowner-polyfill
to match the true polyfill changes made to the addon.
index.js
does has Ember.Helper check ininit
rather thanconfig
so the build reliably includes the right helper code
- Define no-op
ember-i18n
initializer and instance-initializer. These were removed in 4.3.0 because they are no longer needed, but some applications were declaring their own initializationbefore
orafter
those initializers.
- Include Ember 1.12 support only on Ember 1.12. This project now uses ember-cli-version-checker and broccoli-funnel to selectively include library files based on the Ember version.
- Support Glimmer2 by allowing
namedArgs
to be anEmptyObject
- use
Ember.String.htmlSafe
instead ofnew Ember.Handlebars.SafeString
- Check the
_isMissing
flag on generated translations so missing translations stay missing - Reserve
locale
andhtmlSafe
attributes for future library use - Ignore
.ember-cli
so developers can customize their setup - Don't use QUnit 2+ for tests
- set
isLocalizationFramework
for other addons - change
Stream
import to support latest Ember (even though ember-i18n doesn't rely onStream
for Ember 1.13+, it needs to import it)
- use
Ember.assign
instead ofEmber.merge
if available - add
no
locale support
- remove
Stream
awareness fromservice:i18n
to ensure streamless operation on Ember 1.13+ - correct Polish pluralization
- pass ID to
Ember.warn
to prevent deprecation warnings missingMessage
gets called on theservice:i18n
instance- coerce
count
to a number - don't use ES2015 classes to ensure IE8 compatibility
- use public
getOwner
API for container / registry functions
- fix incompatibility with Ember 2.2
Stream
class I18nService#locales
are now sortedt
macro addsi18n.locale
as a dependency so macro-defined properties update when the locale changes
- More Ember 2.1 compatibility
- Ember 2.1 compatibility
- prevent warnings about missing
rtl
definition for included locales - improve warning about missing
rtl
for app-defined locales
service:i18n
now has alocales
property that lists available locales- support passing an
Array
of fallback keys viadefault: [...]
- if the app specifies an unknown locale, fall back to the configuration for
zh
and print a warning instead of throwing an exception - use
Object.keys
, notEmber.keys
for enumerating properties - destroy the
Stream
created in the legacy helper (pre-Glimmer) when its view is destroyed - test against Ember 1.12
- declare a valid SPDX license (no change in license, just in the string representation)
- support apps with
podModuleSuffix
- relax ember dependency to
>=1.12.0 <1.13.0 || >=1.13.1 <3.0.0
, which is "1.12.x, 1.13.x except 1.13.0, and 2.x".
- Support Ember 1.13.1+ and 2.0+. Note this release is not compatible with v1.13.0 and never will be.
- Stop auto-injecting
service:i18n
into Components, Controllers, and Routes. Clients should instead usei18n: Ember.inject.service()
as needed. - Fix Spanish spelling.
- Fix
{{t}}
helper with dynamic keys. - Add
locale
blueprint - Use
Ember.Helper
if available (Ember >= 1.13) - Use
Ember.Service
if available (Ember >= 1.13) - Remove dependency on
Ember.EnumerableUtils.map
as that will be removed in Ember 2.0.
- add repository to
package.json
- use get to look up i18n service
t
macro works without passing an interpolations map- fix bug in
add-translations
when there were no existing translations for the locale
- Restart project as a native Ember-CLI addon
- Translations now recompute when locale changes
- Move central API to
service:i18n
, which exposeslocale
,t
, andaddTranslations
- Add
translationMacro
for defining translated computed properties - Remove
eachTranslatedAttribute
,TranslateableProperties
, andTranslateableAttributes
, which are better expressed as computed property macros - Built-in compiler now applies RTL Unicode markers before marking the
result HTML-safe. (Previously,
rtl = true
broke HTML safety.)
- Fix a bug where
missingMessage
held on to the firstcontext
it was sent for a given translation key. Now it recomputes on each invocation.
- Compatible with Ember 1.x. Notably, compatible with Ember 1.10+, which Ember-I18n 2.9.1 was not.
- Compatible with Handlebars 1.x and 2.x.
- Basic Ember-CLI support. When using Ember-I18n as an Ember-CLI add-on, it installs itself as a Bower dependency and adds
i18n.js
andi18n-plurals.js
to the app. - Drop built-in support for Handlebars template compilation. Ember-I18n ships with support for very basic Handlebars-style templates like
"Hello, {{person.name}}"
. The template compilation method is part of the public API and can be overridden. - Built-in translation compiler is more friendly to whitespace within interpolations.
- Drop support for the external
CLDR.js
definition of pluralization rules. These rules are now included asi18n-plurals.js
{{t}}
helper usesregisterBoundHelper
. This makes the code smaller and faster. The helper no longer supports passingtagName
. The helper no longer obeys theI18N_TRANSLATE_HELPER_SPAN
environment flag.eachTranslatedAttribute
gracefully handlesnull
translation keys- Drop support for
{{translateAttr}}
. This helper was unbound. Instead use a sub-expression:<img title="{{unbound (t 'my.img.title')}}>"
. - Interpolations are always escaped by default. (This was the intended behavior before, but there were bugs that caused some interpolations to come through unescaped.) Use
Ember.Handlebars.SafeString
or triple-stache notation to avoid over-escaping. TranslateableProperties
cleans up translated property observers on destroymissingMessage
takes the context as well as the translation key so users can generate more contextually-aware "missing template" messages.
- Handlebars-less template compiler escapes interpolations
by default. Use triple-stache syntax or
Ember.Handlebars.SafeString
for HTML-safe interpolations.
- Ember-I18n 2.9+ is not compatible with Ember 1.9+
- Use
Ember.$.isFunction
instead ofjQuery.isFunction
- Deprecate use of
tagName
in the{{t}}
helper - Implement pluralization logic in this project and remove dependency on CLDR.js
- Expose
I18n.missingMessage
for customising the "missing translation" message Makefile
ensures the environment hasnode
,npm
, andphantomjs
- Use internal UUID generation, since implementations differ across Ember versions
- Select template compiler on first use so
Ember.ENV.I18N_COMPILE_WITHOUT_HANDLEBARS
is sure to have been set properly. - Fix TranslateableAttributes tests on Ember Canary
- Better messaging during the build process
- Fixed overeager warnings related to I18N_COMPILE_WITHOUT_HANDLEBARS
and unquoted key arguments to the
{{t}}
helper.
- The
{{t}}
helper now warns if passed an unquoted key argument. It still uses unquoted arguments as string literals, but this behavior will change in the next major release. - Removed deprecation warning for those who've opt-in to
I18N_COMPILE_WITHOUT_HANDLEBARS
- Fixed a typo in the warning message for
I18N_COMPILE_WITHOUT_HANDLEBARS
- Remove check for
Ember.I18n.fire
as that was only necessary on Ember 0.9, which this library no longer supports. - Don't warn on missing translations. Clients that want to be notified
can subscribe to the
missing
event onEmber.I18n
. compileWithHandlebars
uses saved-offwarn
helper (which usesEmber.Logger.warn
rather thanEmber.warn
).- Run separate Travis builds for each dependency set.
- Add Sinon as a test dependency and use its spies in specs.
- Use
Ember.uuid
to generate unique IDs - Add a Handlebars-less compiler; enable with
Ember.ENV.I18N_COMPILE_WITHOUT_HANDLEBARS = true;
{{t}}
helper uses Metamorph tags.{{t}}
helper: allow turning off the default<span>
tag; enable withEmber.FEATURES.I18N_TRANSLATE_HELPER_SPAN = false;
- Drop support for Ember 0.x.
- Use
Ember.Handlebars
, notHandlebars
for helper management - The default
compileTemplate
throws anEmber.Error
if the fullEmber.Handlebars
is not available - Check
view.$()
instead ofview.state
as Ember is deprecating the latter in favor in favor ofview._state
, but doesn't consider either to be part of the public API. - Convert
Em
toEmber
for consistency
- relax CLDR and Handlebars dependencies via the
^
operator
- relax Ember dependency to ">0.9.7 <2"
- relax jQuery dependency to ">=1.7 <3"
- Add
Ember.I18n.on
- Emit
missing
events when translation missin - Add
{{ta}}
helper as shorthand for{{translateAttr}}
TranslateableProperties
observes when the translation key changes- Use the
afterRender
queue if available (Ember 1+) - Expose
Ember.I18n.eachTranslatedAttribute
- Add Ember warning if missing translation
- Add
I18n.exists(key)
- Avoid calling
compile
for missing translations
- Don't rely on
Ember.uuid
, but use it if Ember defines it
- No more CoffeeScript
- Use
Ember.uuid
instead ofjQuery.uuid
- Change license to APLv2
- Dotted-style keys win over nested-style keys
- Add
TranslateableProperties
mixin
- Support use with
jQuery.noconflict
- Support defining translations in nested objects
- Prefer
Ember.assert
toember_assert
- Add Bower support
- Use
Ember.Handlebars.get
instead ofgetPath
if on Ember 1
- Remove all references to
Sproutcore
andSC
- Use correct context for
getPath
when getting the value of a bound attribute
- Add inflection support via CLDR.js
- Use MIT license
- Make
I18n
available in theEmber
namespace - Use
Ember
, notSproutcore
Initial version