This document describes the mechanics of getting a localized version of Firefox into CVS. It assumes you have already registered your l10n project; you have a working installation of CVS; and (for the final step) you have write access to the CVS l10n repository.
There are two scenarios covered here:
For both scenarios, you are aiming to almost duplicate the
structure of the en-US locale files; however, the other
localisations are held in a different part of the CVS repository. The
recommended steps are:
en-US filesen-US files over into the new structure
(if you have no existing files), oren-US files from CVSPrerequisites: open a command prompt in an empty directory. This is where you will be working on your localization.
First, you need to log in to the CVS repository – see
[source code via cvs] for platform-specific
details. Set your CVSROOT environment variable to
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot,
and do:
cvs login
the password is anonymous.
Then, checkout the en-US files from the source. The files you need are in the following directories:
mozilla/browser/locales/en-US mozilla/dom/locales/en-US mozilla/extensions/reporter/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
You can put these directories all on one line with the checkout command:
cvs checkout -P mozilla/browser/locales/en-US mozilla/dom/locales/en-US mozilla/extensions/reporter/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
Ensure you use the -P option, which doesn't download empty directories.
pl files from CVSyou don't have to check out pl files -
any locale will do; however, pl files are most likely to
be up to date.
You now need to change your CVSROOT to
:pserver:anonymous@cvs-mirror.mozilla.org:/l10n
(if you have write access, and are intending to add and
commit your own localization, use your own
username). Then checkout pl/ (or other
chosen locale):
cvs checkout -P l10n/pl
Your working directory tree should now look like this:
·firefox/
·-·mozilla/
| |-·browser/locales/en-US/
| |-·dom/locales/en-US/
| |-·extensions/reporter/locales/en-US/
| |-·netwerk/locales/en-US/
| |-·other-licenses/branding/firefox/locales/en-US/
| |-·security/manager/locales/en-US/
| ·-·toolkit/locales/en-US/
·-·l10n/
·-·pl/
|-·browser/
|-·dom/
|-·extensions/reporter/
|-·netwerk/
|-·other-licenses/branding/firefox/
|-·security/manager/
·-·toolkit/
There is direct correspondence between the upper and lower sections
- ie mozilla/browser/locales/en-US/ contains
the same directories and files as l10n/pl/browser/.
Effectively, the trailing locales/en-US/
has been replaced with the preceding
ab-CD.
You now need to create your own
ab-CD/ or
ab/ directory structure, mimicking the
pl structure. Do not copy any
CVS directories into your locale.
If you have an existing Fx 1.0 localisation, you can avoid duplicating more work than you need to by re-using the existing files.
| Trunk (Fx 1.1+) | Aviary Branch (Fx 1.0) | |
|---|---|---|
l10n/ab-CD/browser/ |
came from... | mozilla/browser/locales/ab-CD/ |
l10n/ab-CD/dom/ |
mozilla/toolkit/locales/ab-CD/chrome/global/$foo/
where $foo = dom,
layout,
security,
webservices,
xml |
|
l10n/ab-CD/dom/accessibility/ |
mozilla/toolkit/locales/ab-CD/chrome/global/accessible.properties
(file split due to platform-specifics) |
|
l10n/ab-CD/dom/xslt/xslt.properties |
mozilla/toolkit/locales/ab-CD/chrome/global/layout/xslt.properties |
|
l10n/ab-CD/extensions/reporter/ |
[new] | |
l10n/ab-CD/other-licenses/branding/firefox/brand.* |
mozilla/browser/locales/ab-CD/chrome/global/brand.* |
|
l10n/ab-CD/security/manager/chrome/pip(pki|nss)/ |
mozilla/toolkit/locales/ab-CD/chrome/global/pip(pki|nss) |
|
l10n/ab-CD/toolkit/ |
mozilla/toolkit/locales/ab-CD/ |
The final structure you're aiming for in each directory should match
the canonical en-US structure.
[compare-locales.pl]
is a Perl script which will find non-matching (missing or extraneous)
files in the directories.
Once you've got the files in this layout, you need to either
en-US to your languageThen check your files with [compare-locales.pl], and fix any differences.
That will have taken some time, so ensure you update your
en-US. You can use the following command to update the
en-US files (in the directory containing them). Make sure
you switch back to the main CVSROOT.
cvs update -P mozilla/browser/locales/en-US mozilla/dom/locales/en-US mozilla/extensions/reporter/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 output from this command will list any changed files: those
lines begin with a "P ".
There are a number of files that compare-locales.pl
doesn't check. However, these files must still be localized:
*.inc filesinstall.it files*.rdf files: heaviest use is in the help sectionxhtml help filesbookmarks.html files.searchplugins/ directory.In ab-CD/browser/defines.inc you must
change the MOZ_LANGPACK_EID string to your own
GUID; this remains
constant for a given localization.
The *.rdf help files hold the Contents, Index and
Glossary for the Help section.
If you created your locale next to pl/ (as shown in the box below),
and you used your username and password to checkout pl/,
skip down to "using cvs add".
·firefox/ ·-·mozilla/ ·-·l10n/ ·-·CVS/ ·-·pl/ ·-·ab-CD/
If you checked out l10n/pl/ files with anonymous CVS,
you need to:
CVS directory from the l10n/
directory (this will probably mean you'll have to re-check out
pl/ files if you need a more current copy); orl10n/ directory.Option 1:
·firefox/ ·-·mozilla/ ·-·l10n/·-·CVS/←--- Delete this. ·-·pl/ ·-·ab-CD/
Option 2:
·firefox/
·-·mozilla/
·-·l10n/
| ·-·CVS/
| ·-·pl/
·-·mylocale/
·-·l10n/
·-·ab-CD/ ←--- Move ab-CD to here.
You can now carry, following the instructions in "No CVS directories anywhere".
If your l10n/ab-CD/ directories were created away from
anything else (no CVS directories anywhere) you will need to
checkout the l10n/
directory.
-l switch to ensure
you don't download all the locales in the repository.-d :ext:foo%bar.com@cvs.mozilla.org:/l10n or
with CVSROOT set appropriately)$ ls l10n $ cvs checkout -l l10n/
This will add a CVS sub-directory to your
l10n/ directory, which lets CVS know where to add your
files.
Points to remember:
cvs add" is not recursive. You need to
cvs add each file.cvs add -kb" when adding binary files
(in searchplugins directory and maybe help/images)Navigate into your l10n directory. Now you can
cvs add your ab-CD
files.
$ cvs [-d :ext:blah] add ab-CD
which should reply something like
Directory l10n/l10n/ab-CD added
There are 2 "l10n"s - one is the repository, the other is the directory containing all the locales.
If that works, then you can cvs add all other files.
When you've added all the files, you need to commit your changes.
$ cvs commit -m "L10n files for ab-CD, committed for John Smith"
And that's it.
To stay up to date, use
bonsai or cvs
update on the en-US files. Change your files, and
then cvs commit your changes. You only need to use
cvs add if new files appear. Of course, look out for
notices in
n.p.m.l10n
or on #l10n for announcements of code
freezes. When this occurs, you'll need to get patches for check-in
approved.