In Mozilla, we use the the Mercurial version control system (Hg) to help manage our localizations. When a localization team becomes "official" and your Hg repository is set up for a locale, you can then clone the existing Mozilla release branch (i.e. where active development of the upcoming release of Firefox occurs) and then begin the necessary work for translation. Hg allows localizers to work locally on their machines and then "push" changes to their official Mozilla repository.
Depending on your operating system, you will need to install the correct version of Hg on your machine. This document will give you the basic information on how to do that.
Working with Bit Bucket
Before a team becomes official, we like to get the lcoalizers comfortable with the Hg commands that allow for "pulling", "cloning", and "pushing" work to an experimental repository. We use a web service called Bit Bucket to start the learning process with Hg.
To begin, contact the l10n-drivers to let them know that you are interesting in starting a localization. The l10n-drivers will help set up an experimental Hg repository in Bit Bucket.
After your new Bit Bucket repository is created by the l10n-drivers, pleae visit the URL for your repo. You can do this by entering the following URL into your browser:
(where ab-CD will be replaced by your locale code)
At that main page of your newly created Bit Bucket repo, you'll see the Hg commands,
$ hg clone http://bitbucket.org/mozillal10n/ab-CD/ ... $ hg pull -u # to pull changes and update $ hg push # to push changes to this repo
Import existing data?
$ cd /path/to/existing/hg/repo/ $ hg push http://bitbucket.org/mozillal10n/ab-CD/
$ hg clone ssh://firstname.lastname@example.org/mozillal10n/ab-CD/ $ hg push ssh://email@example.com/mozillal10n/ab-CD/
Open your command line terminal prompt and create a folder where you will work. You can do this by running the following commands:
$mkdir Mozilla $cd Mozilla
You should now have your newly created Mozilla directory in your path. You will need to "hg clone" the existing release branch for Mozilla
so you have all the files locally for you to begin localization. In the above path, type the following command:
$hg clone hg clone http://hg.mozilla.org/releases/mozilla-x.x.x/
Where "x.x.x" is the existing release branch version. For instance, for Firefox 3.6, we use ~/mozilla-1.9.2/
After you have cloned the release branch locally to your machine, you will need to navigate to each of the files necessary for localization.
Copy the entire ~/mozilla-x.x.x/ directory and renaming it to your locale code (e.g. ab-CD) and placing it one level above in your
~/Mozilla/ main directory
Change your directory to the new copy by running the following command:
$cd .. $cd ab-CD
You should now be in the ~/Mozilla/ab-CD/ path and can start localizing. We'll first navigate to the directory called "browser" by running
the following commands one after the other from your command line:
$cd [ab-CD]/ $cd browser/ $cd locales/ $cd en-US/ $cd chrome/ $cd browser
Or, to make life more simple, you can type one command to navigate all the way to the directory where you can begin. That command is the
same as above, in one string.
To see what is contained in "browser" type
And, you should see the following output from your terminal:
aboutCertError.dtd pageInfo.dtd aboutDialog.dtd pageInfo.properties aboutPrivateBrowsing.dtd pageReportFirstTime.dtd aboutRobots.dtd places aboutSessionRestore.dtd preferences aboutSupport.dtd quitDialog.properties baseMenuOverlay.dtd safeMode.dtd browser.dtd safebrowsing browser.properties sanitize.dtd credits.dtd search.properties engineManager.dtd searchbar.dtd engineManager.properties setDesktopBackground.dtd feeds shellservice.properties history sidebar migration tabbrowser.dtd openLocation.dtd tabbrowser.properties openLocation.properties
As a localizer, you are responsible for opening each of the ".dtd" and ".properties" files to begin localizing.
Directories to localize
If you're starting from scratch, these are the directories you need to download and translate:
mozilla/browser/locales/en-US/ mozilla/dom/locales/en-US/ mozilla/netwerk/locales/en-US/ mozilla/other-licenses/branding/firefox/locales/en-US mozilla/security/manager/locales/en-US/ mozilla/toolkit/locales/en-US/
The localized files end up in the following directories, corresponding to the paths above (replace ab-CD with your locale code, possibly
only two letters):
l10n/ab-CD/browser/ l10n/ab-CD/dom/ l10n/ab-CD/netwerk/ l10n/ab-CD/other-licenses/branding/firefox/ l10n/ab-CD/security/manager/ l10n/ab-CD/toolkit/
To start editing the files necessary to localize, you should have a text editing application like <a
href="http://www.barebones.com/products/TextWrangler/">"Text Wrangler"</a>. After you have downloaded your editor of choice, type the
following command in the same path from above (~/mozilla-1.9.2/browser/locales/en-US/chrome/browser)
$open aboutCertError.dtd -a [your text editing application's name]
Read the top of the file to get any context on how to translate contained in the notes written by the developers or l10n-drivers. Localization notes will look like the following:
$<!-- LOCALIZATION NOTES... -->
After the localization notes, you will see a list of <!ENTITY> strings like the following:
$<!ENTITY certerror.pagetitle "Untrusted Connection">
You should go through each entity, translating the value in the parameters (i.e., "the content within the quotation marks"). Once you have translated all the <!ENTITY> strings in this file, you should save your work and open the next .dtd or .property file. You will need to go through each and every file to in every directory in ~[ab-CD]/browser/locales/en-US/
The following "phase list" provides a very rough guide on where to start and how to proceed through localizing.
with a description of the phases here:
Land your translated files one by one, making sure it follows the *mozilla-1.9.2* structure. This will familiarize you with our "Hg"
commands and will get us something that we can import easily when you are done.