ember-i18n перевод текста с двойными фигурными скобками

Как перевести этот шаблон Ember:

<p>The {{user.name}}'s tasks in "{{project.name}}"</p>

Обновить

Проблема решена:

В шаблоне:

{{t "The (user.name)'s tasks in '(project.name)'" username=user.name projectname=project.name}}

В переводах:

export default {
  "The (user.name)'s tasks in '(project.name)'":`Задачи {{username}} в "{{projectname}}"`
}

1 ответ

Решение

Файл перевода:

export default {
  userTasks: `The {{username}}'s tasks in "{{projectname}}"`
}

Шаблон:

<p>{{t "userTasks" username=user.name projectname=project.name}}</p>
Другие вопросы по тегам