ember-intl icon indicating copy to clipboard operation
ember-intl copied to clipboard

HTMLSafe default behavior from ember-i18n not able to be configured globally.

Open maxzats opened this issue 3 years ago • 3 comments

  • [x] I am on the latest ember-intl version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate

Environment

  • Ember Version: 3.24.2
  • Ember CLI Version: 3.24
  • Ember Intl Version: 5.0.6
  • Browser(s): all
  • Node Version: 14

Steps to Reproduce

Hello! We're upgrading a large Ember app from using ember-i18n 5.1 to ember-intl 5.6. In ember-i18n HTML tags such as <strong> etc worked without issue and without further config.

Now, when upgrading, we are expected to go in and add htmlSafe=true to all translations that need it. This is a massive task as we have tens of thousands of translations.

Is there a way to make htmlSafe=true be the implicit default?

maxzats avatar Mar 23 '21 01:03 maxzats

I've done this in the past by re-implementing the t helper to always provide htmlSafe.

I agree though, there should be a global setting. Open to reviewing any PRs.

jasonmit avatar Mar 30 '21 17:03 jasonmit

I'm doing some issue gardening 🌱🌿 🌷 and came upon this issue. Since it's quite old I just wanted to ask if this is still relevant? If it isn't, maybe we can close this issue?

By closing some old issues we reduce the list of open issues to a more manageable set.

sandstrom avatar Sep 01 '22 18:09 sandstrom

It's not particularly relevant. The t-helper approach is easy to do and this is a very bad practice to do overall so making it a little cumbersome is great.

runspired avatar Sep 22 '22 06:09 runspired

Closing this issue, as I won't be pursuing the feature (maybe inspired by ember-i18n) at the moment.

ijlee2 avatar Mar 04 '24 19:03 ijlee2