Closed Bug 1326212 Opened 7 years ago Closed 3 years ago

OS Locale sent in telemetry pings instead of UI locale

Categories

(Firefox for Android Graveyard :: Metrics, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: flod, Unassigned)

References

Details

I was trying to find out the usage of localized builds for Fennec in India, and noticed strange locale codes in the results: most of the reported locales are not supported in the UI (en-IN, en-AU, etc.)
https://sql.telemetry.mozilla.org/queries/2006/source#table

Telemetry Documentation
https://gecko.readthedocs.io/en/latest/toolkit/components/telemetry/telemetry/data/core-ping.html

"locale": <string>, // application locale, e.g. "en-US"

Relevant code path seems to be
https://dxr.mozilla.org/mozilla-central/rev/143bb4b9249e528e658f6ccc449991794b8675f8/mobile/android/base/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetryCorePingBuilder.java#88

I assume we're sending the OS locale instead of the UI locale with
Locales.getLanguageTag(Locale.getDefault())
Component: General → Metrics
Locale.getDefault is correct, but it must be called in a process in which the switched locale has been loaded. If the telemetry uploader is doing locale capture, then it has to jump through the same hoops as each of Fennec's activities. The FHR code did so, if you want to dig that up for reference.
Hi Francesco
Do you need the locale to be UI locale?
Flags: needinfo?(francesco.lodolo)
(In reply to Nevin Chen [:nechen] from comment #2)
> Hi Francesco
> Do you need the locale to be UI locale?

Yes, we need the UI locale, not funky Android ones.

> I assume we're sending the OS locale instead of the UI locale with
Flags: needinfo?(francesco.lodolo)
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.