Creating a new localization for Firefox 3.1
Someone I know recently expressed interest in translating Firefox into her native language, Tagalog. Being a build guy, I decided to spare her the pain of getting everything setup and let her focus on the translation. Much to my dismay I discovered that the Create a New Localization page hasn't been fully updated for Firefox 3.1 yet. By mashing together information on a couple of pages and a lot of help from #l10n I managed to get an environment up and running that allowed her to dive in. Here's how to do it. (Note: This has been tested on Mac and Windows. On Windows, this depends on MozillaBuild 1.3; on both it depends on Python setuptools.)
- Install compare-locales
- Clone mozilla-1.9.1
- Create the barebones localization
- Create a mozconfig file, setup your object directory
- Test merge-ab-CD and langpack-ab-CD targets
wget http://pypi.python.org/packages/2.5/c/compare-locales/compare_locales-0.6.1-py2.5.egg#md5=0b939a22d87427d80f5286dc5eb1eab2 easy_install compare_locales-0.6.1-py2.5.egg
hg clone http://hg.mozilla.org/releases/mozilla-1.9.1
mkdir -p tl/browser/installer tl/browser/profile/chrome tl/browser/searchplugins tl/browser/updater tl/toolkit cp mozilla-1.9.1/browser/locales/en-US/defines.inc tl/browser cp mozilla-1.9.1/browser/locales/en-US/profile/chrome/userC* tl/browser/profile/chrome cp mozilla-1.9.1/browser/locales/en-US/firefox-l10n.js tl/browser cp mozilla-1.9.1/browser/locales/en-US/README.txt tl/browser cp mozilla-1.9.1/browser/locales/en-US/searchplugins/list.txt tl/browser/searchplugins cp mozilla-1.9.1/browser/locales/en-US/updater/updater.ini tl/browser/updater/updater.ini cp mozilla-1.9.1/toolkit/locales/en-US/defines.inc tl/toolkit
cd mozilla-1.9.1 echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../fx-tl" > .mozconfig echo "ac_add_options --with-l10n-base=../" >> .mozconfig echo "ac_add_options --disable-compile-environment" >> .mozconfig echo "ac_add_options --enable-application=browser" >> .mozconfig make -f client.mk configure
cd ../fx-tl make -C browser/locales merge-tl LOCALE_MERGEDIR=`pwd`/../merge make -C browser/locales langpack-tl LOCALE_MERGEDIR=`pwd`/../merge LANGPACK_FILE=`pwd`/../firefox-tl.xpi