Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 182175 - mozilla-*: please base the default language on the user's selected locale, not on $LINGUAS.
Summary: mozilla-*: please base the default language on the user's selected locale, no...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 198085 212780 249075 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-15 21:18 UTC by Harald van Dijk (RETIRED)
Modified: 2010-09-16 16:40 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mozilla-firefox-linguas.patch (mozilla-firefox-linguas.patch,3.69 KB, patch)
2007-06-15 21:22 UTC, Harald van Dijk (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harald van Dijk (RETIRED) gentoo-dev 2007-06-15 21:18:55 UTC
Please base the default language for mozilla products on the user's selected locale, not on $LINGUAS, to match the behaviour of mostly every other program that supports translations, and to not make a semi-random supported language the default when using LINGUAS="*" (a new feature of portage). This behaviour is available in mozilla products already, it just needs to be enabled by setting the intl.locale.matchOS property to true. I'll attach a diff for a modified firefox ebuild I'm using without problems.
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2007-06-15 21:22:14 UTC
Created attachment 122194 [details, diff]
mozilla-firefox-linguas.patch

As an added bonus, the whole linguas function can be dropped.

(And a side note, the changed LANGS line is because the fy-NL and pt-PT translations contain malformed install.rdf files. This means they don't work and even break other translations.)
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2007-07-21 17:58:22 UTC
Shrug, i've added that to all the ebuilds, and if the user disables that variable, the product will use the locale instead of the selected locale through the config.

Let me explain, if the user has set this in his profile:

user_pref("general.useragent.locale", "cs-CZ");
user_pref("intl.locale.matchOS", false);

But in the default prefs it's set:
pref("intl.locale.matchOS",                 true);

It will ignore the user pref, so i guess it's not funny to have the user forced to change the locale for the app...would be more easy if you could change the language from inside the app(which you already can do, modifiying the config)

Plus: https://bugzilla.mozilla.org/show_bug.cgi?id=331779

So yeah, i guess i'll revert it...
Comment 3 Harald van Dijk (RETIRED) gentoo-dev 2007-07-22 09:33:59 UTC
(In reply to comment #2)
> It will ignore the user pref, so i guess it's not funny to have the user forced
> to change the locale for the app...would be more easy if you could change the
> language from inside the app(which you already can do, modifiying the config)

As a workaround (firefox takes a long time to re-emerge), it is possible to start firefox with the -UILocale option to bypass the config.

I agree the problem you found is a serious one, and that this is better disabled again at least until user prefs are respected. Still, could you do something to make LINGUAS="*" behave more sanely? Perhaps not changing the default language at all would be an idea?
Comment 4 Chris Bainbridge (RETIRED) gentoo-dev 2007-09-03 13:38:58 UTC
It looks as though the locale has to be specified at build time to get everything correct. I posted a patch in bug #189647. I'm not sure if it's even possible to build for more than one locale (there are no multi-locale binary versions of firefox for download), so I agree it might be best to just get rid of $LINGUAS and that whole linguas function and just use the locale.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-11-04 21:50:23 UTC
*** Bug 198085 has been marked as a duplicate of this bug. ***
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2008-03-09 08:03:39 UTC
*** Bug 212780 has been marked as a duplicate of this bug. ***
Comment 7 Harald van Dijk (RETIRED) gentoo-dev 2008-04-18 19:24:21 UTC
Reopening. This is not an upstream bug. The bug is in the ebuild. "Give me all languages" does not mean "change the default language to Afrikaans" (actually, it's now Belarusian here), and it's not upstream that's doing that, it's you. The only upstream bug is that one possible fix doesn't actually work. That shouldn't prevent other fixes.

> Still, could you do
> something to make LINGUAS="*" behave more sanely? Perhaps not changing the
> default language at all would be an idea?
Comment 8 Harald van Dijk (RETIRED) gentoo-dev 2008-05-19 20:27:36 UTC
Although I still believe this is a valid bug, I no longer care about this, as I will no longer be using firefox (or any other mozilla products) now that it requires acceptance of an EULA. If you want to close this, feel free. If you want to keep it open, that's fine too.
Comment 9 Raúl Porcel (RETIRED) gentoo-dev 2008-11-27 18:28:36 UTC
*** Bug 249075 has been marked as a duplicate of this bug. ***
Comment 10 Daniel Tourde 2008-12-27 15:01:54 UTC
Same issue with firefox 3.0.5.
Of course, it is always possible to call firefox using the '-UILocale <locale>' flag to get the right language...
However, I am not so sure that's the correct way to solve that... :(


Daniel
Comment 11 Michele Schiavo 2008-12-27 16:03:45 UTC
i solved with package.use

more /etc/portage/package.use  | grep mozilla-firefox
www-client/mozilla-firefox -linguas_es_ES -linguas_en_GB -linguas_es

i have this in make.conf
 LINGUAS="it it_IT en en_US en_GB es es_ES"
Comment 12 Jory A. Pratt gentoo-dev 2010-09-16 12:56:51 UTC
Harald if your still interested in this please update patch against latest tree and I will review it, if you no longer are interested please close bug wontfix.
Comment 13 Harald van Dijk (RETIRED) gentoo-dev 2010-09-16 16:14:10 UTC
(In reply to comment #12)
> Harald if your still interested in this please update patch against latest tree
> and I will review it, if you no longer are interested please close bug wontfix.

I forgot about this because matchOS is currently already enabled by default; there's nothing more to do here. Thanks for the reminder :)