Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 69654 - mozilla-firefox-bin should use LINGUAS
Summary: mozilla-firefox-bin should use LINGUAS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 89697 107896 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-31 12:01 UTC by Gerry
Modified: 2006-01-08 08:34 UTC (History)
10 users (show)

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


Attachments
mozilla-linguas.patch (mozilla-linguas.patch,1.15 KB, patch)
2004-11-24 05:45 UTC, Tobias Sager
Details | Diff
firefox-linguas.patch (firefox-linguas.patch,1.99 KB, patch)
2004-11-24 05:46 UTC, Tobias Sager
Details | Diff
firefox-linguas.patch (firefox-linguas.patch,1.90 KB, patch)
2004-12-02 08:56 UTC, Tobias Sager
Details | Diff
Patch for mozilla-firefox-1.0.6-r6 (mozilla-firefox-ebuild.patch,2.50 KB, patch)
2005-08-27 11:16 UTC, ^j^
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerry 2004-10-31 12:01:33 UTC
The mozilla-firefox-bin ebuild doesn't take advantage of the LINGUAS variable.  It would be nice if it did that (similar to how the kde-i18n ebuild does it), so that I would get the norwegian-bokm
Comment 1 Gerry 2004-10-31 12:01:33 UTC
The mozilla-firefox-bin ebuild doesn't take advantage of the LINGUAS variable.  It would be nice if it did that (similar to how the kde-i18n ebuild does it), so that I would get the norwegian-bokmål version of firefox installed if my LINGUAS variable contains "nb", etc.

Reproducible: Always
Steps to Reproduce:
1. emerge mozilla-firefox-bin

Actual Results:  
US-english version installed

Expected Results:  
Install the localized version
Comment 2 Tomasz Fortuna 2004-11-11 05:14:30 UTC
mozilla-firefox doesn't either support any languages other than english. It would be really nice if this important ebuild take in account existance of LINGUAS variable. Especially when this new, fresh and shiny firefox 1.0 was published. Would it not be possible to add this functionality before it is moved to x86 "tree"?
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2004-11-18 12:20:06 UTC
I'd like to make this available, but haven't the time at the moment to investigate it fully.  Here is what I have seen so far:

LINGUAS can have multiple settings, so it seems appropriate for this to result in the installation of multiple language packs instead of just a localized build.  In other words, http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/en-US/firefox-${PV}.tar.gz *plus* one or more of the applicable packages from http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/xpi/ to add language capabilities.  I'd like to keep the en-US tar.gz as the base since that makes for much easier digests and IMHO easier bug-tracking and resolution.

The difficulty at the moment is how to install xpi packages without firing up the browser.  An xpi, as I understand it, is a zip file with two items (usually), install.js and a jar file.  The javascript helps to get the jar file installed correctly.  However this installation process isn't feasible from an ebuild, so I think we'll need to come up with a different way to install the language packs.

I'd appreciate ideas, code snippet, fully developed and tested ebuilds (please attach patches, not full ebuilds), etc.
Comment 4 Tobias Sager 2004-11-18 14:24:57 UTC
I just talked to some dev's in #l10n. There is a command-line switch for silently installing extensions:

 firefox -install-global-extension <xpi_file>


I would propose sth like this (did not check if this works!):
<snip>
--- /home/tsa/temp/mozilla-firefox-bin-1.0.ebuild.org   2004-11-18 22:56:43.650957000 +0100
+++ mozilla-firefox-bin-1.0.ebuild      2004-11-18 23:23:32.880957000 +0100
@@ -7,7 +7,9 @@
 IUSE="gnome"
 
 DESCRIPTION="The Mozilla Firefox Web Browser"
-SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/en-US/firefox-${PV}.tar.gz"
+SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/en-US/firefox-${PV}.tar.gz
+       linguas_fr? ( ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/xpi/fr-FR.xpi )
+       linguas_de? ( ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/xpi/de-DE.xpi )"
 HOMEPAGE="http://www.mozilla.org/projects/firefox"
 RESTRICT="nostrip"
 
@@ -77,6 +79,13 @@
        export MOZILLA_FIVE_HOME=${ROOT}/opt/firefox
 
        update_mozilla_launcher_symlinks
+
+       # treat LINGUAS, silently install all requested language packs
+       for xpi in ${A}; do
+               if [ `grep '.xpi' ${xpi}` ]; then
+                       ${ROOT}/opt/firefox/firefox -install-global-extension ${xpi}
+               fi
+       done
 }
 
 pkg_postrm() {
</snip>
Comment 5 Tobias Sager 2004-11-18 14:32:11 UTC
That should work better (still not tested the working installation of the xpis!):
<snip>
--- /home/tsa/temp/mozilla-firefox-bin-1.0.ebuild.org   2004-11-18 22:56:43.650957000 +0100
+++ mozilla-firefox-bin-1.0.ebuild      2004-11-18 23:31:16.950957000 +0100
@@ -7,7 +7,9 @@
 IUSE="gnome"
 
 DESCRIPTION="The Mozilla Firefox Web Browser"
-SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/en-US/firefox-${PV}.tar.gz"
+SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/en-US/firefox-${PV}.tar.gz
+       linguas_fr? ( ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/xpi/fr-FR.xpi )
+       linguas_de? ( ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/xpi/de-DE.xpi )"
 HOMEPAGE="http://www.mozilla.org/projects/firefox"
 RESTRICT="nostrip"
 
@@ -77,6 +79,13 @@
        export MOZILLA_FIVE_HOME=${ROOT}/opt/firefox
 
        update_mozilla_launcher_symlinks
+
+       # treat LINGUAS, silently install all requested language packs
+       for xpi in ${A}; do 
+               if [ -z "`echo ${xpi} | sed 's/.*\.xpi$//'`" ]; then 
+                       ${ROOT}/opt/firefox/firefox -install-global-extension ${xpi}
+               fi
+       done
 }
 
 pkg_postrm() {
</snip>
Comment 6 Gerry 2004-11-18 14:45:07 UTC
There's one major problem with that patch, and that is that it doesn't include support for other languages than french and german.  Please add the others as well.  Thank you =)
Comment 7 Tobias Sager 2004-11-19 00:20:24 UTC
It's actually just a "proof-of-concept patch".
As soon as I had time to test the installation (might take two days) and
get a OK from the mozilla-team, I will add all contributed languages.
Comment 8 Tobias Sager 2004-11-24 05:45:39 UTC
Created attachment 44631 [details, diff]
mozilla-linguas.patch

[That was a bitch!]

I had to include the language switcher from here:
http://benjamin.smedbergs.us/switch-locales/
Make sure you cache it on the gentoo mirrors..

Included languages are:
ca-AD cs-CZ da-DK de-DE el-GR en-US es-AR fi-FI fr-FR he-IL hu-HU it-IT
ja-JP ko-KR nb-NO pl-PL pt-BR ro-RO ru-RU sl-SI sv-SE zh-TW


If anybody got a solution for
a) automatic language selection on startup (using "firefox -UILocale de-DE
-contentLocale DE" did not work for me
as I always had english again after restart w/o arguments)
b) the SRC_URI parsing mess (switch-locale only has to be installed if any
linguas_* is true..)
I would apprechiate it.

Otherwise: works for me.
Comment 9 Tobias Sager 2004-11-24 05:46:42 UTC
Created attachment 44632 [details, diff]
firefox-linguas.patch

This is the right attachment. (Sorry)
Comment 10 Ernst Sjöstrand 2004-11-25 03:00:58 UTC
I have alias firefox="firefox -UILocale sv_SE"
in my .bashrc, works great.
Comment 11 Tobias Sager 2004-12-02 08:56:51 UTC
Created attachment 45154 [details, diff]
firefox-linguas.patch

Changed: cosmetics on SRC_URI settings..


No comments on this yet? Any chance for inclusion?
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2005-04-19 12:23:00 UTC
*** Bug 89697 has been marked as a duplicate of this bug. ***
Comment 13 Erik Östlund 2005-04-20 10:54:54 UTC
So should the non-binary version, www-client/mozilla-firefox.
Comment 14 Tobias Sager 2005-04-26 07:56:25 UTC
This is clearly about -bin.
Localized source built firefox is bug 70820.
Comment 15 ^j^ 2005-08-27 11:16:10 UTC
Created attachment 66996 [details, diff]
Patch for mozilla-firefox-1.0.6-r6

Please add it to Portage!!!!!!!!!!!!
Comment 16 Tobias Sager 2005-08-28 04:58:44 UTC
(In reply to comment #14)
> Created an attachment (id=66996) [edit]
> Patch for mozilla-firefox-1.0.6-r6
> 
> Please add it to Portage!!!!!!!!!!!!

You added a patch for non-binary mozilla-firefox ebuild.
This bug is about the binary firefox. Goto bug 70820 for source-built firefox.


Mozilla Team, will this eventually get fixed or is this a wontfix?
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2005-12-22 18:00:31 UTC
*** Bug 107896 has been marked as a duplicate of this bug. ***
Comment 18 Jory A. Pratt 2005-12-25 06:52:44 UTC
With the way upstream provides it binary packages of firefox it is not possible to include at this time. All packages upstream are named the same making it impossible to make a proper digest, and we should not have to host each binary package on our server. If upstream changes this I will be able to add the LINGUAS support that you all are waiting for.
Comment 19 Jory A. Pratt 2005-12-25 12:07:11 UTC
I am reopening will be closing as fixed tomorrow after adding new ebuilds to the tree. Support is only for 1.5 and will not be backported to 1.0.x branch.
Comment 20 Jory A. Pratt 2005-12-25 20:29:39 UTC
err should have linked you all to the files for testing.

http://dev.gentoo.org/~anarchy/ebuilds/mozilla-firefox-1.5-r5.ebuild
http://dev.gentoo.org/~anarchy/ebuilds/mozilla-firefox-bin-1.5-r2.ebuild
http://dev.gentoo.org/~anarchy/eclass/mozextension.eclass

There they are test them report success of failure.
Comment 21 Christian Roessner 2005-12-28 01:57:05 UTC
Hi,

I tested the ebuild and for german (de) language, it works perfectly.

Regards

Christian
Comment 22 Chr. Schaefer 2005-12-30 12:22:34 UTC
Thank you for the ebuilds. I tried mozilla-firefox-bin-1.5-r2.ebuild with LINGUAS="de" and firefox works fine, menu, texts and help are german.

But I lost my KDE menu entry after mergin 1.5-r2. With the versions in portage up to 1.5-r1 it was created automatically.
Comment 23 Jory A. Pratt 2006-01-08 08:34:54 UTC
Fixed in tree. Sorry for the delay