mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
(trunk, web) #5072 "web client doesn't show webseed count" -- pluralization refinement to r13551
This commit is contained in:
parent
4f64831711
commit
f8f5fa930f
1 changed files with 23 additions and 11 deletions
|
@ -148,21 +148,33 @@ TorrentRendererFull.prototype =
|
|||
|
||||
getPeerDetails: function(t)
|
||||
{
|
||||
var err;
|
||||
var err, webseed_count;
|
||||
|
||||
if ((err = t.getErrorMessage()))
|
||||
return err;
|
||||
|
||||
if (t.isDownloading())
|
||||
return [ 'Downloading from',
|
||||
t.getPeersSendingToUs(),
|
||||
'of',
|
||||
t.getPeersConnected(),
|
||||
'peers',
|
||||
' and ',
|
||||
t.getWebseedsSendingToUs(),
|
||||
'webseeds',
|
||||
TorrentRendererHelper.formatDL(t),
|
||||
TorrentRendererHelper.formatUL(t) ].join(' ');
|
||||
{
|
||||
webseed_count = t.getWebseedsSendingToUs();
|
||||
|
||||
if (webseed_count)
|
||||
{
|
||||
return [ 'Downloading from',
|
||||
t.getPeersSendingToUs(),
|
||||
'of',
|
||||
t.getPeersConnected(),
|
||||
'peers and',
|
||||
Transmission.fmt.plural (webseed_count, 'webseed') ].join(' ');
|
||||
}
|
||||
else
|
||||
{
|
||||
return [ 'Downloading from',
|
||||
t.getPeersSendingToUs(),
|
||||
'of',
|
||||
t.getPeersConnected(),
|
||||
'peers' ].join(' ');
|
||||
}
|
||||
}
|
||||
|
||||
if (t.isSeeding())
|
||||
return [ 'Seeding to',
|
||||
|
|
Loading…
Reference in a new issue