From c8abe4e28b32b2d73956c40812395ee8e820d8a9 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Fri, 18 Sep 2009 03:49:55 +0000 Subject: [PATCH] in the off chance this ocurs, "1 byte" instead of "1 bytes" --- macosx/NSStringAdditions.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/macosx/NSStringAdditions.m b/macosx/NSStringAdditions.m index 44748447c..0dd089b8c 100644 --- a/macosx/NSStringAdditions.m +++ b/macosx/NSStringAdditions.m @@ -42,7 +42,12 @@ + (NSString *) stringForFileSize: (uint64_t) size { if (size < 1024) - return [NSString stringWithFormat: @"%lld %@", size, NSLocalizedString(@"bytes", "File size - bytes")]; + { + if (size != 1) + return [NSString stringWithFormat: @"%lld %@", size, NSLocalizedString(@"bytes", "File size - bytes")]; + else + return NSLocalizedString(@"1 byte", "File size - bytes"); + } CGFloat convertedSize; NSString * unit;