Closed
Bug 610151
Opened 14 years ago
Closed 14 years ago
Firefox 4b2 (Android) Locale auto-detection does not work
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(fennec2.0b3+)
VERIFIED
FIXED
Tracking | Status | |
---|---|---|
fennec | 2.0b3+ | --- |
People
(Reporter: Nukeador, Assigned: alexp)
References
Details
Attachments
(1 file)
1.04 KB,
patch
|
blassey
:
review+
|
Details | Diff | Splinter Review |
Using Android 2.2 and es_ES locale, Firefox auto-detects English as my locale. Maybe the reason is Mozilla uses es-ES and Android uses es_ES. Tell me if you require more information about my system.
Updated•14 years ago
|
tracking-fennec: --- → ?
Updated•14 years ago
|
Assignee: nobody → alexp
tracking-fennec: ? → 2.0b3+
Comment 1•14 years ago
|
||
Axel, any ideas here?
Comment 2•14 years ago
|
||
Not really. The code in question is nsLocaleService::GetSystemLocale, I don't have a better idea than stepping through the code in a debugger on an android build.
Comment 3•14 years ago
|
||
Not sure if he can help, but I added Aki to this bug.
Comment 4•14 years ago
|
||
The dash-versus-underscore seems like a very likely culprit. If, say, de or fi work, that would probably be it; if not, it's something else. bug 596004 comment 2 seems to say, to me at least, that we need an android-locale-to-fennec-locale mapping.
Comment 5•14 years ago
|
||
Android should use posix locale code in nsLocaleService::nsLocaleService, setting mSystemLocale. That code should handle underscores just fine, it works on linux etc. My suspection is more along the lines that that code doesn't get the right info on the system locale info, like, not the right env vars or somesuch.
Assignee | ||
Comment 6•14 years ago
|
||
(In reply to comment #5) > My suspection is more along the lines that that code doesn't get the right info > on the system locale info, like, not the right env vars or somesuch. Yes, this is the case. Both calls getenv("LANG") and setlocale(category) return NULL. I'll check what we could use on Android.
Assignee | ||
Comment 7•14 years ago
|
||
Add LANG environment variable with the language from the system.
Attachment #490932 -
Flags: review?(blassey.bugs)
Updated•14 years ago
|
Attachment #490932 -
Flags: review?(blassey.bugs) → review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 8•14 years ago
|
||
CCing smontagu. Not sure if he knows a lot about Android, but he should know what we do to make this work.
Comment 9•14 years ago
|
||
FWIW I did test this patch before landing and it seemed to select between es/en/ja fine. http://hg.mozilla.org/mozilla-central/rev/e4be53fa74aa
Comment 10•13 years ago
|
||
Verified on Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110911 Firefox/9.0a1 Fennec/9.0a1 Device: HTC Desire OS: Android 2.2 Fennec auto-detects correctly the system language.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•