mirror of
https://github.com/transmission/transmission
synced 2025-03-10 14:13:23 +00:00
for users that have "times open" displayed as 0, display "n/a" instead
This commit is contained in:
parent
d18fb68fbc
commit
ecb0dfc0f3
1 changed files with 12 additions and 5 deletions
|
@ -193,11 +193,18 @@ tr_handle * fLib;
|
|||
[fTimeAllField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%@ total", "stats total"),
|
||||
[NSString timeString: statsAll.secondsActive showSeconds: NO]]];
|
||||
|
||||
if (statsAll.sessionCount == 1)
|
||||
[fNumOpenedField setStringValue: NSLocalizedString(@"1 time", "stats window -> times opened")];
|
||||
else
|
||||
[fNumOpenedField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d times", "stats window -> times opened"),
|
||||
statsAll.sessionCount]];
|
||||
switch (statsAll.sessionCount)
|
||||
{
|
||||
case 1:
|
||||
[fNumOpenedField setStringValue: NSLocalizedString(@"1 time", "stats window -> times opened")];
|
||||
break;
|
||||
case 0: //for users that have this problem
|
||||
[fNumOpenedField setStringValue: NSLocalizedString(@"n/a", "stats window -> times opened")];
|
||||
break;
|
||||
default:
|
||||
[fNumOpenedField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d times", "stats window -> times opened"),
|
||||
statsAll.sessionCount]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) performResetStats
|
||||
|
|
Loading…
Add table
Reference in a new issue