Localizing ChatZilla

So, you want to try and localize ChatZilla? Good on you! This page is here to try and give you an idea how to go about things. If you have questions, or just trouble getting things to work at all, feel free to drop by on #chatzilla on moznet and ask.

What this page is

This page aims to give you an idea of the easiest way to build a localization xpi for ChatZilla. It requires some setting up on Windows and Mac OS X platforms, but should be (nearly) painless on a *nix system. Even on Windows and Mac, the effort will be worth it in the end (unless you enjoy manually constructing your jar and xpi files every time something changes).

What this page is not

This page does NOT provide all-out guides to CVS, Bash, or language problems (wording choices etcetera). It also doesn't apply to localizing the SeaMonkey Suite - if you want help with that, the l10n information pages may be of more assistance to you.

Requirements for the method described below.

Step 1: Checkout the source

First things first: make sure you have everything listed in the requirements above, and open a terminal:

Once you have opened a terminal, set the CVSROOT environment variable to the mozilla cvs repository. Commands to do so are listed below:

Now you can checkout the ChatZilla source. Navigate to a folder where you want to store your localization work using the 'cd' command. Then execute the following command:

cvs co mozilla/extensions/irc

This will get you the ChatZilla source. You'll see lots of filenames flashing by, and after a (hopefully short) while it will be done. Now, to actually build ChatZilla, you need some other files as well. These are not part of the source, but they are required to get the build script to work properly. To get those files, use the following command:

cvs co mozilla/config

Now you have all the source code you need, so let's get going!

Step 2: Making a locale directory

To get started on your localization, you'll want to copy the contents of the 'en-US' directory in mozilla/extensions/irc/xul/locale into a new subdirectory there. The new subdirectory should be named after the locale you're writing a localization for. Examples are de-DE for German, or fr-FR for French.

Step 3: Localize all the files in your new directory.

The single chatzilla.properties file and all the .dtd files will need to be localized in order for your localization to be complete. The chatzilla.properties file is probably hardest, because it is so big. To get things right, there are a couple of things you need to watch out for:

Step 4: Prepare installation files for your locale package

To actually make a locale package, you'll have to do some more things. If you look in the mozilla/extensions/irc/xpi/locale-resources/ directory, you'll notice a bunch of install files that you need to copy to a new subdirectory based on your locale. If you were localizing ChatZilla into French, you'd copy the files to the directory

mozilla/extensions/irc/xpi/locale-resources/fr-FR/

After copying these files, you should edit them as described in the comments at the top of the files. Make sure to change the UUID in install.rdf. Also note that you should change this UUID once, but keep it the same afterwards - otherwise updates to your localization won't install properly.
UUID generators may be found in any of the following places:

Step 5: Make a locale package

When you're done localizing, or just want to try if things work, you can build a localized xpi file of ChatZilla by opening a terminal in the mozilla/extensions/irc/xpi directory in the source code, and using the following command:

bash makelocalexpi.sh ab-CD

where 'ab-CD' is of course the locale code for the localization you did, and the name of the directory in which your localization is saved. If all goes well, you should see a bunch of messages appear in your terminal (but no errors), and a chatzilla-<locale>-<version>.xpi file should have been created in the mozilla/extensions/irc/xpi directory.

This xpi file installs only your localization - that means that users will have to have installed the ChatZilla code from the website. It will also mean that this package could, theoretically, also be used by SeaMonkey users to localize their pre-installed ChatZilla.