mirror of
https://github.com/transmission/transmission
synced 2024-12-27 01:57:52 +00:00
some string folding
This commit is contained in:
parent
3e4168025b
commit
730af68b25
1 changed files with 22 additions and 15 deletions
|
@ -981,22 +981,29 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
[NSString stringForFileSize: [self haveTotal]],
|
||||
[NSString stringForFileSize: [self size]], 100.0 * [self progress]];
|
||||
}
|
||||
else if (![self isComplete])
|
||||
{
|
||||
if ([self folder] && [fDefaults boolForKey: @"DisplayStatusProgressSelected"])
|
||||
string = [NSString stringWithFormat: NSLocalizedString(@"%@ selected, uploaded %@ (Ratio: %@)",
|
||||
"Torrent -> progress string"), [NSString stringForFileSize: [self haveTotal]],
|
||||
[NSString stringForFileSize: [self uploadedTotal]], [NSString stringForRatio: [self ratio]]];
|
||||
else
|
||||
string = [NSString stringWithFormat: NSLocalizedString(@"%@ of %@ (%.2f%%), uploaded %@ (Ratio: %@)",
|
||||
"Torrent -> progress string"), [NSString stringForFileSize: [self haveTotal]],
|
||||
[NSString stringForFileSize: [self size]], 100.0 * [self progress],
|
||||
[NSString stringForFileSize: [self uploadedTotal]], [NSString stringForRatio: [self ratio]]];
|
||||
}
|
||||
else
|
||||
string = [NSString stringWithFormat: NSLocalizedString(@"%@, uploaded %@ (Ratio: %@)", "Torrent -> progress string"),
|
||||
[NSString stringForFileSize: [self size]], [NSString stringForFileSize: [self uploadedTotal]],
|
||||
[NSString stringForRatio: [self ratio]]];
|
||||
{
|
||||
NSString * downloadString;
|
||||
if (![self isComplete]) //only multifile possible
|
||||
{
|
||||
|
||||
if ([fDefaults boolForKey: @"DisplayStatusProgressSelected"])
|
||||
downloadString = [NSString stringWithFormat: NSLocalizedString(@"%@ selected", "Torrent -> progress string"),
|
||||
[NSString stringForFileSize: [self haveTotal]]];
|
||||
else
|
||||
downloadString = [NSString localizedStringWithFormat: NSLocalizedString(@"%@ of %@ (%.2f%%)",
|
||||
"Torrent -> progress string"), [NSString stringForFileSize: [self haveTotal]],
|
||||
[NSString stringForFileSize: [self size]], 100.0 * [self progress]];
|
||||
}
|
||||
else
|
||||
downloadString = [NSString stringForFileSize: [self size]];
|
||||
|
||||
NSString * uploadString = [NSString stringWithFormat: NSLocalizedString(@"uploaded %@ (Ratio: %@)",
|
||||
"Torrent -> progress string"), [NSString stringForFileSize: [self uploadedTotal]],
|
||||
[NSString stringForRatio: [self ratio]]];
|
||||
|
||||
string = [NSString stringWithFormat: @"%@, %@", downloadString, uploadString];
|
||||
}
|
||||
|
||||
//add time when downloading
|
||||
if (fStat->status == TR_STATUS_DOWNLOAD || ([self isSeeding]
|
||||
|
|
Loading…
Reference in a new issue