Opened 7 months ago

Closed 6 months ago

#18900 closed bug (fixed)

Incorrect display of some sizes in Tracker

Reported by: madmax Owned by: nobody
Priority: normal Milestone: R1/beta5
Component: Applications/Tracker Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

string_for_size returns localized numbers after hrev57672, which means we can't count on a dot as decimal separator. If you choose a locale with a dot as thousand separator, like Spanish, and have a file bigger than 1KiB that would use it you'll lose a 0 in the tens, if there's one. For example, a file of 1023995 bytes shows as "1.00,00 KiB", and 1034234 turns into "1.09,99 KiB".

Only happens in folder windows, not in info panes. See TruncFileSizeBase.

Change History (2)

comment:1 by waddlesplash, 6 months ago

I guess we need to use BNumberFormat::GetSeparator here? Or expose a new API so that BNumberFormat can do the right thing automatically (by setting only the maximum precision, and leaving minimum at 0?) Or, just use a private API for this method?

comment:2 by waddlesplash, 6 months ago

Resolution: fixed
Status: newclosed

Fix merged in hrev57731.

Note: See TracTickets for help on using tickets.