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.)

  1. Install compare-locales
  2. wget easy_install compare_locales-0.6.1-py2.5.egg
  3. Clone mozilla-1.9.1
  4. hg clone
  5. Create the barebones localization
  6. 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/ 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/ tl/toolkit
  7. Create a mozconfig file, setup your object directory
  8. 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 configure
  9. Test merge-ab-CD and langpack-ab-CD targets
  10. 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

If everything went well, you should be ready to translate now!


Comments powered by Disqus