This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
Releases: jamesarosen/ember-i18n
Releases · jamesarosen/ember-i18n
v4.0.0
- declare a valid SPDX license (no change in license, just in the string representation)
- support apps with
podModuleSuffix
See also the release notes for v4.0.0-beta.1, -beta.2, -beta.3, and -beta.4.
v4.0.0-beta.4
- 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".
v4.0.0-beta.3
HUGE thanks to @mixonic and @rwjblue for all their help with Ember helpers! This release wouldn't have been possible without that work.
- 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.
v4.0.0-beta.2
- add repository to
package.json
- use
get
to look upi18n
service t
macro works without passing an interpolations map- fix bug in
add-translations
when there were no existing translations for the locale
v4.0.0-beta.1
Caveats
Ember-I18n v4.0.0-beta.1 is not compatible with Glimmer and Ember 1.13. See the stateful helpers RFC and the helper registration RFC for more information.
Ember-I18n 4.0 is a significant departure from previous versions. It has incorporated many of the ideas from ember-cli-i18n. (See ember-cli-i18n#56 for more information.)
Changes
- 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. (TranslateableAttributes
may come back if there's a strong enough use-case.) - Built-in compiler now applies RTL Unicode markers before marking the result HTML-safe. (Previously,
rtl = true
broke HTML safety.)
v3.1.1
TranslateableProperties
schedules observer setup inrender
queue. This ensures it's late enough that other properties have resolved, but early enough to be used when rendering.
v3.1.0
- Add support for
I18n.rtl
. If this is set totrue
(it is off by default), every translation will be wrapped in Unicode RTL marker characters.
v3.0.1
- Fix bug:
missingMessage
only received the translation context the first time. We no longer cache that so messages are contextually relevant.
v3.0.0
- 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.
v2.9.1
SECURITY PATCH
- Handlebars-less template compiler escapes interpolations by default. Use triple-stache syntax or
Ember.Handlebars.SafeString
for HTML-safe interpolations.