mirror of
https://github.com/transmission/transmission
synced 2024-12-27 01:57:52 +00:00
when downloading the blocklist, show amounts instead of percent
This commit is contained in:
parent
ea14cc231e
commit
8b627d3792
3 changed files with 5 additions and 4 deletions
|
@ -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];
|
||||
|
|
Binary file not shown.
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue