Reply from @jamesarosen on Github:
You cannot use the helper {{link-to}}inside a translation because it emits a DOM node, not a string.
But you can use ember-href-to addon to create urls.
In JavaScript:
import { hrefTo } from 'ember-href-to/helpers/href-to';
text: Ember.computed('i18n.locale', function() {
const i18n = this.get('i18n');
const href = hrefTo(this, 'some.route');
const link = Ember.String.htmlSafe(`<a href="${href}">Link Text</a>`);
return i18n.t('some.translation', { link });
})
Or in Handlebars (you'll need the htmlSafe helper):
{{t 'some.translation'
link=(htmlSafe (join '<a href="' (href-to 'some.route') '">Link Text</a>'))}}
source
share