Closed
Bug 108689
Opened 24 years ago
Closed 5 years ago
XP way to show number in current locale (with correct decimal and thousands separators) needed
Categories
(Core :: Internationalization, defect)
Core
Internationalization
Tracking
()
RESOLVED
INACTIVE
People
(Reporter: bzbarsky, Assigned: nhottanscp)
References
Details
(Keywords: helpwanted, intl)
There is a number of places in our UI that should really display numbers with
thousands separators (typically file sizes). We should use the current locale
when doing this. A library function to do this is needed so the various
callsites don't all have to roll their own.
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla1.0 → mozilla1.2
Comment 2•24 years ago
|
||
first, please be specific where do you see such issue. that will help us plan
for a solution.
Comment 3•24 years ago
|
||
screen shot please.
![]() |
Reporter | |
Comment 4•24 years ago
|
||
Frank, please look at the particular bugs blocked by this one.
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla1.2alpha → ---
Comment 5•22 years ago
|
||
We need something similar to nsIDateTimeFormat for numbers. The way numerica
formating is handled is platform-dependent so that we'd end up writing
platform-specific instances of nsINumberFormat. Implementations in Java and ICU
should be good starting points.
Keywords: intl
Comment 6•21 years ago
|
||
This must be solved before Firefox and Thunderbird 1.0. It is a very bad idea to
ship 1.0 with improper size notations in various File Info and Properties dialogues.
I want to notice that many European countries use commas (not periods) as a
decimal separator. See bug bug 165200 for some relevant discussion.
Severity: normal → major
Flags: blocking-aviary1.0RC1?
Keywords: helpwanted
Summary: XP way to show number in current locale (with thousands separators) needed → XP way to show number in current locale (with correct decimal and thousands separators) needed
![]() |
Reporter | |
Comment 7•21 years ago
|
||
Note that most dialogs are using JS to show the number and hence are NOT
affected by this bug -- they can use toLocaleString() in JS.
Also note that this is effectively assigned to "nobody" at the moment.
Comment 8•21 years ago
|
||
I think we need to have some special way to format sizes. Right now it is very
often that strings "KB" are hard-coded, which is wrong. Not every language uses
Latin alphabet, and we must provide an easy way for localisers to localise on
how they want to call their units.
A good idea will be to provide a switch of what units must be used. Apart from
obvious "byte", "kibibyte", "mebibyte" etc, we might have such switches as
"Auto" and "AutoAndBytes".
With an Auto switch, use the behaviour suggested by Nail in bug 108658 comment
6, i.e. 0--2047 in bytes, 2048 to 20971511 in KiB, (2^21) to (2^31-1) in MiB, etc.
With an AutoAndBytes switch, show the same size as in Auto, and in addition show
the original size in bytes, for example, "2KiB (2048 bytes)". This switch should
be used in Page Info and Properties windows, or anywhere else where we need to
show the size of only one element.
For those who don't know what KiB is, visit
<http://physics.nist.gov/cuu/Units/binary.html>.
Alias: numbers
Updated•21 years ago
|
Alias: numbers
Updated•21 years ago
|
Flags: blocking-aviary1.0RC1? → blocking-aviary1.0RC1-
Comment 9•18 years ago
|
||
No activity since 2004. Assign to "nobody"?
Updated•16 years ago
|
QA Contact: teruko → i18n
Comment 10•5 years ago
|
||
Intl.NumberFormat in JS + ICU access in C++/Rust solved it.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•