Closed Bug 1019726 Opened 7 years ago Closed 7 years ago

Support three-character locale code for Maithili

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect, P5)

All
Android
defect

Tracking

(firefox35 fixed, firefox36 fixed, relnote-firefox 36+, fennec+)

RESOLVED FIXED
mozilla36
Tracking Status
firefox35 --- fixed
firefox36 --- fixed
relnote-firefox --- 36+
fennec + ---

People

(Reporter: rnewman, Assigned: rnewman)

References

Details

Attachments

(3 files, 2 obsolete files)

Forked from Bug 1013226.

This will be transparently supported by some future version of Android, but we'd like to not wait that long. We're aiming for 33, which is already a significant slip from when we would have liked this to go out.
tracking-fennec: 33+ → +
filter on [mass-p5]
Priority: -- → P5
Evidence suggests that the v21 build tools don't choke when `mai` is in maemo-locales. I can get a build on my KitKat device that will let me pick Maithili from the language picker.

The OS doesn't know anything about it, though. It calls the language "Maithili", not itself localized.

The only localization I can see after picking Maithili is the title of about:home. That implies that Gecko is working but the Android layer is not.

We were expecting there to be a chunk of support required in Android itself, so this isn't surprising.
Depends on: 1084498
Just making sure to note here that rnewman was able to create the build with mai, but the build didn't seem to recognize and pull in mai string resources.

We may also need to investigate whether it's possible to feed the language picker a translated language name.
(In reply to Jeff Beatty [:gueroJeff] from comment #3)

> We may also need to investigate whether it's possible to feed the language
> picker a translated language name.

Yeah, that's a separate bug -- right now we just use whatever the Java environment decides to use. Usually a missing translation there implies inadequate font support, though.
Next steps for this: once the builders are using v21, we can turn on Maithili in maemo-locales. The build will succeed, at least, so even if the locale isn't completely functional on most Android devices it's a step in the right direction.

We might find that Lollipop devices work fine, and all others have only Gecko/content localized correctly.
IMHO, if maithili only works in full on Lollipop, it'd be preferable to only expose it on Lollipop devices.
We can do that too, at the locale picker level.
I've ordered a Nexus 7 that I can flash to Lollipop to try this out.
Flags: needinfo?(rnewman)
I also pre-ordered a Nexus 9 so I can help with this testing. Should get here in the beginning of November.
Attached image Lollipop Maithili
This works on a Nexus 7 with Lollipop.
Flags: needinfo?(rnewman)
Attachment #8515224 - Flags: review?(jbeatty)
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
This simply filters out locale codes that are three-character strings or more, still allowing xx-YY and friends.

It also adds some handy verbose logging to help with testing, which won't be shown by default:

V/GeckoLocaleList( 8309): मराठी => mr
V/GeckoLocaleList( 8309): हिन्दी (भारत) => hi-IN
V/GeckoLocaleList( 8309): অসমীয়া => as
V/GeckoLocaleList( 8309): বাংলা (ভারত) => bn-IN
V/GeckoLocaleList( 8309): ਪੰਜਾਬੀ (ਭਾਰਤ) => pa-IN
V/GeckoLocaleList( 8309): ગુજરાતી (ભારત) => gu-IN
V/GeckoLocaleList( 8309): ଓଡ଼ିଆ => or
V/GeckoLocaleList( 8309): தமிழ் => ta
V/GeckoLocaleList( 8309): తెలుగు => te
Attachment #8515227 - Flags: review?(margaret.leibovic)
This probably won't apply cleanly to Aurora, 'cos I prepared it on fx-team, but it's a symbolic review :)
Attachment #8515228 - Flags: review?(jbeatty)
On pre-Lollipop devices, loading the locale picker will show:

W/GeckoLocaleList(11510): Skipping locale mai on this device.
Attachment #8515227 - Flags: review?(margaret.leibovic) → review+
Comment on attachment 8515224 [details] [diff] [review]
Part 1: add Maithili to all-locales. v1

Just a heads up, we typically add locales to mozilla-aurora files. The mozilla-central file has not been updated in over a year. Are we ready to land on mozilla-aurora, or do we wait for the code changes to make it to Aurora first?
(In reply to Mark Finkle (:mfinkle) from comment #15)

> Just a heads up, we typically add locales to mozilla-aurora files. The
> mozilla-central file has not been updated in over a year. Are we ready to
> land on mozilla-aurora, or do we wait for the code changes to make it to
> Aurora first?

This was intended for Aurora, but you're right, this is already in m-a's all-locales. (I was too lazy to prep against mozilla-aurora, and thus did extra work. There's a philosophical statement in there somewhere.)

Maithili was ready to go for Bug 1013226, so the locale is ready. I'll be flagging both patches for Aurora approval at the same time; Part 2 (the code part) just landed in fx-team.
Attachment #8515224 - Attachment is obsolete: true
Attachment #8515224 - Flags: review?(jbeatty)
Comment on attachment 8515228 [details] [diff] [review]
Part 3: add 'mai' to Aurora maemo-locales. v1

For Aurora, once the locale picker changes land there.
Attachment #8515228 - Flags: review?(jbeatty) → review+
Now actually prepped against Aurora, and moved to be part 1.
Attachment #8516923 - Flags: review?(mark.finkle)
Attachment #8515228 - Attachment is obsolete: true
Note that we can't land part 1 until Bug 1084498 is done and ready on Aurora.
Keywords: leave-open
Attachment #8516923 - Flags: review?(mark.finkle) → review+
Comment on attachment 8516923 [details] [diff] [review]
Part 1: add 'mai' to Aurora maemo-locales. v2

Approval Request Comment
[Feature/regressing bug #]:
  N/A

[User impact if declined]:
  No Maithili.

[Describe test coverage new/current, TBPL]:
  None.

[Risks and why]: 
  Only possible risk is that we break the build, but the new tool version added in a dependency should resolve that.

[String/UUID change made/needed]:
  None.
Attachment #8516923 - Flags: approval-mozilla-aurora?
Comment on attachment 8515227 [details] [diff] [review]
Part 2: exclude Maithili from locale switcher on Android < 21. v1

Approval Request Comment
[Feature/regressing bug #]:
  None.

[User impact if declined]:
  It's not possible for pre-Lollipop versions of Android to successfully use three-char locales. This patch simply hides them in that case.

[Describe test coverage new/current, TBPL]:
  Baked for three weeks. No direct test.

[Risks and why]: 
  Very low risk.

[String/UUID change made/needed]:
  None.
Attachment #8515227 - Flags: approval-mozilla-aurora?
Depends on: 1085514
Attachment #8515227 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8516923 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Release Note Request (optional, but appreciated)
[Why is this notable]:
  Added locale.

[Suggested wording]:
  Maithili (mai) locale support on Android Lollipop devices.

[Links (documentation, blog post, etc)]:
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
relnote-firefox: --- → ?
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
Fantastic!! Thank you all :-D

rnewman, we should make time to get together to talk about what this means for other three character language code locales.
> rnewman, we should make time to get together to talk about what this means
> for other three character language code locales.

Attack my calendar for next week :D
As far as I understand, we have only now mai because of a previous limitation of android.
I added it to the release notes as "Locales added: Maithili (mai) (Android Lollipop only)" as wording.
(In reply to Sylvestre Ledru [:sylvestre] from comment #28)
> As far as I understand, we have only now mai because of a previous
> limitation of android.

Correct.

> I added it to the release notes as "Locales added: Maithili (mai) (Android
> Lollipop only)" as wording.

Sounds good.
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 36 → mozilla36
You need to log in before you can comment on or make changes to this bug.