mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
(trunk, web) replace Transmission.formatter.plural() with a slightly less brittle pluralization tool
This commit is contained in:
@@ -268,9 +268,15 @@ Transmission.fmt = (function()
|
||||
return [date, time, period].join(' ');
|
||||
},
|
||||
|
||||
plural: function(i, word)
|
||||
ngettext: function(msgid, msgid_plural, n)
|
||||
{
|
||||
return [ i.toStringWithCommas(), ' ', word, (i==1?'':'s') ].join('');
|
||||
// TODO(i18n): http://doc.qt.digia.com/4.6/i18n-plural-rules.html
|
||||
return n === 1 ? msgid : msgid_plural;
|
||||
},
|
||||
|
||||
countString: function(msgid, msgid_plural, n)
|
||||
{
|
||||
return [ n.toStringWithCommas(), ngettext(msgid,msgid_plural,n) ].join(' ');
|
||||
},
|
||||
|
||||
peerStatus: function( flagStr )
|
||||
|
||||
Reference in New Issue
Block a user