mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
use the number formatter when displaying bytes
This commit is contained in:
parent
76f5a1f680
commit
4f69b944b1
2 changed files with 12 additions and 12 deletions
|
@ -433,8 +433,8 @@ typedef enum
|
|||
[fBasicInfoField setStringValue: [NSString stringWithFormat: @"%@, %@", fileString,
|
||||
[NSString stringWithFormat: NSLocalizedString(@"%@ total", "Inspector -> selected torrents"),
|
||||
[NSString stringForFileSize: size]]]];
|
||||
[fBasicInfoField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%llu bytes",
|
||||
"Inspector -> selected torrents"), size]];
|
||||
[fBasicInfoField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%@ bytes",
|
||||
"Inspector -> selected torrents"), [NSString formattedUInteger: size]]];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -485,8 +485,8 @@ typedef enum
|
|||
basicString = [NSString stringWithFormat: @"%@, %@", fileString, basicString];
|
||||
}
|
||||
[fBasicInfoField setStringValue: basicString];
|
||||
[fBasicInfoField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%llu bytes", "Inspector -> selected torrents"),
|
||||
[torrent size]]];
|
||||
[fBasicInfoField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%@ bytes", "Inspector -> selected torrents"),
|
||||
[NSString formattedUInteger: [torrent size]]]];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -167,20 +167,20 @@ tr_session * fLib;
|
|||
tr_sessionGetStats(fLib, &statsSession);
|
||||
|
||||
[fUploadedField setStringValue: [NSString stringForFileSize: statsSession.uploadedBytes]];
|
||||
[fUploadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%llu bytes", "stats -> bytes"),
|
||||
statsSession.uploadedBytes]];
|
||||
[fUploadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%@ bytes", "stats -> bytes"),
|
||||
[NSString formattedUInteger: statsSession.uploadedBytes]]];
|
||||
[fUploadedAllField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%@ total", "stats total"),
|
||||
[NSString stringForFileSize: statsAll.uploadedBytes]]];
|
||||
[fUploadedAllField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%llu bytes", "stats -> bytes"),
|
||||
statsAll.uploadedBytes]];
|
||||
[fUploadedAllField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%@ bytes", "stats -> bytes"),
|
||||
[NSString formattedUInteger: statsAll.uploadedBytes]]];
|
||||
|
||||
[fDownloadedField setStringValue: [NSString stringForFileSize: statsSession.downloadedBytes]];
|
||||
[fDownloadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%llu bytes", "stats -> bytes"),
|
||||
statsSession.downloadedBytes]];
|
||||
[fDownloadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%@ bytes", "stats -> bytes"),
|
||||
[NSString formattedUInteger: statsSession.downloadedBytes]]];
|
||||
[fDownloadedAllField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%@ total", "stats total"),
|
||||
[NSString stringForFileSize: statsAll.downloadedBytes]]];
|
||||
[fDownloadedAllField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%llu bytes", "stats -> bytes"),
|
||||
statsAll.downloadedBytes]];
|
||||
[fDownloadedAllField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%@ bytes", "stats -> bytes"),
|
||||
[NSString formattedUInteger: statsAll.downloadedBytes]]];
|
||||
|
||||
[fRatioField setStringValue: [NSString stringForRatio: statsSession.ratio]];
|
||||
|
||||
|
|
Loading…
Reference in a new issue