Closed Bug 1355804 Opened 7 years ago Closed 7 years ago

Hebrew locale doesn't load correctly when language set to default system language

Categories

(Firefox for Android Graveyard :: Locale switching and selection, defect)

53 Branch
defect
Not set
normal

Tracking

(firefox52 unaffected, firefox53 affected, firefox54 affected, firefox55 unaffected)

RESOLVED FIXED
Tracking Status
firefox52 --- unaffected
firefox53 --- affected
firefox54 --- affected
firefox55 --- unaffected

People

(Reporter: tomer, Unassigned)

Details

Attachments

(1 file)

Attached image Screenshot
Steps to reproduce:
a. Set Android language to Hebrew
b. Set Firefox locale to Default
c. Make sure to stop the Fennec process and start it again

Current result:
Some menus appear in Hebrew, while others appear as English. For example, the main menu is in Hebrew, while the context menu when tapping and holding over a link kept in English. The about: page kept in English, while Settings are in Hebrew. 

Expected result:
When setting the browser locale to Hebrew manually, everything works as expected.
Thanks for reporting :tomer!

I believe it's a dupe of bug 1351873. The patch to fix it just landed in bug 1354055, so it should be fixed in a day or two.

Let me know if it won't be fixed for you!
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
I just tested and this issue is reproducible on 53beta1 which was released over a month ago, so I don't think this is related to bug 1354055.
let's reopen then. It doesn't seem to be related to the cause of the regression in 55, but still may be fixed with bug 1354055 landing.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Amir Aharoni reporting that he was unable to reproduce this bug on Galaxy S7/Android 7 using a recent nightly.
I am unable to reproduce it as well on 2017-04-17 nightly. Maybe bug 1351873 solved it after all...
(In reply to Tomer Cohen :tomer from comment #5)
> I am unable to reproduce it as well on 2017-04-17 nightly. Maybe bug 1351873
> solved it after all...

Nope, unfortunately this is still an issue on my device (Samsung Galaxy S5 G900F Android 6.0.1) also after cleaning Date Nightly's app data, on the same 2017-04-17 build.
ItielMan, can you share:

 - You Android OS locale
 - You Fennec locale selected in preferences
 - The locale your Preferences are in
 - The locale your, say, Addons page is in

If you can plug in WebIDE to your Android can you show me result of:

 - Services.locale.getRequestedLocales();
 - Services.locale.getAppLocalesAsLangTags();
 - Components.classes["@mozilla.org/intl/ospreferences;1"].
             getService(Components.interfaces.mozIOSPreferences).GetSystemLocales();

Thanks!
Flags: needinfo?(itiel_yn8)
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #7)
> ItielMan, can you share:
> 
>  - You Android OS locale
>  - You Fennec locale selected in preferences
>  - The locale your Preferences are in
>  - The locale your, say, Addons page is in
> 
> If you can plug in WebIDE to your Android can you show me result of:
> 
>  - Services.locale.getRequestedLocales();
>  - Services.locale.getAppLocalesAsLangTags();
>  - Components.classes["@mozilla.org/intl/ospreferences;1"].
>             
> getService(Components.interfaces.mozIOSPreferences).GetSystemLocales();
> 
> Thanks!

1. Hebrew
2. "Default". Selecting "Hebrew" manually fixes the issue.
3. Hebrew.
4. English.

5. Array [ "en-US" ]
6. Array [ "en-US", "en-ZA", "en-GB" ]
7. nsJSCID { name: "@mozilla.org/intl/ospreferences;1", number: "{65944815-e9ae-48bd-a2bf-f110872095…", valid: true }
8. ReferenceError: getService is not defined

And if 7 and 8 should be combined:
TypeError: Components.classes['@mozilla.org/intl/ospreferences;1'].getService(...).GetSystemLocales is not a function
Flags: needinfo?(itiel_yn8)
(In reply to ItielMaN from comment #8)

> Components.classes['@mozilla.org/intl/ospreferences;1'].getService(...).
> GetSystemLocales is not a function
Try 
  Components.classes["@mozilla.org/intl/ospreferences;1"].getService(Components.interfaces.mozIOSPreferences).getSystemLocales();
(In reply to Tomer Cohen :tomer from comment #9)
> (In reply to ItielMaN from comment #8)
> 
> > Components.classes['@mozilla.org/intl/ospreferences;1'].getService(...).
> > GetSystemLocales is not a function
> Try 
>  
> Components.classes["@mozilla.org/intl/ospreferences;1"].
> getService(Components.interfaces.mozIOSPreferences).getSystemLocales();

Array [ "en-US" ]
Oh, yeah, sorry. 7/8 should be combined and I guess it's `getSystemLocales` not `GetSystemLocales`.

wrt. the bug - I'm not sure how selecting "Hebrew" can fix the issue since you don't have hebrew locales according to (6).

What do you mean by "fixing"? Your Addons page is in Hebrew?

> Array [ "en-US" ]

So the API returns en-US, but your OS is really in Hebrew? That's very confusing.

I see two question marks in your results:

1) How can your Addons page be in Hebrew if Services.locale.getAvailableLocales does not return Hebrew which means there is no Hebrew locale available.
2) Why your OSPreferences::GetSystemLocales returns en-US if your Android OS locale is not en-US?

Can you also tell me what is the value of the "intl.locale.os" preference?
WFM on Galaxy S4/Cyanogen: 

> Services.locale.getRequestedLocales();
Array [ "he-IL" ]
> Services.locale.getAppLocalesAsLangTags();
Array [ "he", "en-US" ]
> Components.classes["@mozilla.org/intl/ospreferences;1"].getService(Components.interfaces.mozIOSPreferences).getSystemLocales();
Array [ "he-IL" ]
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #11)
> Oh, yeah, sorry. 7/8 should be combined and I guess it's `getSystemLocales`
> not `GetSystemLocales`.
> 
> wrt. the bug - I'm not sure how selecting "Hebrew" can fix the issue since
> you don't have hebrew locales according to (6).
> 
> What do you mean by "fixing"? Your Addons page is in Hebrew?
> 
> > Array [ "en-US" ]
> 
> So the API returns en-US, but your OS is really in Hebrew? That's very
> confusing.
> 
> I see two question marks in your results:
> 
> 1) How can your Addons page be in Hebrew if
> Services.locale.getAvailableLocales does not return Hebrew which means there
> is no Hebrew locale available.
> 2) Why your OSPreferences::GetSystemLocales returns en-US if your Android OS
> locale is not en-US?
> 
> Can you also tell me what is the value of the "intl.locale.os" preference?

> What do you mean by "fixing"? Your Addons page is in Hebrew?

Yes (same for about:firefox), though right clicking URLs context menu is still in English.

> 1) How can your Addons page be in Hebrew if
> Services.locale.getAvailableLocales does not return Hebrew which means there
> is no Hebrew locale available.

Sorry about that! I mistook #3 (saying that Addons page is in Hebrew), I had the Nightly locale set to "Hebrew" at that time :)
When set to default, the Addons page is in English.

> 2) Why your OSPreferences::GetSystemLocales returns en-US if your Android OS
> locale is not en-US?

That is beyond me :)

> Can you also tell me what is the value of the "intl.locale.os" preference?

he-IL
Upon running Nightly I see in the console:
> Locale:OS: he-IL
> New OS locale.
> Default intl.accept_languages = en-US, en
> Setting intl.accept_languages to en-us,he-il,en
Not sure how, but clean-installing Nightly fixed it.
When Nightly's locale set to Default, the Hebrew translations are now loaded everywhere.

Closing as RESOLVED FIXED.
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
works for me is used for bugs that resolved themselves without a code change
Resolution: FIXED → WORKSFORME
(In reply to Kevin Brosnan [:kbrosnan] from comment #16)
> works for me is used for bugs that resolved themselves without a code change

Reopening, since we are not fully understand what causing it, and would like to discuss if it is possible to uplift the fix (bug 1351873?).
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
I don't believe it's viable for uplift, sorry, too many changes between 54 and 55 in between.
Marking as fixed
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: