Open Bug 1961578 Opened 1 year ago Updated 2 months ago

navigator.languages is just `en-US` in Firefox on Android

Categories

(Firefox for Android :: Browser Engine, defect)

All
Android
defect

Tracking

()

People

(Reporter: dholbert, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

User Story

user-impact-score:150

Attachments

(1 file)

Attached file testcase 1 —

STR:

  1. Load attached testcase, in US-English version of Firefox for Android.

ACTUAL RESULTS:
Testcase reports an array of length 1 with contents en-US (for me at least)

EXPECTED RESULTS:
Testcase should report an array of length 2 with en-US and en as the entries.

Notes:

  • Firefox Nightly on Android gives me ACTUAL RESULTS.
  • Chrome on the same Android device and Firefox-on-Desktop give me EXPECTED RESULTS.
  • This seems to be the cause of webcompat bug 1960835, as best as I can tell.
Component: Accounts and Sync → General

This value seems to be fully determined by the intl.accept_languages about:config pref.

On Desktop, it looks like that value comes from here:
https://searchfox.org/mozilla-central/rev/c3fd24fa4836680544dee8c31276bb9159a5308d/toolkit/locales/en-US/chrome/global/intl.properties#23

intl.accept_languages=en-US, en

I can see that we have the pref defaulting to that properties file path here:
https://searchfox.org/mozilla-central/rev/c3fd24fa4836680544dee8c31276bb9159a5308d/modules/libpref/init/all.js#1494

pref("intl.accept_languages",               "chrome://global/locale/intl.properties");

...and if I tap the "reset" button on Android, I can see that it resets to that^ chrome://global/locale/intl.properties value. And if I directly load chrome://global/locale/intl.properties, I can see it has intl.accept_languages=en-US, en listed inside it, on Android. Nonetheless, if I restart my browser, the about:config pref somehow gets updated to just have the value en-US.

GeckoView (Firefox Android) is multi-locale package, so intl.accept_languages is updated by GeckoView API (at startup).

We need to fix bug 1889845 for it, or add something normalization for it

Depends on: 1889845
No longer depends on: 1889845
See Also: → 1889845
Component: General → Browser Engine

Thanks!

The severity field is not set for this bug.
:boek, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jboek)
Severity: -- → S3
Flags: needinfo?(jboek)
User Story: (updated)
Assignee: nobody → m_kato
User Story: (updated)
User Story: (updated)
See Also: → 2042376
See Also: → 1765375
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: