Closed Bug 1437480 Opened 7 years ago Closed 6 years ago

Port bug 1425941: introduce UI to let the user choose which available language pack should be used. Was: installing a language pack has no impact in 59.0b1

Categories

(Thunderbird :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1481852

People

(Reporter: c.schoenert, Unassigned)

References

(Depends on 1 open bug)

Details

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

Steps to reproduce:

I downloaded and extracted the recent version of Thunderbird 59.0b1 en_US from the CDN for Linux amd64.

http://download-origin.cdn.mozilla.net/pub/thunderbird/releases/59.0b1/linux-x86_64/en-US/thunderbird-59.0b1.tar.bz2

I also downloaded the language package for German.

http://download-origin.cdn.mozilla.net/pub/thunderbird/releases/59.0b1/linux-x86_64/xpi/de.xpi

Next I moved my existing profile ~/.thunderbird into a backup folder to start with a new clean profile. I started the English precompiled version I've extracted before. The UI is as expected in English. I now went to 'Tools - Add-on' and installed the de.xpi file and restarted Thunderbird to see Thunderbird with an UI in German.


Actual results:

After the restart Thunderbird is still visible with the UI in English instead of German. So according to http://kb.mozillazine.org/Change_Default_Mozilla_Language I tried the suggested steps from there but no matter what I've tried, I'm not getting a German UI.


Expected results:

In previous Thunderbird beta versions there was the option 'general.useragent.locale' existing and I just need simple to modify this setting to get a German UI working. Now I need to create this entry from scratch. I don't know if this is related to the problem I try to report here.
In the Add-on menu the German language pack is visible in the submenu for the Languages.

I also tried to use the precompiled version of Thunderbird 59.0b1 in German, and yes this is working directly with a German UI as expected.

I have no such issues if I do the same steps with files for 58.0b3.

So why I'm reportig this issue?
As I also package Thunderbird for Debian I got the same problems with my packages and thought firstly the problem is inside my packaging. So I use the Mozilla package to verify my packaging work. But I got now the same issue with the upstream packages, this let me assume there may be something broken in the upstream source somehow.
Component: Message Reader UI → General
We changed the way the preferences work, and with that their name.

https://support.mozilla.org/en-US/kb/use-firefox-interface-other-languages-language-pack has the right pref, intl.locale.requested, and how to set the value to create different behaviors. In particular interest to you might be that setting it to an empty string reproduces the behavior that used to be matchOS.
Sorry, I don't get a German UI if I follow these steps from that link.

If I set 'intl.locale.requested' to 'de' then I get a UI in German, bot not if I set this to an empty string together with intl.locale.matchOS in any way.

This means there is no way to get this configured automatically by reading the locale from the system? That would be a step backwards.

In earlier versions we could control some settings by adding *.js files into /usr/lib/thunderbird/defaults/pref with the settings we need to control or for system administrators by linking the folder /etc/thunderbird/pref to /usr/lib/thunderbird/defaults/syspref so admins can control settings that may need some local tuning. This seems also not to work any more. I don't see an effect of modifying preference settings this way. Where is Firefox or Thunderbird looking now for pref settings?

I haven't found a place which is describing how to control such settings now in a reliable way.
The defaults/pref mechanism has been discontinued by Mozilla core, unless add-ons have prefs in their defaults/prefs folder.

Can't you user prefs in user.js?
(In reply to Jorg K (GMT+1) from comment #3)
> The defaults/pref mechanism has been discontinued by Mozilla core, unless
> add-ons have prefs in their defaults/prefs folder.
> 
> Can't you user prefs in user.js?

And Firefox doesn't have the same issue for you?
Flags: needinfo?(c.schoenert)
Hello Wayne, hello Jörg,

the Firefox 59 package in Debian works as expected with the German language package.

Well, this bug report was about what I figured out that something must have been changed inside the relation ship of Thunderbird and l10n packages and how the new setup needs to be.

I tried to understand what Mike has packaged and why he did it this way. I did not have fully understand the relation of the extensions folders to the defaults folder. This is the layout of FF 59 with an installed l10n-de package.

> root@x260:/usr/lib/firefox# tree 
> .
> ├── application.ini
> ├── browser
> │   ├── blocklist.xml
> │   ├── chrome -> ../../../share/firefox/browser/chrome
> │   ├── chrome.manifest
> │   ├── crashreporter-override.ini
> │   ├── defaults -> ../../../share/firefox/browser/defaults # see further down for content
> │   ├── extensions
> │   │   ├── {972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
> │   │   └── langpack-de@firefox.mozilla.org.xpi
> │   ├── features
> │   │   ├── activity-stream@mozilla.org.xpi
> │   │   ├── aushelper@mozilla.org.xpi
> │   │   ├── firefox@getpocket.com.xpi
> │   │   ├── followonsearch@mozilla.com.xpi
> │   │   ├── formautofill@mozilla.org.xpi
> │   │   ├── onboarding@mozilla.org.xpi
> │   │   ├── screenshots@mozilla.org.xpi
> │   │   ├── shield-recipe-client@mozilla.org.xpi
> │   │   └── webcompat@mozilla.org.xpi
> │   ├── icons -> ../../../share/firefox/browser/icons
> │   └── omni.ja
> ├── chrome.manifest
> ├── crashreporter
> ├── crashreporter.ini
> ├── defaults
> │   └── pref
> │       └── channel-prefs.js
> ├── dependentlibs.list
> ├── dictionaries -> ../../share/hunspell
> ├── distribution -> ../../share/firefox/distribution
> ├── firefox
> ├── firefox-bin -> firefox
> ├── fonts
> │   └── EmojiOneMozilla.ttf
> ├── gmp-clearkey
> │   └── 0.1
> │       ├── libclearkey.so
> │       └── manifest.json
> ├── gtk2
> │   └── libmozgtk.so
> ├── icudt60l.dat
> ├── liblgpllibs.so
> ├── libmozavcodec.so
> ├── libmozavutil.so
> ├── libmozgtk.so
> ├── libmozsandbox.so
> ├── libxul.so
> ├── minidump-analyzer
> ├── omni.ja
> ├── pingsender
> ├── platform.ini
> ├── plugin-container
> └── Throbber-small.gif
> 
> root@x260:/usr/lib/firefox# tree browser/defaults
> browser/defaults
> ├── preferences
> │   ├── debugger.js
> │   ├── devtools.js
> │   ├── devtools-startup-prefs.js
> │   ├── firefox-branding.js
> │   ├── firefox.js
> │   ├── vendor.js
> │   └── webide-prefs.js
> └── syspref -> /etc/firefox

And this is how the TB package looks right now.

> root@x260:/usr/lib/thunderbird# tree 
> .
> ├── application.ini
> ├── blocklist.xml
> ├── chrome -> ../../share/thunderbird/chrome
> ├── crashreporter.ini
> ├── defaults -> ../../share/thunderbird/defaults
> ├── dependentlibs.list
> ├── dictionaries -> ../../share/hunspell
> ├── extensions
> │   └── langpack-de@firefox.mozilla.org.xpi
> ├── fonts
> │   └── EmojiOneMozilla.ttf
> ├── gtk2
> │   └── libmozgtk.so
> ├── icudt60l.dat
> ├── isp -> ../../share/thunderbird/isp
> ├── ...
> ├── thunderbird -> thunderbird-bin
> ├── thunderbird-bin
> └── thunderbird-wrapper-helper.sh
> 
> root@x260:/usr/lib/thunderbird# tree defaults
> defaults
> ├── messenger
> │   └── mailViews.dat
> ├── pref
> │   ├── channel-prefs.js
> │   └── vendor.js
> └── syspref -> /etc/thunderbird/pref

Thunderbird is detecting that the German l10n package is available (but it's not working), if I try to adopt the FF way and place the l10n package under /u/l/thunderbird/browser/extensions no l0n package is detected any longer.

If I take a look at the German Thunderbird package http://ftp.mozilla.org/pub/thunderbird/releases/60.0b1/linux-x86_64/de/thunderbird-60.0b1.tar.bz2 there is no language pack in the extensions/ folder at all visible.

Take I now the en_US version and install the de.xpi l10n package Thunderbird isn't using a German localization. That looks for me like a bug, the user needs to do the trick with 'intl.locale.requested' manually to get German UI.

So currently I've no idea were I can look else. I'm able to build now a version 60.0~b1 as deb package and can install and use this, but I'm failing to get the l10n packages working.
And I haven't found a wiki page or so that is describing what to do now.
Flags: needinfo?(c.schoenert)
One thing (I've forgotten in my previous answer) that seems not logical to me, Lightning *is* using the German l10n strings!
(In reply to Carsten Schoenert from comment #6)
> One thing (I've forgotten in my previous answer) that seems not logical to
> me, Lightning *is* using the German l10n strings!

Forget this, this was happen due missed clean up my testing profile.
I did a lot of testing and probing yesterday with various constellations for placing the lanpack *.xpi files but didn't find a working solution.

Now I came along https://bugzilla.mozilla.org/show_bug.cgi?id=1396172 and concluded that due this report the old behavior of the language@firefox.mozilla.org.xpi can't work for now due not included but needed functionality.

Unfortunately the wiki side about Add On guide also didn't helped me to get a clue how this can be made working.

https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_57

So I conclude for now the l10n lang packages can not work, if someone is gonna proof me wrong I'm happy.
> So I conclude for now the l10n lang packages can not work, if someone is gonna proof me wrong I'm happy.

Surely that can't be true.  lang packs work in firefox?

Are we missing something in Thunderbird?
Blocks: tb60found
Flags: needinfo?(l10n)
Well, I did spent really a lot of time on this due lack of documentation. In the between times I got a functional constellation of working *.xpi files for the various l10n translation for Thunderbird 60.0bx in Debian with the big exception the UI will not start with the desired l10n support without *manually* adding the additional entries into the local config as written by Axel Hecht [:Pike] in comment #1.

I can only speak for FF59 where Mike did this get working automatically, if a user installs firefox-l10n-es and the locale of the user is set to es_ES.UTF-8 FF59 starts with an a Spanish UI. Until now there is no FF60 in Debian, I don't now if this is still true for the next FF version in Debian.

I repeat myself here, but the lack of automatically detecting the running locale on a Linux system is a big step backwards for the usability of Thunderbird. And administrators on Windows will have the same problem with desktop there various people with different preferred locale support need to work with.
On Windows I've installed the German langauge pack matching the beta I'm using from:
http://ftp.mozilla.org/pub/thunderbird/releases/60.0b6/win32/xpi/

I still need to set intl.locale.requested to get the German UI.

Axel, Zibi, how is that meant to work? The user shouldn't have to set a (hidden) preference to make the language pack jump into action.
Flags: needinfo?(gandalf)
> Axel, Zibi, how is that meant to work? The user shouldn't have to set a (hidden) preference to make the language pack jump into action.

Yes they should. Langpack adds to available locales, but doesn't impact your requested locales.

In other words, you start with:

available: ["ab-CD"]
requested: ["ab-CD"]

then you install a langpack "ef-GH" and that gives you:

available: ["ab-CD", "ef-GH"]
requested: ["ab-CD"]

Now you need to change your requested to match the new langpack.

I can tell you that for example in bug 1425941 the way we will do this is that when the user selects a new locale we will (using pseudocode):

```
function onNewLocaleSelected(newLocale) {
  Services.locale.setRequestedLocales([newLocale, oldLocale]);
  AddonsManager.installNewLangpack(newLocale).then((resolve) => {
    console.log("New locale installed!");
  }).catch(() => {
    Services.locale.setRequestedLocales([oldLocale]);
  });
}
```

This means that when the user selects a new locale, we recognize it by settings his requested locales, and then trigger langpack installation.
If installation fails, we'll revert to their old locale selection.
Flags: needinfo?(gandalf)
OK, according to Zibi's comment #14 it works as designed. Having a choice exposed in the UI is bug 1425941 for FF. We can port it once it's done. Until then, you need to set the preference "intl.locale.requested".

I'd guess that it's a minority of users who don't install a localised version, but instead install a language pack.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Depends on: 1425941
Ever confirmed: true
Summary: installing a language pack has no impact in 59.0b1 → Port bug 1425941: introduce UI to let the user choose which available language pack should be used. Was: installing a language pack has no impact in 59.0b1
Flags: needinfo?(l10n)
This was implemented in bug 1481852. Too late for TB 60 though.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.