From 8b627d3792b5584cf0d87b00f959f3b57bd4661d Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 6 Apr 2008 03:35:18 +0000 Subject: [PATCH] when downloading the blocklist, show amounts instead of percent --- macosx/BlocklistDownloader.m | 7 ++++--- macosx/English.lproj/Localizable.strings | Bin 55960 -> 56052 bytes macosx/Torrent.m | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/macosx/BlocklistDownloader.m b/macosx/BlocklistDownloader.m index a2acf0000..bfbc67fa9 100644 --- a/macosx/BlocklistDownloader.m +++ b/macosx/BlocklistDownloader.m @@ -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]; diff --git a/macosx/English.lproj/Localizable.strings b/macosx/English.lproj/Localizable.strings index 759cdc5109b0586789942e321a0e5f7bf98e7678..a250289a5d30fad22b8e8e7769915673fc9b6c4f 100644 GIT binary patch delta 400 zcmbQSmHEq7<_&!;lfU^IO+LdSF!>#e(qtZHzR3#iVw2BY*4TW8#foWif~d_T9-hg| z*v%$u@$*dna$01v8hg;>b&Lv|#W(_ZCRYh7Y&H@7z&H6oq{!xTDi+L>Lsax8pVAQ8 z9Hk-0#_PwB%22{k&XCVg#E?DNu|ae52EB7alMgt`Og`5oF?p3!$K(l)&o(PK+lYWQ z{t4&Xydr##z~l>cav%X!6ayHP7!(+6fmn$FMSSwcNXgB98D-pHLv2c>CL0)WOKMV{StDXGd7Fp=C)@**w~8oEUS_~I`B$>gW{XP+8~~m2 Bh-d%+ delta 438 zcmeyem3hWi<_&!;n^-HDCeIV&nS9{1$Ye2&pviWkN|S$ya!uaHZZTOvS!(h+Mup8C z905F&Sj8rPx@f_uFoPMOJml@gOrIdn|kV<)mX&Phy!+a0Jb4~UBx5+^gN%5Uxq z+b1yj!*#CB*V4&|@D^8evq0j)v-+Zp*49DaN z23(Wh)n3Bl2+PSj^?Z{>>I1OI^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; }