ember-intl / ember-intl

Internationalization for Ember projects
https://ember-intl.github.io
MIT License
437 stars 166 forks source link

5.X breaking changes #1321

Closed dbendaou closed 4 years ago

dbendaou commented 4 years ago

Hello, thanks for the work you've done on ember-intl !

Changes that arrived in 5.x are quite huge. I would like to understand why this change was motivated ? Especially the one about changing format of HTML in translations. Furthermore, our copywriters have to learn a new way of adding translations.

Can this change be made as optional with a param given to ember-intl ?

Thanks

jasonmit commented 4 years ago

Change was made lower level in the message compiler (intl-messageformat) that I do not control. They added it to support rich text support in messages, given the nature of Ember templates we cannot really harness that feature (i.e., ability to inject a link-to component in a translation).

It's a breaking change for a reason though, you're free to upgrade at your leisure or not at all. Obviously a lot went into this release and this library is now in a much better place as a result. We were able to eliminate polyfills, corrects other escaping issues to be more compliant with the ICU spec, avoids bundling pluralization rules, and getting off our fork of intl-messageformat as a result of the upgrade.

jasonmit commented 4 years ago

https://github.com/formatjs/formatjs/blob/master/packages/intl-messageformat/CHANGELOG.md#breaking-changes

Feel free to open a discussion with them to see if they want to make this configurable. I'd like to think at some point in the future we'll be able to tap into this API. The current Ember APIs just do not yet enable us to do so.

See #715 for tracking that issue.

jasonmit commented 4 years ago

Just a heads up, soon the new translation escaping behavior in 5.x will no longer be necessary.

The v4 behavior will be restored in a backwards compatible way. For those that have already went through the process of escaping everything, you will not have to revert back - both formats will continue to be supported.

https://github.com/ember-intl/ember-intl/pull/1420

dbendaou commented 4 years ago

Good news! Thanks for the heads up!