Closed Bug 597655 Opened 14 years ago Closed 14 years ago

Sync UI: Internationalize sizes in Server Quota dialog

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: u60234, Assigned: philikon)

References

Details

(Keywords: intl)

Attachments

(2 files)

The Server Quota dialog display sizes with a period as a decimal separator. In many locales this should be a comma instead.
blocking2.0: --- → ?
That's absolutely true. The Quota dialog uses whatever the Download Manager uses and I just checked, that doesn't properly localise the numbers either!
Assignee: nobody → philipp
OS: Windows 7 → All
Hardware: x86 → All
Summary: Internationalize sizes in Server Quota dialog → Sync UI: Internationalize sizes in Server Quota dialog
I can't quite figure out how to properly internationalise decimal numbers. Apparently number.toLocaleString() exists (and seems to be occasionally used in m-c) but on a German Firefox (on a German OS X) 2.3.toLocaleString still returns "2.3" and not "2,3" as expected.

CCing Axel, perhaps he can shed some light on this?
All the toLocaleString() methods use OS APIs right now, and thus the OS locale.

As it's the same as in download manager, not a regression, thus not a blocker, but a good to fix post 4, if we get a good API in gecko/l20n for this.
Thanks for clarifying. Clearing blocking2.0 accordingly.
Assignee: philipp → nobody
blocking2.0: ? → ---
But are we actually calling number.toLocaleString() here? It may not work on OS X, see bug 368838, but on Windows and Linux it does.

The sizes in Page Info, where number.toLocaleString() are used are correctly localized on Windows 7 and Ubuntu 8.04.
(In reply to comment #5)
> But are we actually calling number.toLocaleString() here?

No we're not (and neither does the Download Manager), but I have a patch that makes the quota dialog use it.

> It may not work on OS X, see bug 368838, but on Windows and Linux it does.

I see. I don't have a non-English Windows or Linux installation handy, so I won't be able to verify this.
Attached patch v1Splinter Review
Assignee: nobody → philipp
Attachment #476639 - Flags: review?(mconnor)
Attached image screenshot
I can verify that the patch fixes this bug on Windows.
Comment on attachment 476639 [details] [diff] [review]
v1

We should fix this in the shared DownloadUtils code.
Attachment #476639 - Flags: feedback-
(In reply to comment #9)
> We should fix this in the shared DownloadUtils code.

Well, DownloadUtils.convertByteUnits() returns [number, unit] and it's up to the UI code to properly display 'number'. I'd say we should *also* fix this in DownloadUtils.

Unless you're suggesting to change the contract of DownloadUtils.convertByteUnits() and make it return [localized_number, unit].
Actually, DownloadUtils.convertByteUnits() returns [string, string] despite what the comments say. So I think we're ok making this change there.
Depends on: 597852
Attachment #476639 - Flags: review?(mconnor)
Bug 597852 landed which fixes this.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
verified per comment #8
Status: RESOLVED → VERIFIED
Component: Firefox Sync: UI → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: