mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
#3298 Move percentage string formatting into its own method, and don't append .00 to 100%
This commit is contained in:
@@ -124,12 +124,12 @@
|
||||
|
||||
[fStateField setStringValue: [torrent stateString]];
|
||||
|
||||
NSString * progressString = [NSString localizedStringWithFormat: @"%.2f%%", tr_truncd(100.0 * [torrent progress], 2)];
|
||||
NSString * progressString = [NSString percentString: [torrent progress] longDecimals: YES];
|
||||
if ([torrent isFolder])
|
||||
{
|
||||
NSString * progressSelectedString = [NSString localizedStringWithFormat:
|
||||
NSLocalizedString(@"%.2f%% selected", "Inspector -> Activity tab -> progress"),
|
||||
tr_truncd(100.0 * [torrent progressDone], 2)];
|
||||
NSString * progressSelectedString = [NSString stringWithFormat:
|
||||
NSLocalizedString(@"%@ selected", "Inspector -> Activity tab -> progress"),
|
||||
[NSString percentString: [torrent progressDone] longDecimals: YES]];
|
||||
progressString = [progressString stringByAppendingFormat: @" (%@)", progressSelectedString];
|
||||
}
|
||||
[fProgressField setStringValue: progressString];
|
||||
|
||||
Reference in New Issue
Block a user