when generating the size units for libtransmission, use an arbitrary size instead of 0 to avoid potential pluralization special cases in some localizations

This commit is contained in:
Mitchell Livingston 2012-09-10 03:21:07 +00:00
parent 76bc93b6a6
commit d04bd9b8be
1 changed files with 4 additions and 4 deletions

View File

@ -318,16 +318,16 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
[unitFormatter setAllowsNonnumericFormatting: NO];
[unitFormatter setAllowedUnits: NSByteCountFormatterUseKB];
kbString = [unitFormatter stringFromByteCount: 0];
kbString = [unitFormatter stringFromByteCount: 17]; //use a random value to avoid possible pluralization issues with 1 or 0
[unitFormatter setAllowedUnits: NSByteCountFormatterUseMB];
mbString = [unitFormatter stringFromByteCount: 0];
mbString = [unitFormatter stringFromByteCount: 17];
[unitFormatter setAllowedUnits: NSByteCountFormatterUseGB];
gbString = [unitFormatter stringFromByteCount: 0];
gbString = [unitFormatter stringFromByteCount: 17];
[unitFormatter setAllowedUnits: NSByteCountFormatterUseTB];
tbString = [unitFormatter stringFromByteCount: 0];
tbString = [unitFormatter stringFromByteCount: 17];
[unitFormatter release];
}