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:
parent
76bc93b6a6
commit
d04bd9b8be
|
@ -318,16 +318,16 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||||
[unitFormatter setAllowsNonnumericFormatting: NO];
|
[unitFormatter setAllowsNonnumericFormatting: NO];
|
||||||
|
|
||||||
[unitFormatter setAllowedUnits: NSByteCountFormatterUseKB];
|
[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];
|
[unitFormatter setAllowedUnits: NSByteCountFormatterUseMB];
|
||||||
mbString = [unitFormatter stringFromByteCount: 0];
|
mbString = [unitFormatter stringFromByteCount: 17];
|
||||||
|
|
||||||
[unitFormatter setAllowedUnits: NSByteCountFormatterUseGB];
|
[unitFormatter setAllowedUnits: NSByteCountFormatterUseGB];
|
||||||
gbString = [unitFormatter stringFromByteCount: 0];
|
gbString = [unitFormatter stringFromByteCount: 17];
|
||||||
|
|
||||||
[unitFormatter setAllowedUnits: NSByteCountFormatterUseTB];
|
[unitFormatter setAllowedUnits: NSByteCountFormatterUseTB];
|
||||||
tbString = [unitFormatter stringFromByteCount: 0];
|
tbString = [unitFormatter stringFromByteCount: 17];
|
||||||
|
|
||||||
[unitFormatter release];
|
[unitFormatter release];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue