Contents
History
Source
Email Feedback
Localising Mozilla Firefox
Firefox like Mozilla is traditionally localised with Mozilla Translators. But
for those who invest in in PO files and would rather spend time translating
then learning another tool ... here are the instructions for creating a Firefox
localisation.
Background
This provides instructions for the users of Mozilla Translator:
http://www.mozilla.org/projects/l10n/mlp_howto_Firefox.html
Step by step instructions for localising Firefox:
http://www.mozilla.org/projects/firefox/l10n/l10n-step-by-step.html
This serves as our reference point so please familiarise yourself with it.
Check these
locale/browser/browser.properties: showskinsdescription
Locale switcher
This multi locale switcher is best for use in cases where you will have more
than one language to install. Even with two it is much cleaner then other
locale switchers available.
http://www.saintpatrickdc.org/bsmedberg/locale-switcher/
Has problems on 1.0PR of Firefox
Packing
At the moment po2moz cannot generate Firefox language XPI's. Therefore this
manual process.
* Prepare
download a language XPI here we use tr-TR.xpi and the en-US.xpi
unpacked tr-TR.xpi and en-US.xpi
mkdir tr-xpi
cd tr-xpi
unzip ../tr-TR.xpi
unpack chrome/tr-TR.jar and similarly en-US.jar
cd chrome
unzip tr-TR.jar
Copy all the Turkish files to your language
cp -rp tr-xpi XX-xpi
* Creation
converted all PO to dtd using po2dtd.py
po2moz -t en-xpi/bin/chrome/locale XX/locale XX-xpi/chrome/locale
Edit all .rdf files
vim `find XX-xpi -name "*.rdf"`
Change all reference to tr-TR to XX-YY for your languages and country
Edit XX-xpi/install.rdf
Change language name
Change id code (use md5sum against some file I use the tar ball of the
translated PO files to create a unique id)
* Packaging
Create the jar file
cd XX-xpi/chrome
zip -r9 XX-YY.jar locale
Remove the old Turkish file
rm tr-TR.jar
Create the final XPI
cd XX-xpi
zip -r9 ../XX-YY.zip .
cd ..
mv XX-YY.zip XX-YY.xpi
Now you need to test test and test some more :)
Customising
You can change various settings to make the browser more specific to your
locale:
1) Accept language
In intl.properties.po
general.useragent.locale - the locale for your browser eg. af-ZA
intl.accept_languages - the languages that you will request from webpages
eg "af-za, af, en-gb, en-us, en"
TODO:
default start URL
default search engine
adding search engines specific to your locale
bookmark customisation
Second attempt
Using Firefox 1.0 en-US.xpi from here:
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/linux-i686/xpi/en-US.xpi
Now create the POT files:
moz2po -P en-US.xpi templates
pomigrate2 ~/dev/translations/mozilla/1.7-branch/af af templates
Other Things to Localise
This extract of an email from Pavel Franc of the Czech team highlights other pieces of Firefox
that need to be localised.
The Czech (cs-CZ) Thunderbird 1.0 windows builds are ready.
We do now our QA testing.
ftp://ftp.czilla.cz/test/thunderbird/1.0/
The following files outside chrome were changed in zip archive:
* README.txt ... translated
* talkback-l10n.ini ... translated
+ cs.aff ... Czech spellchecker
+ cs.dic ... Czech spellchecker
- en-US.aff ... removed
- en-US.dic ... removed
* rss.rdf ... translated
* mailViews.dat ... translated
* all-thuderbird.js ... changed useragent.locale
and in installer:
* install.js ... changed locale and transalted shortcuts
* UninstallThunderbird.zip ... translated
* 7zSD.sfx ... translated by ResourceHacker
Packaging a loclalised Max OS X version
http://thunderbird.dnsalias.net/instructions/thunderbird-l10n-OSX.html
Releasing your version
First get it into CVS. You need to file a buf to get an account.
For 1.0.1 we followed this process. File a bug report to ask for l10n QA
confirmation.
Undocumented Requirements
http://wiki.mozilla.org/wiki/L10n:Firefox_Extras
More information and extras for Official Firefox builds
More information can be found on the Mozilla L10n wiki:
http://wiki.mozilla.org/wiki/L10n:Home_Page
There are some extras that have to be translated for the web to become an official Firefox build:
http://wiki.mozilla.org/wiki/L10n:Firefox_Extras