Closed Bug 1445897 Opened 6 years ago Closed 6 years ago

Globally installed language pack enabled but not functional

Categories

(Firefox :: Untriaged, defect)

59 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: arjenbalfoort, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180310025718

Steps to reproduce:

OS: SolydXK 9 (Debian Stretch)
FF: 59.0 (64-bit)
DEBS: http://repository.solydxk.com/pool/main/f/firefox/

I packaged FF 59.0 from source, including all language packs. FF is installed in /opt/firefox and the language packs are installed in /opt/firefox/browser/extensions.

FF has the language pack enabled but if I want to change FF's interface language it doesn't change to that language.

If I copy /opt/firefox/browser/extensions/langpack-*@firefox.mozilla.org.xpi to ~/.mozilla/firefox/*.default/extensions/ the GUI can be set to the desired language

These are the settings in prefs.js:
user_pref("intl.locale.matchOS", false);
user_pref("intl.locale.requested", "de-DE");
user_pref("general.useragent.locale", "de-DE");



Actual results:

As long as I don't copy the language packs in the user's FF directory, the interface cannot be set to another language.


Expected results:

With the above mentioned settings in prefs.js the interface should change to that language after a restart.
(In reply to arjenbalfoort from comment #0)

> user_pref("general.useragent.locale", "de-DE");

You should change this to intl.locale.requested from 59 (bug 1414390).
Please let me know if that solves the problem for you, in case I'll dupe this against the other bug.
Flags: needinfo?(arjenbalfoort)
(In reply to Francesco Lodolo [:flod] from comment #2)
> Please let me know if that solves the problem for you, in case I'll dupe
> this against the other bug.

Scenario 1: clean install without any previous configuration (no prefs.js):

Install FF 59.0:
sudo apt-get update
sudo apt-get install firefox firefox-l10n-de

Start FF
Type about:config in the address bar
Right-Click and add a new boolean: intl.locale.matchOS with value false
Right-Click and add a new string: intl.locale.requested with value de-DE
Close and restart FF: still in English.
After reboot FF is still in English.


Scenario 2: upgrade from FF ESR to latest FF 59.0:

I have FF ESR 52.6 (64-bit) installed with firefox-esr-l10n-de installed.
I confirm that these settings:
intl.locale.matchOS = false
general.useragent.locale = de-DE
intl.locale.requested does not exist

The FF interface is in German.

I then install FF 59.0:
sudo apt-get update
sudo apt-get install firefox firefox-l10n-de

This replaces the FF ESR packages.

Close and restart FF: interface is still in German:
intl.locale.requested is present and automatically set to de-DE.


Scenario 3: upgrade FF 58.0.2 to latest FF 59.0

Install FF 59.0:
sudo apt-get update
sudo apt-get install firefox firefox-l10n-de

intl.locale.matchOS is set to true. Change it to false
Right-Click and add a new string: intl.locale.requested with value de-DE
Close and restart FF: interface is set to German.

It seems that this only happens when intl.locale.matchOS is not present when FF 59 is installed.
Flags: needinfo?(arjenbalfoort)
Sorry, I clearly read the bug too quickly, completely missing that you were setting both general.useragent.locale and intl.locale.requested.

> Scenario 1: clean install without any previous configuration (no prefs.js):
> 
> Install FF 59.0:
> sudo apt-get update
> sudo apt-get install firefox firefox-l10n-de
> 
> Start FF
> Type about:config in the address bar
> Right-Click and add a new boolean: intl.locale.matchOS with value false
> Right-Click and add a new string: intl.locale.requested with value de-DE
> Close and restart FF: still in English.
> After reboot FF is still in English.
> 
> ....
>
> It seems that this only happens when intl.locale.matchOS is not present when
> FF 59 is installed.

In this scenario:

1) Is the language pack available in about:addons? In comment 0 you say it's enabled, but I'm not sure if that's related to this case.

2) If you go to about:support, at the end of the page, what are the values for "Internationalization & Localization"?

Is it correct to say that even this scenario works correctly if you put the language packs in ~/.mozilla/firefox/*.default/extensions/?
> 1) Is the language pack available in about:addons? In comment 0 you say it's
> enabled, but I'm not sure if that's related to this case.

It means that FF recognizes there is a language pack installed in /opt/firefox/browser/extensions and that I can disable and enable it from the about:addons page.
 
> 2) If you go to about:support, at the end of the page, what are the values
> for "Internationalization & Localization"?

Internationalisierung & Lokalisierung
Anwendungseinstellungen
Angeforderte Sprachen: ["de-DE","en-US"]
Verfügbare Sprachen: ["de","en-US"]
Anwendungssprachen: ["de","en-US"]
Region-Einstellungen: ["de","en-US"]
Standardsprache: "en-US"
Betriebssystem
Sprachen des Betriebssystems: ["en-US"]
Region-Einstellungen: ["en-US"]

> Is it correct to say that even this scenario works correctly if you put the
> language packs in ~/.mozilla/firefox/*.default/extensions/?

Yes, that is correct.

I'll get back to the user who reported the issue in our forum to see if he has the same settings in about:support. I'll report if anything unusual is found.
I have tested this issue on Ubuntu 14.04, but I haven't managed to install the Firefox de package using the "sudo apt-get install firefox firefox-l10n-de" command in terminal. But, I tested this issue manually following the next steps:

1. Download latest Firefox 59.0.2 (en-US build) release from here: https://ftp.mozilla.org/pub/firefox/releases/59.0.2/linux-x86_64/en-US/
2. Start the browser with a new clean profile.
3. Navigate to https://addons.mozilla.org/en-US/firefox/addon/deutsch-de-language-pack/ and install the Deutsch Language Pack.
4. Navigate to "about:config" page.
5. Right-Click and add a new boolean: intl.locale.matchOS with value false
6. Right-Click and add a new string: intl.locale.requested with value de-DE
7. Restart Firefox browser.

After following the steps, the browser was correctly changed to Deutsch language. 

I am not sure if this is the right way to test the described issue, but @arjenbalfoort can you also try this and see if the issue is still reproducible?
Also, is there a chance that the Debian's Firefox version has some conflicts or issues with the language packages?
Flags: needinfo?(arjenbalfoort)
The reporter already explained that the issue is only with a very specific scenario (language pack globally installed in /opt/firefox/browser/extensions). This bug is not about installing and enabling a language pack.

It would be great if someone could confirm that the scenario 1 described in comment 3 can be reproduced.
Flags: needinfo?(arjenbalfoort)
(In reply to Cosmin Muntean [:CosminMCG], Desktop Engineering QA from comment #7)

I build the Firefox packages (including the l10n packages) for the SolydXK users: http://repository.solydxk.com/pool/main/f/firefox/

From point 4 on your list it works for SolydXK:
> 4. Navigate to "about:config" page.
> 5. Right-Click and add a new boolean: intl.locale.matchOS with value false
> 6. Right-Click and add a new string: intl.locale.requested with value de-DE
> 7. Restart Firefox browser.

After I blogged the instructions: https://solydxk.com/firefox-59-changed-localization-configuration/
Several users reported that this fixed the issue.

However, users upgrading from FF 58.* need to manually edit the above mentioned variables even if intl.locale.matchOS and general.useragent.locale were set correctly.
(In reply to Francesco Lodolo [:flod] (workweek until Mar 30, slower than usual) from comment #8)
> The reporter already explained that the issue is only with a very specific
> scenario (language pack globally installed in
> /opt/firefox/browser/extensions). This bug is not about installing and
> enabling a language pack.
> 
> It would be great if someone could confirm that the scenario 1 described in
> comment 3 can be reproduced.

After a clean install with globally installed l10n package I had to manually enable the language pack (disabled by default) and add the missing intl.locale.matchOS and intl.locale.requested.
(In reply to arjenbalfoort from comment #10)
> (In reply to Francesco Lodolo [:flod] (workweek until Mar 30, slower than
> usual) from comment #8)
> > The reporter already explained that the issue is only with a very specific
> > scenario (language pack globally installed in
> > /opt/firefox/browser/extensions). This bug is not about installing and
> > enabling a language pack.
> > 
> > It would be great if someone could confirm that the scenario 1 described in
> > comment 3 can be reproduced.
> 
> After a clean install with globally installed l10n package I had to manually
> enable the language pack (disabled by default) and add the missing
> intl.locale.matchOS and intl.locale.requested.

intl.locale.matchOS has been removed from 59 (see also https://bugzilla.mozilla.org/show_bug.cgi?id=1447789#c5)
(In reply to Francesco Lodolo [:flod] (workweek until Mar 30, slower than usual) from comment #11)

> intl.locale.matchOS has been removed from 59 (see also
> https://bugzilla.mozilla.org/show_bug.cgi?id=1447789#c5)

Noted.
I also see there's work on a UI. That would certainly help preventing users to manually edit about:config settings.
I am not sure which would be the next step in order to go further with this issue.

@flod can you please give us your opinion on this? We should close this as dupe of bug 1425941 since the users have to manually add the mentioned prefs in "about:config" and a UI preference will help? Or we should move this to Toolkit: Add-ons Manager component and ask for developers opinion.
Flags: needinfo?(francesco.lodolo)
As explained in comment 8, I don't think this is not a dupe of existing bugs. 

At this point, I suppose it's a WORKSFORME.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(francesco.lodolo)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.