Carnet de notes

Entries list

mercredi 31 juillet 2013

Transliterating Serbian Cyrillic to Serbian Latin on Linux with PHP

Mozilla has beeen shipping Firefox in Serbian for many years and we ship it in cyrillic script, that means that our software, our sites, our documentation is all in cyrillic for Serbian.

You may not know it (especially if you are not European), but Serbian can be written in both Cyrillic and Latin scripts, people live with the two writing systems, that is a phenomenon called synchronic digraphia.

I was wondering of it would be easy to create a version of Firefox or Firefox OS in Latin script and since our l10n community server just got an upgrade and now has PHP 5.4, I played a bit with the recent transliterator class in that version that uses the ICU library.

Basically, it works, and it works well. With one caveat though, I found out that the ICU library shipped with Linux distro is old and exposes a bug in Serbian transliteration that was fixed in more recent ICU libraries.

How does it work? Here is a code example:

$source = 'Завирите у будућност';
$t = Transliterator::create('Serbian-Latin/BGN');
print "Serbian (Cyrillic): $source <br>";
print "Serbian (Latin): {$t->transliterate($source)}";

And here is the output:

Cyrillic: Завирите у будућност
Latin: Zavirite u budućnost

The bug I mentioned earlier is that the cyrillic letter j is systematically converted to an uppercase J even if the letter is inside a word and should be lowercase.

Example: This string : Најгледанији сајтови
Should be transliterated to: Najgledaniji sajtovi
But my script transliterated it to: NaJgledaniJi saJtovi

I filed a bug in the PHP ticket system and got an inmediate response that my test script actually works on Windows. After some investigation by the PHP dev, it turns out that there is no bug on the PHP side, the bug is in the ICU library that ships with the OS and it happens to be version 48.x on Linux distros while Windows enjoys a more recent version 50 and the ICU project itself is at version 51.2

Unfortunately, I couldn't find any .deb package or ppa for Ubuntu that would propose a more recent ICU library version, Chris Coulson from Canonical pointed me to this ticket in Launchpad: [request] upgrade to icu 50, but this was an unassigned one.

As a consequence, I had to compile the newer ICU library myself to make it work. Fortunately, I could follow almost all the steps indicated in this post for a CentOS distro, I only had to adjust the php.ni locations (and also update the php.ini file for the development server) and restart Apache :)

So now, I can transliterate easily from cyrillic to Latin a full repository, I put a gist file online with the full script doing the conversion of a repo if you want to use it.

jeudi 18 avril 2013

MozFR Transvision Reloaded: 1 year later

Just one year ago, the French Mozilla community was living times of major changes: several key historical contributors were leaving the project, our various community portals were no longer updates or broken, our tools were no longer maintained. At the same time a few new contributors were also popping in our IRC channel asking for ways to get involved in the French Mozilla community.

As a result, Kaze decided to organize the first ever community meetup for the French-speaking community in the Paris office (and we will repeat this meetup in June in the brand new Paris office!) .

IMG_0151

This resulted in a major and successful community reboot. Leaving contributors passed on the torch to other members of the community, newer contributors were meeting in real life for the first time. This is how Clarista officially became our events organizer, this is how Théo replaced Cédric as the main Firefox localizer and this is how I became the new developer for Transvision! :)

What is Transvision? Transvision is a web application created by Philippe Dessantes which was helping the French team finding localized/localizable strings in Mozilla repositories.

Summarized like that, it doesn't sound that great, but believe me, it is! Mozilla applications have big gigantic repos, there are tens of thousands of strings in our mercurial repositories, some of them we have translated like a decade ago, when you decide to change a verb for a better one for example, it is important to be able to find all occurrences of this verb you have used in the past to see if they need update too. When somebody spots a typo or a clumsy wording, it's good to be able to check if you didn't make the same translation mistakes in other parts of the Mozilla applications several years ago and of course, it's good to be able to check that in just a few seconds. Basically, Phillippe had built the QA/assistive technology for our localization process that best fitted our team needs and we just couldn't let it die.

During the MozFR meetup, Philippe showed to me how the application worked and we created a github repository where we put the currently running version of the code. I tagged that code as version 1.0.

Over the summer, I familiarized myself with the code which was mostly procedural PHP, several Bash scripts to maintain copies of our mercurial repos and a Python script used to extract the strings. Quickly, I decided that I would follow the old Open Source strategy of Release early, release often. Since I was doing that on the sidelines of my job at Mozilla,  I needed the changes to be small but frequent incremental steps as I didn't know how much time I could devote to this project. Basically, having frequent releases means that I always have the codebase in mind which is good since I can implement an idea quickly, without having to dive into the code to remember it.

One year and 15 releases later, we are now at version 2.5, so here are the features and achievements I am most proud of:

  1. Transvision is alive and kicking :)
  2. We are now a team! Jesús Perez has been contributing code since last December, a couple more people have shown interest in contributing and Philippe is interested in helping again too. We have also a dynamic community of localizers giving feedback, reporting bugs are asking for immrovements
  3. The project is now organized and if some day I need to step down and pass the torch to another maintainer, he should not have difficulties setting the project up and maintaining it. We have a github repo, release notes, bugs, tagged releases, a beta server, unit testing, basic stats to understand what is used in the app and a mostly cleaned up codebase using much more modern PHP and tools (Atoum, Composer). It's not perfect, but I think that for amateur developers, it's not bad at all and the most important thing is that the code keeps on improving!
  4. There are now more than 3000 searches per week done by localizers on Transvision. That was more like 30 per week a year ago. There are searches in more than 70 languages, although 30 locales are doing the bulk of searches and French is still the biggest consumer with 40% of requests.
  5. Some people are using Transvision in ways I hadn't anticipated, for example our documentation localizers use it to find the translation of UI mentioned in help articles they translate for support.mozilla.org, people in QA use it to point to localized strings in Bugzilla

A quick recap of what we have done, feature-wise, in the last 12 months:

  • Completely redesigned the application to look and feel good
  • Locale to Locale searches, English is not necessarily the locale you want to use as the source (very useful to check differences from languages of the same family, for example Occitan/French/Catalan/Spanish...).
  • Hints and warnings for strings that look too long or too short compare to English, potentially bad typography, access keys that don't match your translation...
  • Possibility for anybody to file a bug in Bugzilla with a pointer to the badly translated string (yes we will use it for QA test days within the French community!)
  • Firefox OS strings are now there
  • Search results are a lot more complete and accurate
  • We now have a stable Json/JsonP API, I know that Pontoon uses it to provide translation suggestions, I heard that the Moses project uses it too. (if you use the Transvision API, ping me, I'd like to know!)
  • We can point any string to the right revision controled file in the source and target repos
  • We have a companion add-on called MozTran for heavy users of the tool provided by Goofy, from our Babelzilla friends.

The above list is of course just a highlight of the main features, you can get more details on the changelog.

If you use Transvision, I hope you enjoy it and that it is useful oo you. If you don't use Transvision (yet), give it a try, it may help you in your translation process, especially if your localization process is similar to the French one (targets Firefox Nighty builds first, work directly on the mercurial repo, focus on QA).

This was the first year of the rebirth of Transvision, I hope that the year to come will be just as good as this one. I learnt a lot with this project and I am happy to see it grow both in terms of usage and community, I am also happy that one tool that was created by a specific localization team is now used by so many other teams in the world :)

vendredi 7 décembre 2012

Parser des fichiers properties en PHP, ma lib pour composer

En début de semaine, mes copains de Mozilla Hispano ont lancé un projet qu'ils préparaient depuis quelques temps déjà, une petite application d'assitance aux utilisateurs pour leur page Facebook. Cette application interroge l'API du site d'assistance officiel de Mozilla (alias SUMO, pour SUpport.MOzilla.org) pour afficher les articles les plus consultés et elle dispose d'un champ de recherche qui propose des articles dans sa langue. Simple, efficace.

Ils m'ont contacté pour que je leur file un coup de main pour la localisation, comme ça l'application est disponible pour les non-hispanophones (et si vous avez un navigateur en français, le lien dans le paragraphe ci-dessus a dû s'afficher en français), j'ai donc ajouté de la détection de langue, de la détection de direction rtl pour le template et un petit système de traducion basé sur des fichier .properties, les fichiers properties viennent de Java mais sont omniprésent aussi en Javascript et sont la base de la traduction des logiciels de Mozilla (Firefox, ou FirfoxOS /ex).

L'application étant en php, l'idée initiale de mes copains étaient d'utiliser parse_ini_file() car la syntaxe des fichiers ini est presque la même que celle des .properties, mais si on veut des properties sans guillemets, avec du support des chaînes multilignes et éventuellement des commentaires, il faudrait mieux que ça, donc je leur ai rapidement créé une librairie pour parser les properties.

Ce n'est pas la première fois que j'écris une fonction ou une classe pour parser des .properties et en fait, je crois que c'est la troisième ou quatrième fois et à chaque fois j'ai fait du code jetable parce que je ne trouvais pas de librairie fiable sur le net (il y en a sûrement, j'ai juste pas trouvé), donc cette fois-ci j'ai décidé que j'allais faire une librairie une bonne fois pour toute et que la prochaine fois que j'aurai à réutiliser des properties, je m'en resservirai, voire même, je l'améliorerai :)

J'ai donc créé ma librairie sur github, elle s'appelle très originalement PhpProperties, elle parse correctement un fichier .properties et peut même extraire et associer les commentaires dans le fichier source (l'idée à long terme c'est de fournir un convertisseur vers d'autres format type .lang, .po, dtd... et de ne pas perdre les commentaires dans le code), son usage est simple:

<?php
$source = new \xformat\Properties();
var_dump($source->getproperties('toto.properties'));
Mais ce n'est pas tout, j'ai ajouté cette librairie à Packagist.org, vous pouvez donc l'installer comme une dépendance dans vos projets en utilisant un fichier composer.json:

{
    "require": {
        "pascalc/php-properties": "1.0"
    }
}


Un simple composer install vous installera tout ça :)

Voilà, je ne prétends pas que c'est du beau code, mais il marche plutôt bien et je suis assez content d'avoir pu créer mon premier paquet installable via Composer, le nouveau gestionnaire de dépendances de PHP :)

mardi 4 décembre 2012

Compiler Firefox OS en version desktop sur une Ubuntu

J'ai installé hier Firefox OS en version Desktop sur mon Ubuntu (12.04) afin de jouer avec.

Voici les étapes qui marchent chez moi :

Tout d'abord, il vous faut installer les paquets nécessaire à la compilation et bien sûr les outils de gestionnaire de version nécessaires :

sudo apt-get install mercurial g++ make autoconf2.13 yasm libgtk2.0-dev libglib2.0-dev libdbus-1-dev libdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libiw-dev libxt-dev mesa-common-dev ccache git

Ensuite, on va créer un dossier FirefoxOS dans son /home :
mkdir ~/FirefoxOS/

Puis on va ce dossier :
cd ~/FirefoxOS/

Ensuite on récupère le code source de Firefox OS Bêta :
hg clone http://hg.mozilla.org/releases/mozilla-beta

(ça créera un dossier ~/FirefoxOS/mozilla-beta)

Puis on récupère le code source de Gaia, l'interface graphique en HTML5 de FirefoxOS :
git clone https://github.com/mozilla-b2g/gaia/

(ça créera un dossier ~/FirefoxOS/gaia)

Les deux étapes ci-dessus prennent du temps, surtout si vous avez une petite connexion.

Une fois ceci fait, il vous faut créer un fichier .mozconfig (notez bien le point avant mozconfig) que l'on mettra ici:
~/FirefoxOS/mozilla-beta/.mozconfig

Voici le contenu de mon .mozconfig :

CONCURRENCY=$(( `grep processor /proc/cpuinfo | wc -l` + 2 ))
mk_add_options MOZ_MAKE_FLAGS="-j$CONCURRENCY"
mk_add_options MOZ_OBJDIR=../build
# Use ccache
ac_add_options --with-ccache=/usr/bin/ccache
ac_add_options --enable-application=b2g
ac_add_options --disable-libjpeg-turbo
# This option is required if you want to be able to run Gaia's tests
# ac_add_options --enable-tests
# turn on mozTelephony/mozSms interfaces
# Only turn this line on if you actually have a dev phone
# you want to forward to. If you get crashes at startup,
# make sure this line is commented.
# ac_add_options --enable-b2g-ril

Une fois ceci fait, on va compiler Firefox OS, attention, ça prend du temps ! Plus de deux heures sur mon petit portable.
cd ~/FirefoxOS/mozilla-beta
make -f client.mk


La compilation créera un dossier ~/FirefoxOS/build/ et votre binaire se trouve là :
~/FirefoxOS/build/dist/bin/b2g

Une fois ceci fait, on va créer un profil Gaia :
cd ~/FirefoxOS/gaia
make

Une fois le profil créé, vous pouvez lancer Firefox OS avec cette commande :
~/FirefoxOS/build/dist/bin/b2g -profile ~/FirefoxOS/gaia/profile


et voilà le résultat :
Firefox OS sur Ubuntu

Si vous voulez plus d'informations, il y en a plein ici en anglais :
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS

N'oubliez pas non plus que Geckozone (la section forums de MozFr) a ouvert récemment un forum pour FirefoxOS :
Forum Firefox OS en français

Et vous pouvez discuter avec des développeurs et bénévoles Mozilla francophones dans le salon IRC #devfr sur irc.mozilla.org

MODIFICATION : 10h40, j'ai modifié l'url du dépôt mozilla-beta, je l'avais tapée de mémoire et évidemment ma mémoire était défaillante, désolé :)
MODIFICATION: 12h11,décidemment c'est la série, la création de profil gaia se fait évidemment après un cd dans le dossier gaia et pas dans le dossier mozilla-beta, corrigé aussi :)
MODIFICATION: 05/12/2012,ajout de ccache et git dans les dépendences nécessaires

vendredi 30 novembre 2012

Quelques nouvelles Mozilla

Tiens, ce matin j'ai envie d'utiliser mon blog :)

Alors voilà quelques nouvelles intéressantes cette semaine liées à Mozilla :

  • Mozilla ces deux dernières années s'est beaucoup impliqué techniquement dans les groupes de travail de l'IETF qui crée les normes Internet (protocoles par exemple) et dépend pour son fonctionnement de la fondation Internet Society. Mozilla est désormais membre sponsor de l'internet Society afin d'aider aussi l'IETF pour ses dépenses de fonctionnement. Billet de Josh Ash à ce sujet : Mozilla Joining ISOC in Support of IETF Activities
  • On est en train de finaliser un mode de navigation privée par fenêtre, ce qui permet d'avoir une fenêtre Firefox normale et une fenêtre Firefox en navigation privée en même temps (alors qu'en ce moment soit toutes la navigation est en mode incognito, soit tout est en mode normal). Ehsan Akhgari, le développeur qui est derrière le mode de navigation privée (qu'il avait ajouté à Firefox en tant que simple bénévole à l'époque et qui a bossé sur plein de projets importants pour Firefox depuis qu'il est employé, par exemple le nettoyage du composant Editor, le système de mise à jour silencieux depuis Firefox 4, plein de trucs sur le layout...) fournit des binaires en anglais depuis aujourd'hui basés sur Firefox Nightly avec ce nouveau mode de navigation privée par fenêtre et demande à tout le monde de tester et de lui envoyer plein de feedback parce que cette réécriture implique des changements de code importants touchant plein de domaines et pourrait causer des régressions. Plein de détails sur son billet Per-window private browsing ready for testing now!
  • Xavier Mouton-Dubosc a écrit aujourd'hui un très bon article en français sur FirefoxOS, le Firefox Marketplace et de manière générale ce que représente Mozilla et Firefox pour l'avenir du Web Mobile, à lire : 2012, fin d'un monde du web ?
  • Les forums de Geckozone ont maintenant rejoint le projet collaboratif Mozilla francophone MozFr, les habitués ont donc pu découvrir la nouvelle addresse des forums qui sont maintenant sur notre serveur commun (forums.mozfr.org). La migration est passée, Google réindexe les forums vitesse grand V (déjà plus de 220.000 pages indexées en deux semaines), il y a encore beaucoup à faire mais il y a aussi des nouveautés, en particulier, un tout nouveau forum pour Firefox OS et un autre pour les Open Web Apps 

mercredi 6 juin 2012

Fonctionnement en parallèle de deux versions de Firefox

Une petite astuce que j'ai apprise récemment sur IRC et qui est bien pratique.

J'utilise en permanence deux versions de Firefox (celle proposée par les dépôts Ubuntu et Firefox Nightly). Jusque là, tout va bien, j'ai un lanceur spécifique qui me permet de les lancer en parallèle avec des profils séparés :

$ firefox -P "nom" -no-remote

Mais cette méthode a un inconvénient dans Gnome Shell (peut être aussi sous Unity, pas testé), c'est que lorsqu'on fait alt+tab pour passer d'une appli à une autre, toutes les fenêtres de mes deux firefox sont groupées sous la même icône Firefox. La solution à cela est de rajouter une option dans le lanceur :

$ firefox -P "nom" --class "Nocturne" -no-remote

Voilà, j'ai maintenant des icônes distinctes en utilisant alt+Tab, chacune avec ses sous-fenêtre associées.

Le seul bug est que lorsqu'il y a une mise à jour automatique, l'option class n'est pas reprise en compte lors de la relance du navigateur, il faut le fermer/ouvrir manuellement pour que ça le reprenne en compte.

La seule référence à cette option est celle-ci https://bugzilla.mozilla.org/show_bug.cgi?id=496653.

samedi 17 mars 2012

Nouvelle page d'accueil pour Firefox + nouvelle page sur ouverture d'onglet

Depuis quelques jours, la page d'accueil de Firefox (about:home) a connu sa première modification majeure depuis Firefox 4.

Désormais, de larges icônes permettent d'accéder aux marque-pages, à l'historique, aux extensions, aux paramètres de Firefox, au gestionnaire de téléchargements et à l'outil de synchronisation des données.

Voici une capture écran sur Firefox Nightly d'hier (sous Linux):

about:home

En parallèle, l'ouverture d'un nouvel onglet affiche désormais les neufs sites les plus fréquemment visités que l'on peut réorganiser à la souris, enlever et épingler pour qu'ils ne soient pas remplacés:about:newtab

On peut s'attendre à des évolutions dans les versions à venir bien sûr, mais les captures écran étant sympas, je les partage :)

Si vous voulez essayer ça dans une nightly, c'est par là:

ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central-l10n/

jeudi 1 mars 2012

Toshiba L735-116 et reconnaissance de la batterie sous Linux

La batterie de mon portable n'est pas reconnue par Linux, ce qui veut dire que linux ne me donne pas d'indicateur de charge quand je suis débranché.

Jusqu'à présent je devais à chaque changement de noyau le recompiler avec un patch spécial. J'ai trouvé hier une méthode complémentaire sur un blog qui m'évite d'avoir à recompiler le noyau, je la documente donc ici en français, pour moi-même, mais aussi pour ceux qui auraient le même problème.

Mon portable est un Toshiba L735-116 mais de nombreux autres modèles de Toshiba sont affectés, donc si vous avez le même problème sur votre portable, rien ne vous empêche d'essayer, le geek qui a analysé et trouvé la solution au problème a lui un L650.

Les informations que je synthétise ici en français sont issues de ces deux billets :

Un grand merci donc à leurs auteurs Faheem et Michael Kuron pour avoir partagé leurs connaissances et apporté une solution.

Typiquement, vous savez que vous n'avez pas de batterie reconnue avec ces commandes :

~$ cat /proc/acpi/battery/BAT1/*
present:                 no
present:                 no
present:                 no

Les étapes à suivre sont les suivantes :

  1. ouvrir un terminal et passer en root (sudo -s)
  2. cd /boot/
  3. On récupère le tableau DSDT de la machine
    cat /sys/firmware/acpi/tables/DSDT > dsdt.dat
  4. on le désassemble
    iasl -d dsdt.dat
  5. on ouvre le fichier désassemblé avec son éditeur de texte favori (gedit, geany, vi...)
    geany dsdt.dsl
  6. on cherche la ligne :
    OperationRegion (EMEM, SystemMemory, 0xFF808001, 0xFF)
    et on la remplace par
    OperationRegion (EMEM, EmbeddedControl, 0x00, 0xFF)
  7. On enregistre le fichier
  8. On lance la commande pour le recompiler en un fichier dsdt.aml (ça créera aussi un fichier dsdt.hex mais on s'en servira pas)
    iasl -tc dsdt.dsl
  9. On récupère ce script 01_acpi.txt et on l'enregistre dans le dossier /etc/grub.d/ sous le nom 01_acpi (on enlève l'extension .txt)
  10. On donne à ce script les droits d'exécution
    chmod +x /etc/grub.d/01_acpi
  11. On lance la commande
    update-grub2
  12. On redémarre et normalement c'est bon :)

Pour info, ce bug est déjà signalé dans le bugzilla du kernel depuis deux ans et n'est pas réglé dans le noyau 3.2 que j'utilise (Bug 15707 - can not get AC/DC status).

lundi 21 novembre 2011

Thanks for the patch René-Luc

Last week, at Mozilla Camp Europe, René-Luc D'hont a developper and community member showed us a regression on Mozilla Nightly builds that were breaking the mozilla-based application he is working on.

We helped René-Luc file a bug and provide a patch and this has just landed in time for the next release, thanks René-Luc and congrats for your first patch in mozilla-central :)

(photo by Ludovic Hirlimann)

lundi 17 octobre 2011

How I got involved in Mozilla

Following David Boswell's suggestion to share our Mozilla stories, here is mine :)

I think my first community involvement was early 2000 when I started helping people on usenet having technical problems creating web pages for Netscape 4. I was not a very technical person at that time (I had studied business and languages, computing was just a hobby) but I was very excited by the transformation of Netscape into an open source project and was regularly testing the Mx builds (which most of the time just crashed a few seconds after launch ;) )

At that time, there was very few resources on the web about Mozilla and none in French. Since I was always answering the same questions on usenet, I started working on a FAQ in 2001 about Mozilla Suite (and later Netscape 7) which became the first (actually the only for a few years) semi-technical resource about Mozilla in French (a copy is still online here http://www.chevrel.org/fr/faq/).

From 2001 to 2003, I broadened my community involvement by translating my FAQ into Spanish, opening blogs about Mozilla in French and Spanish, translating documentation through the mozFR project and getting involved in the Tech Evangelism program that Bob Clary had started. In 2003, after chatting with Spanish Free Software advocates on IRC, I created the first Mozilla web forums in Spanish on the web, copying largely the format that mozillazine.org had chosen. A couple of months later, with many people from the community we had created the first Spanish-speaking portal about the Mozilla project, called MozillaES (which still exists).

Netscape was being shut down and it was clear to me that we had to strenghten Mozilla from the community side as there was no guarantee that the just created Mozilla Foundation would survive alone with just a dozen employees.

At the end of 2003, Tristan (that I knew from Usenet) contacted me to talk about the possibility of creating a European not for profit organization that would promote Mozilla and would help build a European community around the Mozilla project. This is how a bunch of Mozilla supporters created Mozilla Europe that we later presented to the larger FLOSS European community at Fosdem 2004. I quickly focused on what I was doing best, community building, and started working on bringing volunteers into translating the website into multiple languages (27), organizing/participating in events in Europe with the help of Mozilla Foundation (~20 events per year), building an internship program, guerilla marketing, PR... We also hosted firstrun/whatsnew pages for all of Firefox locales (not just European ones) for a couple of years so as to help Mozilla which was not ready for that. In parallel, I was also pursuing my involvement into other areas of the project, from writing simple extensions for Firefox and Thunderbird, working on promoting Mozilla by all means (creating multilingual Firefox download buttons, reporting bugs in bugzilla, organizing events, talking to the Spanish press...) to writing a book about Firefox and Thunderbird.

Early 2006, Paul kim, marketing director at Mozilla corporation contacted me to work on first fixing then managing the localization of Mozilla web properties, build a community of localizers around it and continue my work as a Mozilla spokeperson for Spain (basically replicate what I had done as a volunteer in Europe but as paid staff and full time, cool isn't it ;) ). Firefox 2.0 was planned for the end of the year in 40+ locales and was the first release fully localized both on the product and web sides.

I still hold this position and I also continue my community involvement, both at a personal level (like writing patches for the Linux version of Firefox, building collaboration  with other Libre software projects, empowering clever people to build cool Mozilla resources such as Mozilla Hispano, BonjourMozilla, MozFR, the European Community Blog...) and at the professional level help release Firefox, Thunderbird and all of our other projects in 80+ languages across the world.

If you want to contact me:

vendredi 4 février 2011

Ce soir c'est Fosdem, venez rencontrer Mozilla !

Comme tous les ans depuis 2004,  je vais à FOSDEM ce soir pour y passer le week end entre développeurs libristes à boire des bières refaire le monde et partager l'expérience de nos différents projets.

fosdem

Si vous avez envie de participer à un projet international et populaire (utilisé par 400 millions d'utilisateurs), quel que soit le domaine (code, traduction, promotion, place des femmes dans le libre, graphisme...) n'hésitez pas à venir sur le stand Mozilla nous en parler (vous demandez Pascal, Delphine ou William, on redirigera vers les bonnes personnes si nécessaire). On fera sûrement aussi des démos de Firefox 4 sur le stand pour les curieux qui ne l'auraient pas encore essayé ;). Voilà nos têtes pour nous repérer:

PascalDelphineWilliam
delphinewilliam

Voilà le programme pour Mozilla sur ces deux jours : Mozilla at Fosdem 2011

jeudi 3 février 2011

J'ai un patch dans Firefox 4 beta 10, pourquoi pas vous ?

Depuis aujourd'hui, dans la version Linux de Firefox,  l'icône symbolisant un document vide ou une page qui n'a pas d'icône envoyée par le serveur ont un nouvel aspect un peu plus intégré dans Gnome puisque la vieille icône en png a été remplacée par un appel à l'icône système équivalente sous Gnome. Cela signifie que si vous changez de thème Gnome et que ce thème a une icône différente pour les documents vierges, Firefox utilisera cette icône.

Ce n'est pas un gros changement dans Firefox, mais celui-ci a une saveur particulière puisque j'en suis l'auteur et que c'est mon premier vrai patch accepté pour Firefox 4.

Il s'agit du bug 621091 et voici la photo avant/après mon patch:

Quelles leçons ai-je tiré de ce travail:

  1. Ça a été moins compliqué que je ne le pensais
  2. Il est important de bien comprendre le processus de résolution d'un bug dans Bugzilla pour faire avancer les choses
  3. Des améliorations directes au logiciel sont possible même par des non-développeurs
  4. Ce que j'ai appris à travers ce bug devrait me permettre de régler d'autres problèmes simples à l'avenir
Au cours de la réalisation de ce patch, j'ai aussi trouvé une petite erreur dans un chemin de fichier pour le thème Linux (bug 627881) qui a aussi été corrigée et un bug de crash dans un cas un peu rare (bug 621009) qui sera sûrement corrigé plus tard. Il y a donc eu aussi un aspect bêta-test autour du bug initial qui était intéressant.

Les ressources qui m'ont aidé pour mon patch sont les suivantes:

Ma bonne résolution pour 2011 est désormais d'écrire un patch par mois pour Firefox et d'en avoir un tiers accepté sur l'année (par exemple j'ai un patch en cours qui rajoute des options non documentées quand on fait firefox --help dans la console, bug 619069). Je me concentre sur des patchs dédiés à Linux parce que c'est d'une part la plateforme que je connais le mieux et que d'autre part de par son statut de plateforme très minoritaire, elle reçoit moins d'attention que les autres surtout en ce qui concerne le fignolage de l'interface.

Je ne peux qu'encourager les libristes francophones à faire de même et à participer directement au code de Firefox, tout auteur d'un patch accepté aura sa photo publiée sur Bonjour Mozilla !!

lundi 17 janvier 2011

2010 yearly report

Here is my yearly report for 2010, this is the second time I do it. This year, I think that my work in the first semester was mostly around 3.6.4 and out of process plugins as well a the work related to the Windows ballot screen, while the second part of the year was more focused on Firefox 4 beta localization as well as Firefox Mobile.

One of the big achievements is probably that we were able to propose a beta cycle for Firefox 4 that also had localized web content for almost all betas, with subtitled videos and promotions. The idea was to help growing the community around beta testing for localized versions of Firefox so as to get feedback from users all around the workd. The end of the year was marked by the redesign of mozilla.com which impacted all of our locales.

I also feel that I did more coding this year than last year and that I improved at it, which is cool :)

I tried to categorize what I worked on last year in digestable sections, but of course this is always a bit artificial.

Release work (in-product pages)

  • 2 major releases: Firefox 3.6 (74 locales)  and Firefox Mobile 1.0 (18 locales)
  • 26 other releases (minor versions of Firefox and Thunderbird)
  • End of life pages for 3.0.19, reusable for future obsolete releases as well
  • Major update messaging for 3.0.x users

Community work

  • Went to 18 events (5 of them internal Mozilla events) like Fosdem, MozCamp Balkans, Ubuntu parties, Solutions Linux, OpenWorld Forum, Campus Party Valencia, Paris Web... More local events and a bit less travelling abroad this year compared to 2009, I also helped colleagues organize a few events I didn't go to.
  • With Mounir Lamouri (in charge of HTML5 Forms in Firefox 4) and Vivien Nicolas (Front-end developer for the mobile version of Firefox), we did a one day hackfest in December in the Paris office called "getting involved in beta testing and mozilla code" with local volunteers that we met at other open source events. We intend to continue this in 2011 and build a new generation of  hackers  around the Mozilla project in addition to our historical community, speciffically a community focused on mozilla code and beta testing.
  • Launched with Clarista (from the WoMoz community) bonjourmozilla.fr, a community site presenting every day a mozilla related picture, mostly presenting community members from the French community. This site is Claire's idea and I take  care of the web dev requirements (backend and front end).  The site is steadily growing in popularity with now more than 1000 unique visitors per day.
  • Worked with Laurent Jouanneau and Vivien Nicolas on generating weekly reports stats for several of the community sites I am involved in (planet.mozfr.org, www.mozfr.org, womoz.org, bonjourmozilla.fr)
  • mozilla.se now longer points to old mozilla suite 1.7 pages, now points to mozilla-europe.org/sv/
  • Created a mailing-list on mozilla-europe mailing list system for the Swedish l10n community
  • Kept on blogging in French about community building, QA and getting involved in Mozilla
  • Worked with Delphine on doing an inventory of Women working for Mozilla, resulted in a blog post

Promotional work

  • Worked on opentochoice.org localization with Stas and the marketing team
  • Worked on the ballot screen localization (messages provided by Microsoft and a mini website) with Stas
  • Gave several Radio and press interviews to the Spanish press (Onda Cero Euskadi, COPE Sevilla, Radio Euskadi, Netmedia Europe, IT Expresso, Cadena Ser)
  • regular monthly updates to the promotional snippets on the Firefox home page hosted by Google, improved the workflow with google by setting up a production tag on svn and a testing server on our side.
  • launched Student Reps website in 5 languages
  • lot of work along the year to promote globally Out of Process plugins since Firefox 3.6.4, Firefox Mobile and Firefox 4 beta in the last quarter.
  • Created pages for Firefox Home in 17 locales on the iPhone as well as product descriptions on the android marketplace (we created a special repo for "special projects" like the android market place since they don't fit in our repos,  https://svn.mozilla.org/projects/l10n-misc/trunk/)

Web developement

My work on web localization involves quite a lot of development work, since we have several sites and often build specific sites or new sections on our sites for marketing campaigns, I often have to add new features or find ways to be more flexible to allow faster release cycles:
  • Added a simple country-level geoIP support on mozilla europe in addition to our system based on HTTP accept-lang headers (we use it only for a few specific cases)
  • Improved my locale detection library, documented a demo with the source.
  • added video subtitling system for Firefox 4 beta pages using the <video> tag. This is based on the Timesheets javascript library created by Fabien Cazenave, kudos to him for helping us with it. Also added a double-subtitles view (English + translated) for quick proofreading.
  • Added new feature to the class  generating our download boxes on all mozilla sites, we can now easily mark a specific OS/locale couple as unavailable and it will be displayed as 'Not Yet Available' our our downloads listing page. Download boxes will be generated per platform with a fallback to English, so if Persian is not released for Mac for example, Windows and Linux visitors will still get proposed a localized version on our pages. Should give us more freedom to ship locales on partial OSes offerings.
  • Improved significantly page load speed on mozilla-europe.org with a specific focus on download pages so as to improve conversion rates
  • rewrote a large part of our page building system on both mozilla.com and mozilla-europe.org, documents are now easier to swap and link between the two sites, it is also much easier to use multiple templates and themes. Implemented site-wide theme switching on mozilla-europe.org but still experimental for now.
  • Mozilla.com was entirely redesigned in December with a new theme (project Nova), all localized pages ever created were migrated in that new refreshed design
  • lots of small code improvements on the sites

Other

  • One day conference at the MIAGE conference meeting of Aix, France (annual gathering of all teachers from universities teaching computing for business). Done with Fabien Cazenave who works on a seneca-like project since 2009 at University of Evry.
  • Milos Dinic, our Serbian Web localizer, is doing an internship with me on Web l10n QA and helping localizers getting involved since October
  • We moved to a new bigger office in Paris and it's already full of people, Europe is growing!
  • wrote my first Firefox UI patches (Linux version), one of them was approved \o/
  • Created a new Mozilla theme for my blog :)

vendredi 10 septembre 2010

Meilleur zoom des photos pour Firefox 4 Linux

Le bug Bug 422179 (Implement Bug 381661 (bilinear filtering of upscaled images) for Linux) vient d'être résolu et il resout un vieux problème de lissage des images quand elles sont zoomées sous Linux.

Ce bug était connu chez Ubuntu comme le bug 217908 (FFe: Pixellated Images in Firefox/Opera due to incorrect EXTEND_PAD implementation in several video drivers)

Voici un  exemple avec une petite image zoomée (faites un clic sur l'image), à gauche on voit l'image très pixelisée avec Firefox 3.6, à droite l'image est maintenant lissée avec Firefox trunk.


Bug422179.png

De manière générale, ça va régler beaucoup de petits accrocs visuels sous Linux dès que l'on joue avec le zoom de la page.

(photo d'origine)

vendredi 25 juin 2010

Le travail en cours sur le thème Linux de Firefox

Si vous voulez suivre le travail en cours sur la version Linux du futur thème Firefox 4, ça se passe dans ce bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=572482

Des ébauches sont disponibles sur le wiki de mozilla, voici une capture écran de ce que ça donnerait avec le nouveau thème ambiance d'Ubuntu:

Attention, il ne s'agit pas du thème final mais de l'ébauche en cours de ce qui est prévu (vous pouvez d'ailleurs voir dans l'historique du wiki les ébauches précédentes), il est très probable que le thème évolue beaucoup dans les mois qui viennent et en particulier lorsque les bêtas sortiront et que l'on aura des retours d'utilisation des utilisateurs.

Personnellement j'aime bien et je suis content que l'on mette des icônes avant/arrière qui sont dans le même esprit que ce qu'on utilise sur Windows/Mac plutôt que des icônes systèmes classiques, ça ressemblait un peu trop à une fenêtre nautilus ou epiphany à mon goût :) L'indicateur de chargement de page (dernier onglet) est pas mal aussi.

mercredi 23 juin 2010

Firefox 3.6.4 est sorti, le Firefox anti plantage Flash

Firefox 3.6.4 est sorti hier soir et en dehors des habituelles corrections de stabilité et de sécurité que nous intégrons dans ces versions mineures, cette version intègre une nouvelle technologie qui a été rétro-portée du future Firefox 4 en développement: l'isolation des plugins Flash, Quicktime et Silverlight dans un processus à part.

Cette fonctionnalité dans 3.6.4 est disponible pour Linux et Windows, les utilisateurs de Mac devront attendre Firefox 4 car les changements architecturaux nécessaires ne sont pas rétro-portables sur ce système du trunk à la version 3.6 aussi facilement.

Concrètement qu'est-ce que ça veut dire pour l'utilisateur ?

Lorsqu'une page contient du flash (une vidéo, un jeu, une bannière de publicité...), ce plugin est mis dans un processus séparé appelé plugin-container. Si Flash plante, Firefox n'est plus emporté dans son plantage et il suffit de recharger l'onglet pour que Flash soit rechargé (je crois me souvenir qu'un tiers des plantages de Firefox sont en fait des plantages de Flash et vu la qualité de la version Flash de Linux, c'est probablement beaucoup plus sur notre OS de prédilextion !).

Voici une capture écran d'un flash planté:

On peut faire un petit test amusant, lancez un des jeux flash ultra populaires sous Facebook comme Happy Aquarium our Farmville par exemple, jouez avec une dizaine de minutes et ouvrez votre gestionnaire de processus, voici ce que ça donne chez moi:

  • Firefox : 35Mo
  • plugin-container (= Flash) :  175Mo
Oui, vous avez bien lu, un simple petit jeu en Flash mal codé peut bouffer 175Mo !!! Jusqu'à il y a peu, on aurait accusé à tort Firefox d'être le consommateur de cette mémoire, maintenant le coupable est clair et on peut même tuer le processus pour récupérer cette mémoire rapidement :)

C'est la première fois qu'on fait un rétroportage d'une techno du prochain Firefox sur la version actuellement distribuée de Firefox, ça n'a pas été facile du tout à tous les niveaux (développeurs, contrôle qualité, traducteurs, web...) mais l'incroyable gain en stabilité que cela apporte à nos 400 millions d'utilisateurs (surtout sous Linux) explique pourquoi nous avons pris la décision de ne pas attendre Firefox 4 pour proposer cette amélioration à tous.

mardi 8 juin 2010

bonjourmozilla.fr

La communauté Mozilla francophone vous dit bonjour !

Tout juste monté, vous pouvez le suivre ici: http://bonjourmozilla.fr

Chaque matin à 10h, une nouvelle photo commentée liée à Mozilla

Ce site est monté sur un Dotclear légèrement modifié, un grand merci à Benj de l'April pour m'avoir passé ses patchs et le modèle de page de bonjourapril.fr qui ont servi de base à notre site !!

Merci à Claire qui a eu l'idée et merci à Vivien pour s'être chargé du nom de domaine et de l'hébergement.

mercredi 17 février 2010

Nouveau jeu d'icônes Vista dans les compils nocturnes de Firefox

Dans les compilations quotidiennes de Firefox (le tronc) Il y a un nouveau jeu d'icônes pour la version Windows. On notera aussi que les boutons d'arrêt et de rechargement de la page sont maintenant fusionnés (mais ça fait déjà quelques semaines). Le nouveau jeu d'icônes est plus discret et prend moins de place horizontale que l'ancien (je ne sais pas si ce sont les icônes finales).

Je ne suis pas utilisateur régulier de Windows donc pas forcément le meilleur juge mais ça me semble mieux que les icônes actuelles.

Voir la capture d'écran ci-dessous avec en haut les nouvelles icônes et en bas Firefox 3.5.7

jeudi 14 janvier 2010

Tester Firefox avec un profil kleenex

Il est possible de tester (sous Linux) Firefox avec un profil temporaire sans avoir à en créer un depuis le gestionnaire de profils puis avoir à faire du nettoyage. C'est intéressant par exemple si on veut rapidement tester une régression et qu'on veut être sûr que ce n'est pas lié à un problème de profil, ou bien si on a un profil très personnalisé (genre plein de modifications dans about:config) et qu'on ne veut pas les réinitialiser juste pour un test.

Pour cela, il faut lancer Firefox en ligne de commande et utiliser le paramètre -Profile qui pointe vers un dossier vide existant situé où vous voulez sur le disque.

ex:

firefox -Profile /home/pascal/temp/profile

Voici un exemple de fichier bash qui vous permettra de lancer un firefox de développement avec un profil temporaire :

#!/bin/bash
# chemin du profil temporaire
target=${HOME}'/tempmoz/'
# chemin de Firefox
fx=${HOME}'/applis/Firefox-Trunk/firefox'
echo "== Lancement de Firefox dans un profil temporaire =="
mkdir $target
$fx -Profile $target --no-remote
echo "Effacement du profil temporaire à la fermeture de Firefox"
rm -rf $target
echo "Profil temporaire effacé"

L'option --no-remote vous permettra d'ouvrir ce Firefox en parallèle d'un autre Firefox déjà ouvert, votre Firefox dans une version stable avec votre profil habituel par exemple.