1

我的 en/transaltion.js 中有以下内容

'AllDogs': {
    'Dogs' :{
        'zero': 'ALL DOGS, ',
        'one': '1 DOG SELECTED',
        'other': '{{count}} DOG SELECTED'  
    }}

hbs有以下

{{t AllDogs.Dogs count=filteredCount }} 

没有显示任何内容,但如果我添加 {{t 'AllDogs.Dogs.one'}} 它即将出现,任何指示都会有所帮助。

4

1 回答 1

0

这需要从组件 js 处理,我为计数添加了一个属性。我的代码如下

dogsCount : function() {
 var count =  this.get('i18n').t('AllDogs.Dogs ', { count : this.get('ActualCount')});
 return count;
}.property('count'),
于 2015-10-07T11:17:51.497 回答