ember.jsember-i18n

ember-i18n translate text with double curly braces


How to translate this Ember template text:

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

Update

The problem is solved:

In template:

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

In translations:

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

Solution

  • Translation file:

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

    Template:

    <p>{{t "userTasks" username=user.name projectname=project.name}}</p>