1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-03 10:15:45 +00:00

in the off chance this ocurs, "1 byte" instead of "1 bytes"

This commit is contained in:
Mitchell Livingston 2009-09-18 03:49:55 +00:00
parent 55b098b6d9
commit c8abe4e28b

View file

@ -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;