From: Mitchell Livingston Date: Sun, 14 Nov 2010 21:04:25 +0000 (+0000) Subject: a couple more formatted integers X-Git-Tag: 2.13~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76f5a1f680458725dba46d501cbd29438fc4be52;p=transmission a couple more formatted integers --- diff --git a/macosx/AddWindowController.m b/macosx/AddWindowController.m index 98db3ba3c..0e4de1dd9 100644 --- a/macosx/AddWindowController.m +++ b/macosx/AddWindowController.m @@ -236,7 +236,8 @@ NSString * fileString; NSInteger count = [fTorrent fileCount]; if (count != 1) - fileString = [NSString stringWithFormat: NSLocalizedString(@"%d files", "Add torrent -> info"), count]; + fileString = [NSString stringWithFormat: NSLocalizedString(@"%@ files", "Add torrent -> info"), + [NSString formattedUInteger: count]]; else fileString = NSLocalizedString(@"1 file", "Add torrent -> info"); diff --git a/macosx/CreatorWindowController.m b/macosx/CreatorWindowController.m index f51f8775c..03d8f7908 100644 --- a/macosx/CreatorWindowController.m +++ b/macosx/CreatorWindowController.m @@ -157,7 +157,8 @@ NSString * fileString; NSInteger count = fInfo->fileCount; if (count != 1) - fileString = [NSString stringWithFormat: NSLocalizedString(@"%d files", "Create torrent -> info"), count]; + fileString = [NSString stringWithFormat: NSLocalizedString(@"%@ files", "Create torrent -> info"), + [NSString formattedUInteger: count]]; else fileString = NSLocalizedString(@"1 file", "Create torrent -> info"); statusString = [NSString stringWithFormat: @"%@, %@", fileString, statusString]; diff --git a/macosx/DragOverlayWindow.m b/macosx/DragOverlayWindow.m index 39b988549..418304d00 100644 --- a/macosx/DragOverlayWindow.m +++ b/macosx/DragOverlayWindow.m @@ -129,7 +129,8 @@ if (fileCount == 1) fileString = NSLocalizedString(@"1 file", "Drag overlay -> torrents"); else - fileString= [NSString stringWithFormat: NSLocalizedString(@"%d files", "Drag overlay -> torrents"), fileCount]; + fileString= [NSString stringWithFormat: NSLocalizedString(@"%@ files", "Drag overlay -> torrents"), + [NSString formattedUInteger: fileCount]]; secondString = [NSString stringWithFormat: @"%@, %@", fileString, secondString]; } @@ -138,7 +139,8 @@ icon = [[NSWorkspace sharedWorkspace] iconForFileType: folder ? NSFileTypeForHFSTypeCode('fldr') : [name pathExtension]]; else { - name = [NSString stringWithFormat: NSLocalizedString(@"%d Torrent Files", "Drag overlay -> torrents"), count]; + name = [NSString stringWithFormat: NSLocalizedString(@"%@ Torrent Files", "Drag overlay -> torrents"), + [NSString formattedUInteger: count]]; secondString = [secondString stringByAppendingString: @" total"]; icon = [NSImage imageNamed: @"TransmissionDocument.icns"]; } diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 07842dc0c..2a5a571f1 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -390,8 +390,9 @@ typedef enum { [fImageView setImage: [NSImage imageNamed: NSImageNameMultipleDocuments]]; - [fNameField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d Torrents Selected", - "Inspector -> selected torrents"), numberSelected]]; + [fNameField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%@ Torrents Selected", + "Inspector -> selected torrents"), + [NSString formattedUInteger: numberSelected]]]; uint64_t size = 0; NSUInteger fileCount = 0, magnetCount = 0; @@ -410,7 +411,8 @@ typedef enum if (fileCount == 1) fileString = NSLocalizedString(@"1 file", "Inspector -> selected torrents"); else - fileString = [NSString stringWithFormat: NSLocalizedString(@"%d files", "Inspector -> selected torrents"), fileCount]; + fileString = [NSString stringWithFormat: NSLocalizedString(@"%@ files", "Inspector -> selected torrents"), + [NSString formattedUInteger: fileCount]]; [fileStrings addObject: fileString]; } if (magnetCount > 0) @@ -419,8 +421,8 @@ typedef enum if (magnetCount == 1) magnetString = NSLocalizedString(@"1 magnetized transfer", "Inspector -> selected torrents"); else - magnetString = [NSString stringWithFormat: NSLocalizedString(@"%d magnetized transfers", - "Inspector -> selected torrents"), magnetCount]; + magnetString = [NSString stringWithFormat: NSLocalizedString(@"%@ magnetized transfers", + "Inspector -> selected torrents"), [NSString formattedUInteger: magnetCount]]; [fileStrings addObject: magnetString]; }