Il giorno sab, 21/03/2009 alle 16.20 +0200, kristian kankainen ha scritto: > I agree! > and maybe also make a script that automates the process a bit. > for example, rips every language's .xpi files from firefox, extracts > the portions of it that is translateable, and hosts the files in > http://ftp.gnu.org/gnu/gnuzilla/ XXXXX. > the automation cannot contain a simple replace_all "firefox" wiith > "IceCat" and "Mozilla" with "Gnuzilla" because of various language > structures, > but this way it is very easy for anyone with even the slightest idea > about the language to translate the names correctly. > and this way the "translator" doesn't need to install all things > needed for unpacking the .xpi file and extracting the right files et > cetera et cetera. > > i myself can't do this. too bad.
Here are the steps I use to "translate" the Firefox langpack .xpi file provided by Mozilla into the IceCat langpack .xpi file (it is for Italian... for other languages 'it' shoud be the replaced with the corresponding lang code). Note that this is just a way to "rebrand" an existing Firefox langpack .xpi file into the IceCat langpack .xpi file... 1) find and download (from mozilla addons page or any other place) the firefox langpack file for the language you want to translate example: 'it.xpi' for Italian (I have downloaded it from: http://www.mozillaitalia.it/home/download/#firefox) 2) unpack (using FileRoller) this file into a folder example: '~/it.xpi_FILES' 3) the file containing the translation is a .jar file located in the 'chrome' subfolder of the unpacked .xpi langpack file example: '~/it.xpi_FILES/chrome/it.jar' 4) the .jar file is packed so it needs to be extracted (before be edited) using the kar command provided by a Java Development Kit to install the free openjdk-6-jdk: $ sudo apt-get install openjdk-6-jdk (references: - jar format: http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html - jar command: http://java.sun.com/javase/6/docs/technotes/tools/solaris/jar.html) 5) extract the .jar file, using the 'jar' command example: $ mv ~/it.xpi_FILES/chrome/it.jar ~/tmpjar $ cd ~/tmpjar $ jar xf it.jar (it will extract 'it.jar' in ~/tmpjar/locale/') 6) edit files (see "EDITING" above) 7) repack the folder into a single .jar file using the 'jar' command example: $ jar uf it.jar ./locale 8) substitute (using FileRoller) the existing .jar file in the "original" .xpi file with the "new" rebranded .jar file EDITING: The editing (using a text editor, such gedit or scite) actions to rebrand the existing Firefox langpack .xpi file into the IceCat langpack .xpi file shoud be (in my opinion) those summarized here: File: ../locale/branding/brand.dtd ---------------------------------- <!ENTITY brandShortName "GNU IceCat"> <!ENTITY brandFullName "GNUzilla GNU IceCat"> <!ENTITY vendorShortName "GNUzilla"> File: ../locale/branding/brand.properties ----------------------------------------- brandShortName = GNU IceCat brandFullName = GNUzilla GNU IceCat vendorShortName = GNUzilla homePageSingleStartMain = Pagina iniziale di GNU IceCat ... File: ../locale/browser/appstrings.properties --------------------------------------------- For this file, find and replace in this way: Firefox ==> GNU IceCat Mozilla ==> GNUzilla File: ../locale/it/global-region/region.dtd ------------------------------------------- <!ENTITY vendorURL "http://www.gnu.org/software/gnuzilla/"> File: ../locale/it/global-region/region.properties -------------------------------------------------- ... more_plugins_label = http://gnuzilla.gnu.org/ more_plugins_url = http://gnuzilla.gnu.org/plugins/ ... Nothnig to do with all the other files. Despite what should appear, the whole process is quite easy. So I think it does not need (for me) to be automated: the effort to automate it might be a lot more heavy (to me) than the "manual" process itself... but... if someone scripting-skilled guy whises to do it... you are welcome! ;-) bye alexus -- Support free software! Join FSF: http://www.fsf.org/jf?referrer=7535 You will receive a bootable USB membership card with gNewSense Live! -- http://gnuzilla.gnu.org
