Compile IceCat with support for your language

Note: This small howto was made using gNewSense. So, in Debian and Ubuntu the procedure will probably be similar, as in other GNU/Linux distributions. I'm assuming that you know which are the dependencies to compile IceCat and have them installed.

I have all my source files in /usr/src, so this will be the "work root".

Open up a terminal, go to /usr/src and run the following commands:

  • sudo cvs -z3 -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
  • sudo cvs -z3 -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/tools/l10n

After that you will have a mozilla folder. Open it (cd mozilla) and execute the following command to download the locales (don't forget to replate pt-PT with the locale you want):
  • sudo make -f client.mk l10n-checkout MOZ_CO_PROJECT=browser MOZ_CO_LOCALES=pt-PT

When the download is done (that also downloads the mozilla source, but that's how it's explained in http://developer.mozilla.org/en/docs/Patching_a_Localization), a l10n directory will be created in /usr/src, containing the locale you specified. So, go back to /usr/src and enter l10n/pt-PT (remember that pt-PT must be replaced by the locale you downloaded). Now, enter the browser folder in l10n/pt-PT and use the following command:
  • sudo mkdir -p branding/unofficial

Now, without leaving that folder, you will need to copy the brand.dtd and brand.properties files and edit them:
  • sudo cp ../../chrome/branding/brand.*

My brand.dtd and brand.properties files look like this.

I also edit some other files, as you can see in this diff file.

After that, go to icecat's source in /usr/src and compile it with your locale:
  • sudo ./configure --enable-ui-locale=pt-PT; sudo make

1 comments:

tch said...

It doesn't seem to work for me on gNewSense 2.1 deltah.

When I execute:
sudo make -f client.mk l10n-checkout MOZ_CO_PROJECT=browser MOZ_CO_LOCALES=pl-PL

The l10n directory is not created...