[英]Emberjs ember-i18n Pluralization not working
我的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'}},它的任何指示都會有所幫助。
這需要從組件js處理,我已經為count添加了一個屬性。 我的代碼如下
dogsCount : function() {
var count = this.get('i18n').t('AllDogs.Dogs ', { count : this.get('ActualCount')});
return count;
}.property('count'),
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.