ember-i18n 翻译带双花括号的文本
ember-i18n translate text with double curly braces
如何翻译此 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}}"`
}
翻译文件:
export default {
userTasks: `The {{username}}'s tasks in "{{projectname}}"`
}
模板:
<p>{{t "userTasks" username=user.name projectname=project.name}}</p>
如何翻译此 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}}"`
}
翻译文件:
export default {
userTasks: `The {{username}}'s tasks in "{{projectname}}"`
}
模板:
<p>{{t "userTasks" username=user.name projectname=project.name}}</p>