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
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
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"?
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.
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>
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>
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 =)
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.
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.
Created attachment 44632 [details, diff] firefox-linguas.patch This is the right attachment. (Sorry)
I have alias firefox="firefox -UILocale sv_SE" in my .bashrc, works great.
Created attachment 45154 [details, diff] firefox-linguas.patch Changed: cosmetics on SRC_URI settings.. No comments on this yet? Any chance for inclusion?
*** Bug 89697 has been marked as a duplicate of this bug. ***
So should the non-binary version, www-client/mozilla-firefox.
This is clearly about -bin. Localized source built firefox is bug 70820.
Created attachment 66996 [details, diff] Patch for mozilla-firefox-1.0.6-r6 Please add it to Portage!!!!!!!!!!!!
(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?
*** Bug 107896 has been marked as a duplicate of this bug. ***
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.
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.
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.
Hi, I tested the ebuild and for german (de) language, it works perfectly. Regards Christian
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.
Fixed in tree. Sorry for the delay