# moz-l10n-builder

Take a set of Mozilla (Firefox, Thunderbird, SeaMonkey, etc.) localisation and migrate them to the latest Mozilla source, building XPIs and repackaging hte Windows .exe file as needed.

Please also check the page on creating a language pack on the Mozilla wiki, to stay abreast of the latest Mozilla way of doing things.

Note

This page is only applicable to Mozilla products with its source hosted in CVS. This includes Firefox versions before 3.1 and Thunderbird versions before 3.0.

For information about working with the new source trees in Mercurial, see the Mozilla L10n Scripts page.

## Prerequisites

- Translation update component and building XPIs

  - Translate Toolkit

  - Existing Mozilla translations in PO format

  - A checkout of Mozilla sources updated to the correct BRANCH or RELEASE

- Building Windows executables

  - Firefox or Thunderbird en-US .exe file e.g. Firefox 2.0 en-US

  - upx for executable compression

  - Nullsoft installer to package the installer.

  - 7zip for various compression

  - Linux: WINE to run the Nullsoft installer

- Directory structure under the directory you want to run moz-l10n-builder in:

l10n/ | Contains Mozilla l10n files for available/needed language(s)
mozilla/ | The Mozilla source tree
po/ | Contains your PO files (output from moz2po)
potpacks/ | Where POT-archives go

Note these instructions are for building on Linux, they may work on Windows. All software should be available through your distribution. You will need to use Wine to install the Nullsoft installer and may need to sort out some path issues to get it to run correctly.

## Latest Version

moz-l10n-builer is not currently distributed as part of the toolkit. You can get the latest version from Git and you will also need this minor patch to the mozilla source code.

## Usage

    moz-l10n-builder [language-code|ALL]

Where:

language-code | build only the supplied languages, or build ALL if specified or if no option is supplied

Your translations will not be modified.

## Operation

moz-l10n-builder does the following:

- Updates the mozilla/ directory

- Creates POT files

- Migrates your translations to this new POT file

- Converts the migrated POT files to .dtd and .properties files

- Builds XPI and .exe files

- Performs various hacks to cater for the anomalies of file formats

- Outputs a diff of you migrated PO files and your newly generated Mozilla l10n/ files

## Bugs

Currently it is too Translate.org.za specific and not easily configurable without editing. It is also not intelligent enough to work our that you want Firefox vs Thunderbird generation. A lot of this functionality should be in the Mozilla source code itself. We hope over time that this might happen.