Mozilla en version française

Aller au contenu | Aller au menu | Aller à la recherche

Promouvoir et soutenir le logiciel libre

lundi, 21 juillet 2008

How to localize Fennec 0.4 in your language

Following the previous post about the French localization of Fennec 0.4 for Nokia n8X0, I'll try to explain how we did this.

Prerequies : you need a debian based system, debian, ubuntu, the tablet itself should work, in fact the really important piece of software is dpkg-deb.

  • Make 2 directories, one for Fennec one for Xulrunner.
  • Change to Fennec directory and unpack the debian packages:

dpkg-deb -e ../fennec_0.4_armel.deb .

dpkg-deb -b ../fennec_0.4_armel.deb .

You have now in your directory 3 directories DEBIAN, etc and usr.

  • Copy usr/local/fennec/chrome/en-US.jar in another directory where you can unzip it : unzip en-US.jar
  • You now have 5 files to localize : bookmarks.dtd, browser.dtd, browser.properties, hud.dtd, toolbar.dtd.

They are really short, and in general the strings already exist in your Firefox localization.

  • Remove en-US.jar from your directory and zip the newly localized file :

zip -r ab-AB.jar *

where ab-AB is your locale code.

  • Put your ab-AB.jar in usr/local/fennec/chrome/
  • Remove en-US.jar from usr/local/fennec/chrome/, and move en-US.manifest to ab-AB.manifest.
  • Edit ab-AB.manifest, change all en-US occurrences to ab-AB.
  • In your Fennec directory, rebuild the debian package :

dpkg-deb -b . ../fennec_0.4_armel.ab-AB.deb

Don't worry about the warning.

Et voilà, Fennec is localized in your language.

  • Now make the same for xulrunner.
  • Unpack the debian package:

dpkg-deb -e ../xulrunner_1.9.1a1pre_armel.deb .

dpkg-deb -b ../xulrunner_1.9.1a1pre_armel.deb .

In the case of xulrunner you have to make the DEBIAN directory yourself :

mkdir DEBIAN 
mv control md5sums postinst prerm DEBIAN
  • Take your ab-AB.jar from your firefox localization and unzip it : unzip ab-AB.jar.
  • Remove the reporter directory as it is not needed.
  • There is only one entity to change between the two versions : in the file mozapps/xpinstall/xpinstallconfirm.dtd change <!ENTITY warningMain.label to : <!ENTITY warningPrimary.label. That's all.
  • Re zip your ab-AB.jar : zip -r ab-AB.jar *
  • Put your ab-AB.jar in usr/local/xulrunner/chrome/
  • Remove en-US.jar from usr/local/xulrunner/chrome/, and move en-US.manifest to ab-AB.manifest.
  • Edit ab-AB.manifest, change all en-US occurrence to ab-AB.
  • In your Xulrunner directory, rebuild the debian package :

dpkg-deb -b . ../xulrunner_1.9.1a1pre_armel.ab-AB.deb

Don't worry about the warning.

Et voilà, xulrunner is localized in your language.

You now have two debian packages : xulrunner_1.9.1a1pre_armel.ab-AB.deb and fennec_0.4_armel.ab-AB.deb which you can install on your tablet.

Fennec 04

Hope this will help.

samedi, 19 juillet 2008

Fennec (Mozilla mobile) en français

Ne reculant devant aucune difficulté, l'équipe Frenchmozilla est contente d'être la première locale à vous proposer Fennec en français pour les tablettes Nokia N8x0 (OS 2008 Diablo).

Fennec 04

Pour l'instant la localisation a été très facile, il m'a suffit de reprendre le travail réalisé par Cédric sur Xulrunner et traduire 5 tout petit fichiers.

Pour l'instant pas de fichier .install, il vous faudra récupérer les deux paquets .deb situés dans ce répertoire (fennec_0.4_armel.fr.deb et xulrunner_1.9.1a1pre_armel.fr.deb).

Les cinq fichiers traduits se trouvent dans le fichier fichiers_fennec_fr.zip

À noter que cette version est très instable (c'est normal ce n'est qu'une 0.4), à utiliser avec précaution et surtout uniquement à des fins de test.

Je publierai aussi un billet en anglais qui expliquera la marche à suivre pour réaliser cette localisation (si d'autres équipes sont intéressées).