Last Comment Bug 377881 - Add language switching to Extension Manager's language panel (parallel to theme switching)
: Add language switching to Extension Manager's language panel (parallel to the...
Status: NEW
:
Product: Toolkit
Classification: Components
Component: Add-ons Manager (show other bugs)
: Trunk
: All All
: -- normal with 18 votes (vote)
: Future
Assigned To: Nobody; OK to take it and work on it
:
: Andy McKay [:andym]
Mentors:
: 435240 446538 475504 559516 1217333 (view as bug list)
Depends on: 595847
Blocks: 383582 392461 wanted4seamonkey 485861
  Show dependency treegraph
 
Reported: 2007-04-18 07:09 PDT by Robert Kaiser
Modified: 2015-10-22 10:58 PDT (History)
43 users (show)
mbeltzner: blocking1.9-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Mock-up of possible UI (82.64 KB, image/png)
2012-09-06 03:35 PDT, arky [:arky]
blair: ui‑review-
blair: feedback-
l10n: feedback+
Details
Related implementation by Simple Locale Switcher extension, version 0.5.2 (47.64 KB, image/png)
2013-11-08 18:41 PST, Carlos [nohamelin]
no flags Details

Description Robert Kaiser 2007-04-18 07:09:56 PDT
Toolkit's extension manager has some preliminary support for a language panel, but the actual implementation is missing.

Such a panel should basically parallel the themes panel, including the switching capability and even the handling of a default package. The default language for the build should probably be handled (and installed) like the default theme, so that it's listed in that EM panel, can be switched to, but cannot be uninstalled (and probably keeps its files in chrome/ instead of extensions/ dir, just like that hack we have in place for the default theme).

Eventually, we could even hide that tab/panel from EM unless at least one additional language pack to the default is installed. I'm not completely sure on this one though.

I'm sure many localizers would be happy about such a panel, and SeaMonkey would also love to have it in its toolkit-based future for replacing the the old language switching pref panel of the xpfe days.
Comment 1 Henrik Skupin (:whimboo) 2007-04-18 07:19:28 PDT
A different issue but a similar place for handling locales is the existing bug for  locales of extensions: bug 285848.
Comment 2 Robert Strong [:rstrong] (use needinfo to contact me) 2007-04-18 10:05:30 PDT
Robert, have you installed a locale and Firefox and did not see the Languages view? It worked as you suggested last time I tested it.
Comment 3 Henrik Skupin (:whimboo) 2007-04-18 11:46:21 PDT
Oh, I haven't seen that the language panel is visible when you install another locale. I can see it in Firefox and Thunderbird.

But there is one major drawback. And this is a part what Robert Kaiser IMO wants to see. You are not able to switch the languages. Even there is no entry for the default locale. What I also expect is a panel with the same functionality like the panel for themes. Do we need the disable button? Is this button also visible for  installed themes?

I think we should change the summary of that bug to reflect the remaining things which are to do.
Comment 4 Robert Kaiser 2007-04-18 12:17:17 PDT
Oh, well, I'm no Firefox/Thunderbird user, so I couldn't test. I mostly care about this from the view of SeaMonkey as a future user of EM.

Let's morph this into enabling language switching and listing the default language then. Sorry.
Comment 5 Robert Strong [:rstrong] (use needinfo to contact me) 2007-04-18 13:51:48 PDT
The direction that Firefox and Thunderbird took for setting the appropriate language is to detect the language of the OS and use that language if available. Not sure that it is appropriate to do this via the EM vs. some other way... my initial impression is this should be separate and handled by an extension for those that want it but I haven't convinced myself of this.
Comment 6 Robert Kaiser 2007-04-18 14:14:37 PDT
If someone has multiple languages installed, he probably wants to be able to switch between them, or have multiple profiles with different languages (might be different OS users as well).
Not all OSes (esp. Windows comes to my mind) support different OS users with different general UI languages, so the OS-bound detection will always pick the same language for all users. In that case, it looks like it doesn't make sense to have multiple language packs installed anyways.
Also, if the user has a language installed that the OS doesn't support, it will never get activated.
Needing to install yet another extension to be able to use that language pack at all sounds a bit strange to me, esp. as the mechanism is the same as for themes, and we allow switching from EM there.

Maybe it might be a good idea to have a checkbox in that language panel that says "Pick language by OS settings" (or something easier to understand) as IIRC this is a pref anyways behind the scenes, and enable else deactivated "use this language" buttons on the language pack entries when this checkbox is unchecked.

I think this would be an acceptable way to handle multi-language installations. Single-language installations still have the whole panel hidden, so no unneeded complexity where it takes no effect anyways.
Comment 7 Robert Strong [:rstrong] (use needinfo to contact me) 2007-04-18 14:44:00 PDT
Agreed but the best way to accomplish this isn't clear to me especially since I highly doubt the majority of users have multiple locales installed. This isn't to say that an app couldn't provide the functionality outside of the EM since the EM doesn't have anything to do with this currently besides managing the install / uninstall, disable / enable, update, etc. currently.
Comment 8 Axel Hecht [:Pike] 2007-04-18 15:12:26 PDT
Note, the language pack panel is not only used for language packs for the application, but for extension language packs, too.

And we actually don't have any means to set the language per ... hrm ... right ... what? EM would try to set them per add-on, chrome registry would pick by packagename, as that doesn't have any chance to do that, AFAICT.

There are likely tweaks we can do to do "the right thing" in most cases, but this should depend on some "what is the selected language" architecture in the chrome registry. Likely not going to make Firefox 3, AFAICT. CCing Benjamin to get that confirmed.
Comment 9 Robert Kaiser 2007-04-18 15:17:27 PDT
What do we do for extension theme packs? Isn't that the same topic as extension language packs?
Comment 10 Robert Kaiser 2007-09-11 12:29:51 PDT
(In reply to comment #7)
> Agreed but the best way to accomplish this isn't clear to me especially since I
> highly doubt the majority of users have multiple locales installed.

True, and if they haven't, the whole language pane is hidden for them, which is a good idea.

> This isn't
> to say that an app couldn't provide the functionality outside of the EM since
> the EM doesn't have anything to do with this currently besides managing the
> install / uninstall, disable / enable, update, etc. currently.

True, it doesn't manage anything about language pack but everything else there is to manage - except switching which one to actually use. Disable/enable is about as useless on a language pack as on a theme as long as you don't use it anyways.
Comment 11 Mike Beltzner [:beltzner, not reading bugmail] 2008-02-06 12:18:30 PST
This does not block the final release of Firefox 3.
Comment 12 Henrik Skupin (:whimboo) 2008-08-31 10:20:13 PDT
*** Bug 435240 has been marked as a duplicate of this bug. ***
Comment 13 Michael Morgan [:morgamic] 2008-10-29 23:05:19 PDT
*** Bug 446538 has been marked as a duplicate of this bug. ***
Comment 14 Dave Townsend [:mossop] 2009-01-27 04:02:48 PST
*** Bug 475504 has been marked as a duplicate of this bug. ***
Comment 15 Dave Townsend [:mossop] 2010-04-15 15:43:50 PDT
*** Bug 559516 has been marked as a duplicate of this bug. ***
Comment 16 Tony Mechelynck [:tonymec] 2011-08-08 13:20:08 PDT
(In reply to Henrik Skupin (:whimboo) from comment #3)
> Oh, I haven't seen that the language panel is visible when you install
> another locale. I can see it in Firefox and Thunderbird.

Mozilla/5.0 (X11; Linux x86_64; rv:8.0a1) Gecko/20110808 Firefox/8.0a1 SeaMonkey/2.5a1 ID:20110808003106

In about:addons, I see a Language tab with all the langpacks which I installed as add-ons. Only the one which came compiled-in (en-US, in my case) is not visible.

OTOH, I see a rolldown at Edit → Preferences → Appearance → User Interface Language, with all installed UI languages _including_ en-US. Of course, as long as langpacks aren't restartless (bug 677092), a restart is required, which makes it redundant with the -UIlocale command-line switch (though IMHO still useful: I am *not* advocating the removal of either one of these two ways to select the UI locale).
Comment 17 arky [:arky] 2012-09-06 03:35:44 PDT
Created attachment 658837 [details]
Mock-up of possible UI

What do you reckon ? If you think this is good, do you have some implementation tips.
Comment 18 Blair McBride [:Unfocused] (UNAVAILABLE) 2012-09-09 23:29:40 PDT
Comment on attachment 658837 [details]
Mock-up of possible UI

Gonna ping some additional people for feedback here, since I personally don't use langpacks (I'm monolingual).

In an ideal world, I'd have it so you could only enable one langpack (like how themes work), and that's what would be used. But I know it isn't as simple as that :( The requirements for langpacks have always seemed needless complex to me.... but as I said, I don't use them.
Comment 19 Blair McBride [:Unfocused] (UNAVAILABLE) 2012-09-09 23:32:19 PDT
Comment on attachment 658837 [details]
Mock-up of possible UI

Er, sorry, wrong email...
Comment 20 arky [:arky] 2012-09-11 05:02:18 PDT
 
> Gonna ping some additional people for feedback here, since I personally
> don't use langpacks (I'm monolingual).
>
We can provide feedback on that.  

> In an ideal world, I'd have it so you could only enable one langpack (like
> how themes work), and that's what would be used.

That would be a good start.
Comment 21 Axel Hecht [:Pike] 2012-09-13 06:14:32 PDT
Comment on attachment 658837 [details]
Mock-up of possible UI

The difference between langpacks and themes is mostly that we don't expose a "default language pack", like we do for the themes.

The way that I would implement this dropdown is to show all languages that you get from toolkitchromereg.getLocalesForPackage('global'), plus a "Reset". The explicit choices would disable matchOS and set general.useragent.locale to an explicit value, reset would reset both.

This essentially boils down to only one active locale, and works around potential weird setups with language packs for addons. I also think this should work for the multi-locale setups that are used in linux distros.
Comment 22 Axel Hecht [:Pike] 2012-09-13 06:15:56 PDT
PS: the search box can be dismissed, that's in the mockup, but a change to the search box in the add-ons manager is not part of the intended change here, I chatted about that with Arky in person back in Warsaw.
Comment 23 Zibi Braniecki [:gandalf][:zibi] 2012-09-27 05:35:40 PDT
Can we instead of offering two pieces of UI - one to enable locales, another to select one of them, offer a single UI that allows users to sort locales?

The benefit is not only simplicity but also it builds a proper fallback chain for languages (if a given locale is not available/broken, fallback to the next one on the list).
Sort of what Apple does in Mac OS.
Comment 24 arky [:arky] 2012-09-27 10:26:21 PDT
+1 for gandalf's suggestion.

It is really high-time we had this feature in Firefox. See comments on this blog post: http://playingwithsid.blogspot.com/2012/05/ideas-for-improving-locale-management.html
Comment 25 Brian King [:kinger] 2012-09-28 04:13:52 PDT
Gandalf, can you do a mockup?
Comment 26 Jennifer Morrow [:Boriss] (UX) 2012-10-02 22:02:03 PDT
(In reply to Zbigniew Braniecki [:gandalf] from comment #23)
> Can we instead of offering two pieces of UI - one to enable locales, another
> to select one of them, offer a single UI that allows users to sort locales?
> 
> The benefit is not only simplicity but also it builds a proper fallback
> chain for languages (if a given locale is not available/broken, fallback to
> the next one on the list).
> Sort of what Apple does in Mac OS.

This would be pretty awesome, especially when we incorporate things like translation into Firefox.  But, as the mockup arky posted demonstrates, the most important functionality this would provide is letting users change their default language.  That should be the focus of a new UI which could set priority levels, when to translate, etc.
Comment 27 Blair McBride [:Unfocused] (UNAVAILABLE) 2012-10-02 23:09:19 PDT
Ok, cool. In that case, this is dependent on bug 595847 being fixed - which coincidentally is currently being implemented as part of the work going on in bug 335781.
Comment 28 Guillaume C. [:ge3k0s] 2012-10-06 02:46:17 PDT
This is a very good idea, but it would be UX-wise to put that in the in-content preference.
Comment 29 arky [:arky] 2013-02-28 04:31:14 PST
Any update on this?
Comment 30 Carlos [nohamelin] 2013-11-08 18:41:13 PST
Created attachment 829672 [details]
Related implementation by Simple Locale Switcher extension, version 0.5.2

The menulist shows all languages returned by toolkitchromereg.getLocalesForPackage('global'), *plus* the value of the general.useragent.locale preference, when it corresponds to an unavailable locale.

I worked with many ideas for an "in-content" implementation, as the mock-up made by arky, but I could not get comfortable with the results, so I simply ended linking to this prefwindow that I had. There is many things that I don't like much about it: the top bar in the Languages pane overflows easily in narrow windows, by example, so I probably will resume this plan in the future.
Comment 31 Sebastian Hengst [:aryx][:archaeopteryx] (needinfo on intermittent or backout) 2015-10-22 04:23:39 PDT
*** Bug 1217333 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.