1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

when downloading the blocklist, show amounts instead of percent

This commit is contained in:
Mitchell Livingston 2008-04-06 03:35:18 +00:00
parent ea14cc231e
commit 8b627d3792
3 changed files with 5 additions and 4 deletions

View file

@ -162,9 +162,10 @@
NSString * string = NSLocalizedString(@"Downloading blocklist", "Blocklist -> message");
if (fExpectedSize != NSURLResponseUnknownLength)
{
double progress = (double)fCurrentSize / fExpectedSize;
string = [string stringByAppendingString: [NSString localizedStringWithFormat: @" (%.1f%%)", 100.0 * progress]];
[fProgressBar setDoubleValue: progress];
NSString * substring = [NSString stringWithFormat: NSLocalizedString(@"%@ of %@", "Blocklist -> message"),
[NSString stringForFileSize: fCurrentSize], [NSString stringForFileSize: fExpectedSize]];
string = [string stringByAppendingFormat: @" (%@)", substring];
[fProgressBar setDoubleValue: (double)fCurrentSize / fExpectedSize];
}
[fTextField setStringValue: string];

View file

@ -927,7 +927,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
NSString * error;
if (!(error = [NSString stringWithUTF8String: fStat->errorString])
&& !(error = [NSString stringWithCString: fStat->errorString encoding: NSISOLatin1StringEncoding]))
error = NSLocalizedString(@"(unreadable error)", "Torrent -> error string unreadable");
error = [NSString stringWithFormat: @"(%@)", NSLocalizedString(@"unreadable error", "Torrent -> error string unreadable")];
return error;
}