Closed Bug 1346084 Opened 7 years ago Closed 7 years ago

Expose mozIntl.getLocaleInfo to ChromeOrXBL

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jessica, Assigned: jessica)

References

Details

Attachments

(1 file, 2 obsolete files)

To know the direction (rtl or ltr) of the locale.
Blocks: 1346085
Attached patch patch, v1. (obsolete) — Splinter Review
Attachment #8846934 - Flags: review?(bugs)
Comment on attachment 8846934 [details] [diff] [review]
patch, v1.

Perhaps add a test when locales is empty array or something.
Attachment #8846934 - Flags: review?(bugs) → review+
Attached patch patch, v2. (obsolete) — Splinter Review
added a test when locales is an empty array, carrying r+.
Attachment #8846934 - Attachment is obsolete: true
Attachment #8847387 - Flags: review+
The test that you added will work only if the test infra is run on en-US Firefox.

It would be better to de-hardcode "en-US" and "ltr" and instead take it from Service.locale.getAppLocaleAsBCP47 and mozIntl.getLocaleInfo(locale).rtl for that locale.
Attached patch patch, v3.Splinter Review
Use mozILocaleService.getAppLocaleAsBCP47() to get default locale in tests, see comment 4.
Attachment #8847387 - Attachment is obsolete: true
Attachment #8847405 - Flags: review+
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e19d4c92575
Expose mozIntl.getLocaleInfo to ChromeOrXBL. r=smaug
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9e19d4c92575
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: