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())
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?
(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
You need to log in before you can comment on or make changes to this bug.