After all of your hard work localizing we're sure that you not only want to see your work but you want to make sure it's accurate! If you don't have a lot of experience with code, you might even be concerned that you've broken something (oops!). Now we'll walk you through performing some quality assurance testing on your work to make sure you're on the right track.
If you're localizing Mozilla websites, your work will display soon after you've committed it without needing a language pack. Since such is the case, this part of the guide may not be entirely applicable to you. Feel free to skip ahead to the next section by clicking on the Next link at the bottom of the page.
In order to see your work on Firefox (or another Mozilla application), you'll need to have a built language pack to install on your local instance.
Manual & automated builds
With the click of a button, some L10n tools (like Narro and Koala) automatically create language pack builds for you. If you're using one of these tools, feel free to skip ahead to the Seeing your work section. If you're not using one of these tools, let's walk you through building your own language pack manually.
We will be using the following file directories for this example:
your working directory (root)/ mozilla-aurora (en-US source, pulled from http://hg.mozilla.org/releases/mozilla-aurora )/ l10n-central (directory for L10n directories, one per L10n; often referred to as "l10n base")/ your-locale-code (a directory with your L10n files, in this example we'll use x-testing) Example:
Additionally, you will need to copy and translate the
toolkit/defines.inc file directly from en-US before you can build. This is due to a bug in the build logic.
Please either follow the above structure closely or adjust the commands below according to your custom setup.
To copy this file to the appropriate directory, do the following:
- Navigate to your working directory from your command-line terminal (i.e., where you created the folder structure described above).
- Enter the following commands:
mkdir -p l10n-central/x-testing/toolkit/ cp mozilla-aurora/toolkit/locales/en-US/defines.inc l10n-central/x-testing/toolkit/defines.inc
Finally, you will need a file called
.mozconfig to proceed with manual builds. This file contains the necessary build instructions.
To create and configure this file, follow these instructions:
Until the fix for bug 1063880 lands on mozilla-aurora and mozilla-beta when building language packs against those two trees you should:
.mozconfigin step 3
./mach build configafter step 4
- Update the Mozilla source code:
$ cd mozilla-aurora
$ hg pull -u
- Enter the following command to create the
$ nano -w .mozconfig
- Enter the following lines in your
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../firefox-build ac_add_options --disable-compile-environment ac_add_options --with-l10n-base=../l10n-central # path relative to MOZ_OBJDIR ac_add_options --enable-application=[browser or mail]
You will need to specify which application you're localizing in the fourth line (e.g., for Firefox, that's
browser, Thunderbird would be
- Enter the following command to perform the configuration:
$ ./mach configure
- Once your command-line finishes spitting out the config command's output, navigate to the newly created directory:
$ cd ../firefox-build/browser/locales
Now you're ready to build! At this point you can choose between two build options. You can either:
- Create a langpack, which is installed on top of your Mozilla application, or
- Repack the application's binary (aka, a L10n repack), which allows you to install next to your existing Mozilla application installation and use separately.
Visit the links above to learn how to make these testing builds.
Testing your L10n & seeing your work
Now that you have your langpack or L10n repack, let's discuss seeing your work and testing it in the application.
Testing the langpack will put you one step closer to having your localization added to the L10n releases. Follow the steps below to test your localization:
- Install Aurora in your preferred language.
- Install the
.xpilangpack you just created (or exported).
- Set your language using the Quick Locale Switcher or Locale Switcher add-ons by navigating to Tools->Language->Your localization's language code.
- Restart your browser and start testing!
Now you should be able to see all of your work up to this point. Click here for guidelines on how to test your localization.
Don't lose your work!
You're work is SO important! We would really hate to see you lose any of it. After you test your localization, you should send it to a remote repository, which will serve as a backup for your work and will let others follow your progress. We're going to go through the process below.
The official localization teams use repositories at hg.mozilla.org. Before a team becomes official, we like to get the localizers comfortable with the Hg commands that allow for cloning, pulling, committing, and pushing work to an experimental repository. We use a web service called Bit Bucket to start the learning process.
Pushing to your repository
There are a couple of things you should take note of before you push to your repository:
- Make sure that your files have been encoded in Unicode without BOM (byte order mark).
- Remember that here you are pushing an entire directory, not a
.ziparchive file or an
The instructions below will help you learn how to use your Hg repository.
- After your new repository is created by the l10n-drivers, please visit the URL for your repo. We'll use x-testing here for our example. You can do this by entering the following URL into your browser:
- Now, navigate to your locale's directory on your local machine.
If you're using Koala, this should be located at
/path/to/your/koala.project/locale/3.6/x-testing, otherwise, it should be located at
In this directory, you should have an hg repository. You might have created it yourself by running
hg init or
hg clone or you might have had it created by Koala when you were setting up a new localization project. Also at this point, you shouldn't have any uncommitted changes (i.e., running the
hg status command should show nothing). Let's see what the last revision in this repository is.
- Enter the following command:
$ hg log -l 1
You should see an output similar to the one below:
changeset: 0:7c543e8f3a6a tag: tip user: Your Name <firstname.lastname@example.org> date: Mon Nov 23 18:08:25 2009 +0100 summary: Added search bar strings
- Now compare the local repository on your machine with the remote Hg repository by entering this command:
$ hg outgoing http://hg.mozilla.org/l10n-central/x-testing
hg outgoing command compares the two repositories and lists all changesets that are present locally, but not in the remote repository. These changesets will need to be "pushed" to the remote repository. You can expect to see output like this:
comparing with http://hg.mozilla.org/l10n-central/x-testing searching for changes changeset: 0:7c543e8f3a6a tag: tip user: Your Name <email@example.com> date: Mon Nov 23 18:08:25 2009 +0100 summary: Added search bar strings
- Let's now push this changeset. Enter the following command:
hg push http://hg.mozilla.org/l10n-central/x-testing
- Mercurial will connect to your repo and ask you to provide your account information (i.e., the username and the password).
real URL is http://hg.mozilla.org/l10n-central/x-testing pushing to http://hg.mozilla.org/l10n-central/x-testing searching for changes http authorization required realm: hg.mozilla.org HTTP user: your_id password:
After you enter your account information, the changeset will be pushed.
adding changesets adding manifests adding file changes added 1 changesets with 2 changes to 2 files bb/acl: your_id is allowed. accepted payload. quota: 979.7 KB in use, 150.0 MB available (0.64% used)
Your changeset has been successfully pushed to your repository!
As you begin to move through your translations, you should
commit the changes locally and
push your work to this experimental repository. For instance, if you have finished translating all the
.properties files in your
x-testing/browser/chrome/browser/ directory, then you should run these commands:
$ hg status $ hg commit -m "Translated browser/chrome/browser/" $ hg outgoing $ hg push http://hg.mozilla.org/l10n-central/x-testing
Note that due to the distributed nature of Hg,
hg commit saves the changes locally (i.e., in your computer's Hg repository). You can see the history of commits with
hg log. After doing
hg commit, you still need to send the changes to the remote repository. This is where
hg push comes in. This sends your commits to the remote repository.
Now you're ready to proceed to the release phase!