mkaply / cck2wizard

CCK2
Mozilla Public License 2.0
46 stars 9 forks source link

Try to really guess the userAgentLocale when general.useragent.locale… #80

Closed shadeslayer closed 6 years ago

shadeslayer commented 6 years ago

… fails

Fixes #69

mkaply commented 6 years ago

Was this on 58 or 59?

mkaply commented 6 years ago

So I think the right API here is actually Services.locale.getRequestedLocale()

This pref was removed in 59.

shadeslayer commented 6 years ago

This was on Firefox 58

shadeslayer commented 6 years ago

Using Services.locale.getRequestedLocale caused a segfault on Firefox 58 for me.

It also seems this entire code path is really slow on ARM since the rest of the UI get's setup and the bookmarks appear after 10-15 seconds.

mkaply commented 6 years ago

OK, I'm really confused. Firefox 58 still had the general.useragent.locale preference.

Are you on Linux?

shadeslayer commented 6 years ago

I am indeed on Linux. While FF 58 still has general.useragent.locale, the value that I get from Preferences.defaults.get is undefined. In about:config, the same value is set to en when in reality the locale should have been de.

shadeslayer commented 6 years ago

Bump?

mkaply commented 6 years ago

Sorry. I still don't understand your last few comments.

Can you tell me the value of intl.locale.matchOS on your Firefox 58?

shadeslayer commented 6 years ago

It's set to false for some reason :S

mkaply commented 6 years ago

Most Linux versions set it to true. Strange. I think I know of a better way to do this because I actually need to get the chrome locale. I'll try another patch.

shadeslayer commented 6 years ago

Yeah, it's quite odd

mkaply commented 6 years ago

I ended up with a different patch for this for Firefox 60. Please take a look. Thanks!