Carnet de notes

Entries list

mercredi 6 juillet 2022

Utiliser browser-sync avec le serveur de développement de PHP

Je développe mes micro-sites avec le serveur de développement intégré à PHP et rarement avec un vrai serveur qui tourne en local. C'est rapide à mettre en œuvre, j'ai les logs et les erreurs dans la console de mon éditeur (Terminus dans Sublime Text), c'est simple et pratique.

Quand j'ai fini ma tâche, un simple CTRL+C pour arrêter le serveur et c'est bon.

J'ai même un alias bash pour lancer ce serveur dans un terminal quand je teste juste une bricole temporaire (alias phps="php -S localhost:8082")

À la racine de mes dépôts, j'ai en général un fichier bash exécutable (appelé run, je fais dans l'originalité…) qui lance le serveur intégré PHP en lui indiquant quel dossier est le dossier public ainsi que mon fichier de démarrage pour router les requêtes vers le front controller (ce qui est fait par un fichier .htaccess pour mes sites sous Apache en production).

Il existe un paquet npm, browser-sync, qui permet de créer un serveur local, d'ouvrir le navigateur et de surveiller les changements locaux sur les fichiers du site et de recharger automatiquement l'onglet dès qu'un fichier a été modifié. Comme j'ai déjà node.js d'installé, je me suis mis à utiliser browser-sync uniquement pour ne pas passer mon temps à rafraîchir l'onglet dès que je fais un changement, que ce soit un changement code côté serveur ou côté client. Ça s'installe avec npm install -g browser-sync.

Voilà en gros ce que je mets à la racine de mes sites dans ce script bash (les paramètres de la ligne lançant le serveur PHP sont bien sûr à adapter à votre code):

#! /usr/bin/env bash

function ctrl_c() {
    pkill browser-sync
}

if command -v browser-sync &> /dev/null; then
    browser-sync start --proxy "localhost:8082" --files "**/*" &
fi

php -S localhost:8082 -t public/ app/inc/router.php

trap ctrl_c INT

Et comme une vidéo est peut être plus claire qu'une longue explication, voilà ce que ça donne à l'usage :


Le seul inconvénient est que si vous générez une erreur fatale sur un fichier PHP, vous devrez recharger la page manuellement.

Voilà, pour l'astuce du jour, en espérant que ça serve à d'autres.

mercredi 15 juin 2022

Mettre une page HTML locale comme page de nouvel onglet dans Firefox

Depuis 25 ans, j'ai une vieille habitude avec mon navigateur qui est de maintenir une page HTML de liens catégorisés que j'utilise tout le temps et que j'ai en page d’accueil.

C'est un simple fichier HTML sur mon disque, pas de serveur web qui tourne. C'est très « old school » je sais, mais ça marche très bien pour mon usage.

Dans Firefox, on peut mettre le lien file:///chemin/vers/mon/fichier.html directement dans la page des paramètres, jusque là tout va bien.

Par contre on ne peut pas depuis les préférences redéfinir la page pour l'ouverture des nouveaux onglets, or je commence souvent par ouvrir un nouvel onglet avec CTRL+T avant d'aller sur une de mes pages favorites, donc là je serais obligé de cliquer sur l'icône de page d'accueil ou de faire un ALT+Orig pour charger ma page.

Firefox étant très personnalisable, il est possible de redéfinir ça avec un fichier autoconfig de cette manière :

Création d'un fichier autoconfig.cfg dans le dossier d'installation de Firefox avec ce contenu

var {classes:Cc,interfaces:Ci,utils:Cu} = Components;

// Set new tab page
Cu.import("resource:///modules/AboutNewTab.jsm");
var newTabURL = "file:///chemin/vers/mon/fichier.html";
AboutNewTab.newTabURL = newTabURL;

Création d'un fichier autoconfig.js dans le sous-dossier de l'installation firefox defaults/pref/ :

pref("general.config.filename", "autoconfig.cfg");
pref("general.config.obscure_value", 0);

Plus d'information sur autoconfig : Configurer Firefox avec AutoConfig - Mozilla Support

mercredi 10 janvier 2018

User Style for bugzilla.mozilla.org

Yesterday, I was talking with Kohei Yoshino (the person behind the Bugzilla Quantum effort that recently landed significant UX improvements to the header strip) about some visual issues I have on bugzilla.mozilla.org which basically boil down to our default view being a bit too noisy for my taste and not emphasizing enough on the key elements I want to glance at immediately when I visit a bug (bug Status, description, comments).

Given that I spend a significant amount of time on Bugzilla and that I also spend some time on Github issues, I decided to see if I could improve our default theme on Bugzilla with a user style to make it easier on the eyes and also closer visually to Github, which I think is good when you use both on a daily basis.

After an evening spent on it, I am happy with the result so I decided to share it via UserStyle.org. To install this style on Firefox, you need an extension such as Stylish or Styl-us (I use the former), go to the user style page above and install it. Load a bug (ex: Bug 1406825) and you should see the result. Note that this CSS patches the default theme on bugzilla.mozilla.org, not the old one. You need to have the option "Use modal user interface" set to ON in your bugzilla preferences (that's the default value).

Here are a few Before/After screenshots:

Screenshot-2018-1-10 1406825 - Enable Custom elements v1 on Nightly by default.png
Overview and header before

Screenshot-2018-1-10 1406825 - Enable Custom elements v1 on Nightly by default(1).png

Overview and header after

Screenshot-2018-1-10 1408044 - Stop shipping about (2).png
Comment before
[object Object]
 
Comment after

That's a v1 (a v1.1 actually), it uses sans-serif fonts instead of monospace, styles replies and comments in a more modern way, removes some visual elements and emphasizes on readibility of comments. Cheers

mardi 17 janvier 2017

Shell script to record a window into an animated GIF

Part of my work consists of spreading what new features land on Nightly for our Twitter account and sometimes an animated Gif to show how a new feature works or how to activate it easier than trying to squeeze explanations into 140 characters.

Initially I was doing a video screencast and then converting the video into a Gif but I wasn't happy with the quality of the end result and the whole process was time consuming. I ended up searching for a better solution and found out about byzanz-record, a command that allows screencasting directly as a Gif and I think is easier to use for a Linux user than playing with ffmpeg. I ended up tweaking a script I found on Stackoverflow and this is what I use in the end:

Other people using Linux may have similar needs so maybe that will help you guys discover this command.

lundi 6 juin 2016

Launching Firefox Nightly with a temporary profile, from bash

If you are a Firefox Nightly user and you think you have found a bug in Firefox, a regression maybe, then you should wonder if the bug is in Firefox or if your data profile is causing it.

Maybe you changed some setting in about:config? Maybe you have an add-on causing problems? In that case, you might be hesitent to file a bug. Don't be!

Just try to reproduce your bug in a fresh data profile, if you are on Linux or MacOS you can even use this small script that I am using that automates the creation of a temporary user profile, name it Nightly_temp_profile.sh, make the file executable with chmod +x and launch the script from your terminal. Done.

Here is below the script I am using to do that, as you can see I put it as a gist on GitHub for easy sharing. If you use it, like it or want to improve it, don't hesitate to contact me (pascal AT mozilla DOT com)!

PS1: Yes, this is blatant self-plagiarism of a post I wrote in French in 2010 ;)

PS2: This script comes with no guarantee, it has been working for me on Ubuntu for years, it might not work at all for you.

mardi 31 mai 2016

Firefox Nightly, nous voilà !

Ce billet est en grande partie une version en français de mon billet en anglais Let's give Firefox Nightly some love! que j'ai publié il y a un peu moins de deux semaines.

Après une décennie dédiée à rendre les sites web Mozilla disponibles dans des dizaines de langues, à construire des communautés de traducteurs dans le monde entier et à créer des outils de contrôle qualité, des tableaux de bord et des APIs pour nous aider à livrer nos logiciels et sites dans toutes les langues, j'ai récemment quitté le département « Localization » afin de travailler sous les ordres de Doug Turner et de mettre en place un nouveau projet bénéficiant directement aux équipes Plateforme et Firefox !

Je suis désormais responsable d'un projet visant à faire de Nightly un canal maintenu à part entière (tout comme nous avons les canaux Aurora, Bêta et Release) et dont l'objectif sera d'impliquer notre communauté d'utilisateurs les plus techniques dans le projet Mozilla à travers des activités ayant un impact mesurable sur la qualité même de nos logiciels.

Voici quelques uns des objectifs que j'aimerais nous voir atteindre en 2016-2017 :

  • Doubler le nombre d'utilisateurs de Nightly afin de détecter beaucoup plus tôt les régressions, plantages et problèmes de compatibilité avec le Web. Une régression détectée et rapportée juste après que le patch la causant a été intégré sur mozilla-central est un simple backout (retour arrière) du dit code, cette même régression rapportée des semaines voire des mois plus tard via Aurora, Bêta ou bien même découverte sur la version en production de Firefox peut représenter un problème bien plus important.

  • Faire de Firefox Nightly un véritable point d'entrée pour les utlisateurs les plus techniques souhaitant s'impliquer dans Mozilla et nous aider à livrer du logiciel (qualité, code, compatibilité web, sécurité…). Dans le cadre de Firefox bien sûr, mais aussi dans celui de tout projet Mozilla pouvant bénéficier d'une plus grande participation externe.

  • Faire de Firefox Nightly un logiciel plus adapté à ces contributeurs techniques. Cela signifie dans un premier temps d'utiliser les canaux de communication qui y sont intégrés (about:home, tuiles, pages de premier démarrage et de mise à jour…) afin de communiquer des informations adaptées à une audience technique et proposer des ressources, des activités et des pistes techniques pour participer au projet Mozilla. J'ai aussi l'intention d'apporter une attention tout particulière à trois pays (l'Allemagne, la France et l'Espagne) où nous avons des communautés locales fortes, des employés et des locaux pouvant accueillir des événements et nous permettant d'interagir plus facilement avec les bénévoles.

Je ne travaillerai pas seul sur ce projet, Sylvestre Ledru (Release Managment Lead) a créé une nouvelle équipe composée de Marcia Knous aux États-Unis et de Calixte Denizet en France qui travaillera à améliorer la qualité du canal Nightly et analysera les plantages et régressions. Des membres d'autres départements (Participation, MDN, Security, Developer Relations…) ont aussi montré un grand intérêt pour ce projet et ont annoncé leur intention de s'impliquer.

Mais d'abord et avant tout, j'ai bien l'intention d'impliquer la communauté Mozilla et j'espère aussi attirer des personnes qui ne sont pas encore mozilliens et faire avec elles de ce projet « Nightly Reboot » un retentissant succès !

Quelques ressources pour s'impliquer :

  • Il existe un canal IRC #nightly sur le serveur irc.mozilla.org, mon pseudo là bas est pascalc, n'hésitez-pas à m'y contacter si vous désirez apporter votre pierre à l'édifice, en savoir plus sur l'état du projet ou bien proposer vos propres idées (le canal est anglophone).

  • Si vous désirez télécharger Nightly, rendez-vous sur nightly.mozfr.org et vous y trouverez des versions en français. Le site officiel de Mozilla est nightly.mozilla.org mais il ne propose que des versions en anglais et donner des retours sur la qualité de la traduction est aussi une manière d'améliorer Firefox !

  • Si vous voulez découvrir au jour le jour tous les trucs sympa qui arrivent sur Nightly, suivez le compte Twitter @FirefoxNightly

  • Si vous êtes déjà utilisateur de Nightly et que vous rapportez des bugs sur bugzilla.mozilla.org, ajoutez le texte [nightly-community] dans le champ whiteboard de vos rapports de bugs, cela nous permettra de mesurer l'impact de notre communauté Nightly sur Bugzilla.

Intéressé par ce projet ? N'hésitez-pas à vous impliquer et ne manquez-pas de me contacter si vous avez une suggestion ou une idée qui pourrait s'inscrire dans ce projet. Plusieurs personnes m'ont déjà donné des retours des plus intéressants !

Vous pouvez me contacter (en anglais, français ou espagnol) via les moyens de communication suivants : pascal À mozilla POINT com IRC sur Moznet et Freenode: pascalc Twitter: @pascalchevrel

jeudi 19 mai 2016

Let's give Firefox Nightly some love!

After a decade working on making Mozilla Web properties available in dozens of languages, creating communities of localizers around the globe and building Quality Assurance tools, dashboards and APIs to help ship our software and websites internationally, I recently left the Localization department to report to Doug Turner and work on a new project benefiting directly the Platform and Firefox teams!

I am now in charge of a project aiming to turn Nightly into a maintained channel (just as we have the Aurora, Beta and Release channels) whose goal will be to engage our very technical Nightly users into the Mozilla project in activities that have a measurable impact on the quality of our products.

Here are a few key goals I would like us to achieve in 2016-2017:

  • Double the number of Nightly users so as to detect much earlier regressions, crashes and Web compatibility issues. A regression detected and reported a couple of days after the code landed on mozilla-central is a simple backout, the same regression reported weeks or even months later in the Aurora, Beta or even discovered on the Release channel can be much more work to get fixed.

  • Make of Firefox Nightly a real entry point for the more technical users that want to get involved in Mozilla and help us ship software (QA, code, Web Compatibility, security…). Not only for Firefox but also to all technical Mozilla projects that would benefit from a wider participation.

  • Make of Firefox Nightly a better experience for these technical contributors. This means as a first step using the built-in communication channels (about:home promotional snippets, default tiles, first run / what's New pages…) to communicate information adapted to technical users and propose resources, activities and ways to participate in Mozilla that are technical by nature. I also want to have a specific focus on three countries, Germany, France and Spain, where we have strong local communities, staff and MozSpaces and can engage people more easily IRL.

I will not work on that alone, Sylvestre Ledru, our Release Management Lead, has created a new team (with Marcia Knous in the US and Calixte Denizet in France) to work on improving the quality of the Nightly channel and analyse crashes and regressions. Members of other departments (Participation, MDN, Security, Developer Relations…) have also shown interest in the project and intend to get involved.

But first and foremost, I do intend to get the Mozilla community involved and hopefully also get people not involved in Mozilla yet to join us and help us make of this "Nightly Reboot" project a success!

A few pointers for this project:

  • There is an existing #nightly IRC channel that we are restoring with Marcia and a few contributors. I am pascalc on IRC and I am in the CET timezone, don't hesitate to ping me there if you want to propose your help, know more about the project or propose your own ideas.

  • Marcia created a "Nightly Testers" Telegram channel, ping me if you are already using Nightly to report bugs and want to be added

  • For asynchronous communication, there is a Nightly Testers mailing list

  • If you want to download Nightly, go to nightly.mozilla.org. Unfortunately the site only proposes en-US builds and this is definitely something I want to get fixed! If you are a French speaker, our community maintains its own download site for Nightly with links to French builds that you can find at nightly.mozfr.org, otherwise other localized builds can be found on our FTP.

  • If you want to know all the new stuff that gets into our Nightly channel, follow our @FirefoxNightly twitter account

  • If you are a Nightly user and report a bug on https://bugzilla.mozilla.org, please put the tag [nightly-community] in the whiteboard field of your bug report, this allows us to measure the impact of our active Nightly community on Bugzilla.

Interested? Do get involved and don't hesitate to contact me if you have any suggestion or idea that could fit into that project. Several people I spoke with in the last weeks gave me very interesting feedback and concrete ideas that I preciously noted!

You can contact me (in English, French or Spanish) through the following communication channels:

  • Email: pascal AT mozilla DOT com
  • IRC on Moznet and Freenode: pascalc
  • Twitter: @pascalchevrel

update 15:33 See also this blog post by Mozilla Engineer Nicholas Nethercote I want more users on the Nightly channel

vendredi 13 mai 2016

Mettre son mutualisé OVH en SSL (via Let's Encrypt)

Si vous avez un site en mutualisé sous OVH, il est aussi disponible par défaut en https via Let's Encrypt. Il ne vous reste plus qu'à rediriger tout votre traffic vers https en ajoutant ça à votre fichier .htaccess à la racine du site:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.domaine.com/$1 [R,L]

Si vous avez un blog sous Dotclear, vérifiez bien dans votre panneau d'administration que tout ce qui contient une URL de votre site est bien en https et dans le fichier inc/config.php ajoutez cette ligne :

define('DC_ADMIN_SSL',1);

Voilà, maintenant tout votre site est en https.

samedi 14 novembre 2015

Dotclear et PHP 7

Un petit billet pense-bête, c'est souvent des trucs que je poste sur Twitter en fait.

Dotclear est compatible PHP 7

Et oui, Dotclear fonctionne parfaitement sous PHP 7, j'ai mis mon site perso en PHP 7 (RC5) aujourd'hui et le seul réglage à faire était de changer le fournisseur mysql dans le fichier de config pour le remplacer par mysqli, en effet le vieux pilote mysql de 2004 a définitivement été enlevé de PHP 7, dans votre fichier inc/config.php si vous utilisez mysql, il faut donc juste changer cette ligne:

define('DC_DBDRIVER','mysql');

par celle-ci :

define('DC_DBDRIVER','mysqli');

Les hébergements OVH en mutualisés peuvent être mis en PHP 7 !

Voilà le tutoriel:

Testez PHP7 en avant première

En gros c'est fastoche, il suffit d'avoir un fichier .ovhconfig à la racine du site avec ça dedant :

 app.engine=php
 app.engine.version=7.0
 http.firewall=none
 environment=production

Voilà, votre site est en PHP 7 et il dépote !

Conclusion

PHP 7 sort d'ici en gros la fin du mois, les gains de perfs sont prodigieux, les nouvelles features sont nombreuses et toutes les applis populaires, même des plus confidentielles comme Dotclear, tournent très bien avec. Chapeau au travail de rétro-compatibilité fait par la core team de PHP tout en assurant le plein de nouveautés, de nettoyages et des perfs super même sur des hébergements à 2€ par mois.

Dès que je peux, je migre tout ce que j'ai en PHP 7 :)

vendredi 13 novembre 2015

Follow-up to my current migration to Atom Editor

After my recent blog post announcing that I was transisionning from Sublime Text to Atom, I got a couple of nice surprises from the community that fix some of the annoyances I have with Atom or that will just make it better.

How to fix the keyboard shortcut to comment out a single line on a French keyboard

Just click on the  'Edit/Open your Keymap' menu item and put that line at the bottom:

'.platform-linux atom-text-editor': 'ctrl-:': 'editor:toggle-line-comments'

That will make the shortcut work along with the keyboard localization package installed for French (and Belgian French too). If you are on Windows, use the selector .platform-win32 (I don't know what the MacOS one is).

How to have a basic project mode like in Sublime text and be able to switch projects

Install the Project Manager package (thanks to Giorgio Maone, mozilla Add-on dev for the tip), it's roughly equivalent in functionnality to Sublime's built-in project manager and it seems good enough to me. One caveat is that switching from one project to another is a bit slow.

Support for .lang Mozilla syntax files in Atom

This is a nice gift from my colleague Francesco Lodolo, he made a syntax highlighter for the DotLang localization text format we use for mozilla.org and other sites for which we need fast translations for, this will be useful to me but also to Mozilla localizers that could want to use Atom to edit their translations, here is the package:

DotLang language support in Atom

And a screenshot to give you an idea of the end result.

langAtom.png
 
 

New Version of Atom 1.2 stable and 1.3beta released

This is always nice to have, I like new stuff :) Here is their blog post about it: Atom 1.2

Codeintel equivalent in Atom for PHP ?

There is a series of packages called php-integrator-* (base, autocomplete plus, tooltips, annotations...) that are supposedly providing the equivalent services as Codeintel  but after indexing a single project for an hour (bringing my computer to its knees), I couldn't make it work. On a couple of occasions I saw a nice tooltip for a method indexed, but I don't know how I triggered it and I don't get any autocompletion of classes while typing. I guess it's still pretty much alpha stuff  but hopefully that will work some day. Also I suspect it tried to index all of my dependencies in the vendor directory… I only need my own code to be indexed, not the external dependencies or a whole framework. The good news I guess is that something is developped and I might get that feature one day.

Atoum integration in Atom ?

Another nice surprise from the community, looks like Julien Bianchi, one of Atoum developers is working on a package to get Atoum in Atom following my request on Twitter:

Capture_d_ecran_2015-11-13_a_06.26.07.png

 

Many many thanks to him, I am always amazed at how nice the people in the Atoum project are with their users :)

UPDATE: here is the Atoum plugin and a video demoing it

Conclusion of the day

My transition is going well and progressing quickly, today I coded exclusively in Atom, I found some small bugs and needed to get my marks in the new environment  but it's not a revolution compared to Sublime and so far I felt rather productive. Most of the problems I have really are in the realm of polishing and finding where an option is set up or what a new shortcut is, that said, the experience is satisfying and I probably didn't get today more headaches than I had when I switched from Geany to Sublime a couple of years ago. So far, so good :)

 

mercredi 11 novembre 2015

Progressively moving from Sublime Text 3 to Atom

I am currently moving from Sublime Text (I am a happy paying customer) to Atom. I love Sublime but unfortunately, the project is dying and I want to invest in tools that are maintained in the long term.

Sublime 3 is still not release after years, the only developper completely disappeared for months and this is not the first time it happens, this is also not an open source project which means that the project will die if this only developper leaves. The support forum is filled with spam and basically, there is no roadmap nor any official commitment to pursue the project.

Of course, Sublime still works fine, but there are already reports of it getting crashy on newer version of Linux, the addons ecosystem is slowing down and in the meantime, there is Atom created by the vibrant GitHub community with regular releases and attractive features (mainly clearly copied from Sublime).

So far I hadn't switched because Atom was not ready for prime time, despite its 1.0 number. It was just not usable on my machine for any serious dev work.

That said, the recent 1.2beta builds did get improvements and many extensions are actually working around core bugs that were making Atom a no go until now. So today, I am trying to use Atom 50% of the time instead of 10% as before.

So as to get a working setup, I did have to install a few must have extensions that just make the app usable. First and foremost, I needed Atom to work on my X1 carbon which boasts a 2560*1440 resolution and well, hiDPI is not Chrome Forte, I couldn't even read the microscopic UI and using CSS to fix that was a pain and not scalable when you switch your screen to a external monitor or for a presentation with a different resolution, one point for Sublime which just respects my OS DPI settings. Fortunately, this extension fixes it all:

HiDPI

The second thing I needed was decent speed, it's still lagging behind Sublime but the recent Atom builds over the summer did make a significant effort in that respect and the boot up time is now acceptable for my daily use.

The third problem which is probably still a blocker for me is that Atom basically sucks at managing non-US Qwerty keyboards, like seriously, it's bad. Most of the shortcuts didn't work on my French keyboard and this is the same problem for most keyboards in the world. Again this seems to be a Chrome engine limitation according to Github Issues and it should be fixed upstream in a few versions of Chrome from now. In the meantime, this package is an acceptable workaround that makes many non-US keyboards work more or less with Atom:

Keyboard Localization

There is one big caveat and one of my day to day blockers, I can't comment out a single line from a keyboard shortcut, if that simple bug were fixed in the package or Atom, I would certainly use it 75% of the time and not 50%.

In terms of UI and color scheme, it took me some time to find something agreable to the eyes (On Sublime, I tended to like Cobalt color scheme) but Atom Light for the UI and Code Dark for color scheme are rather agreable. Of course I am a PHP developper, so my color scheme tends towards having clear syntax in this language. The 1.2beta builds also stopped opening context menu in silly locations on my screen instead of below my cursor, another pain point gone.

The Zen and minimap extensions are just must haves for Sublime defectors like me:

Other extensions I use a lot are available:

In terms of PHP specific extensions, I found several equivalents to what I use in Sublime:

There are other PHP extensions I installed but didn't have much chance with them yet, some require configuration files, others don't seem to work or conflict with the keyboard shortcuts (stuff like php-cs-fixer).

The one extension I really miss from Sublime is Codeintel that autocompletes method names and gives tootips explaining methods from the data extracted from Dockblocks in classes. I really wish this will be ported some day or that an equivalent feature will be created.

I also need to see how to launch simple scripts on saving files, to launch Atoum unit tests for example, hopefully somebody will hack it and I won't have to dig into doing it myself ;)

On the plus side for Atom, Git/GitHub integration in the UI is obviously out of the box, I didn't have to install any extension for that. The UI is also improving regularly and just more pleasing to the eyes than Sublime's, which is a bit too geeky to my taste. There is a real preference panel where you can manage your extensions and many interesting small features for which you don't have to edit configuration files like in Sublime (seriously, setting your font size in a JSON file is not user friendly).

It does have its share of bugs though, for example color syntaxing seems to choke on very large files (like 2MB) and everything is displayed as text (not cool for XML or long PHP arrays for example). There are also sometimes lock ups of the UI, often when I switch to preferences.

But all in all, the experience is getting better over time and I think that I found a credible alternative to Sublime for 2016. I know there are other options, I actually have PHPStorm for example which is super powerful, but just as with Eclipse, Netbeans and other heavy-weight IDEs, I have better things to do in my life than spend 3 months just learning the tool to be able to edit a couple of files and I don't buy the argument that this is a life investment ;)

The one aspect of Atom that I think is still basic is project management, I need something just as simple as Sublime but I may just have overlooked the right extension for that and anyway, it's such a popular request that I have no doubt it will be in core at some point.

That's it, if you haven't tried Atom in a while and like me are worried about Sublime Text future, maybe that post will make you want to give it a try again.

I still love Sublime, even in its beta form it is a solid and complete product and I would be happy to keep on paying for it and get updates, but unfortunately, its days seem to be doomed because all the eggs are in the same basket of a single developer that may have good reasons to have vanished, but I just need work done and there are enough bus factor people in my own job to afford having also this problem with the main tool I use on a daily basis. I'd be happy to be proven wrong and see a Sublime Renaissance, the only dev is obviously incredibly talented and deserves to make a living out of his work, I just think he got overwelmed by the incredible success he had with his product and just can't keep up. At some point, open source or prioritary software, you need a team to scale up and meet your customers satisfaction. I do hope that if he completely gives up on this project to pursue other adventures, he will open source Sublime Text and not let all this coding beauty disappear in the prioritary world limbos forever :)

PS: And yes, I prepared this blog post in Markdown syntax thanks to the built-in Markdown previewing pane in Atom ;)

jeudi 11 juin 2015

Travis CI plus rapide

Si vous utilisez Travis pour l'intégration continue de vos projets, il est possible d'avoir des tests lancés plus rapidement en forçant l'utilisation de leur nouvelle infrastructure sous Docker.

Attention, si vous avez besoin de commandes en sudo pour installer des paquets par exemple, ce n'est pas possible dans cette infrastructure.

Pour forcer l'utilisation de Docker au lieu d'une VM classique, il faut rajouter sudo: false en haut de son fichier .travis.yml. PLus d'informations dans cet article : Using container-based infrastructure

En théorie, Travis devrait détecter automatiquement s'il y a utilisation de commandes sudo et utiliser une build dans un conteneur mais dans mon cas en tous cas, sans le mentionner explicitement, je tombais toujours sur une VM classique.

lundi 30 juin 2014

My Q2-2014 report

Summary of what I did last quarter (regular l10n-drivers work such as patch reviews, pushes to production, meetings and past projects maintenance excluded) .

Australis release

At the end of April, we shipped Firefox 29 which was our first major redesign of the Firefox user interface since Firefox 4 (released in 2011). The code name for that was Australis and that meant replacing a lot of content on mozilla.org to introduce this new UI and the new features that go with it. That also means that we were able to delete a lot of old content that now had become really obsolete or that was now duplicated on our support site.

Since this was a major UI change, we decided to show an interactive tour of the new UI to both new users and existing users upgrading to the new version. That tour was fully localized in a few weeks time in close to 70 languages, which represents 97.5% of our user base. For the last locales not ready on time, we either decided to show them a partially translated site (some locales had translated almost everything or some of the non-translated strings were not very visible to most users, such as alternative content to images for screen readers) or to let the page fall back to the best language available (like Occitan falling back to French for example).

Mozilla.org was also updated with 6 new product pages replacing a lot of old content as well as updates to several existing pages. The whole site was fully ready for the launch with 60 languages 100% ready and 20 partially ready, all that done in a bit less than 4 weeks, parallel to the webdev integration work.

I am happy to say that thanks to our webdev team, our amazing l10n community and with the help of my colleagues Francesco Lodolo (also Italian localizer) and my intern Théo Chevalier (also French localizer), we were able to not only offer a great upgrading experience for the quasi totality of our user base, we were also able to clean up a lot of old content, fix many bugs and prepare the site from an l10n perspective for the upcoming releases of our products.

Today, for a big locale spanning all of our products and activities, mozilla.org is about 2,000 strings to translate and maintain (+500 since Q1), for a smaller locale, this is about 800 strings (+200 since Q1). This quarter was a significant bump in terms of strings added across all locales but this was closely related to the Australis launch, we shouldn't have such a rise in strings impacting all locales in the next quarters.

Transvision releases

Last quarter we did 2 releases of Transvision with several features targeting out 3 audiences: localizers, localization tools, current and potential Transvision developers.

For our localizers, I worked on a couple of features, one is quick filtering of search results per component for Desktop repositories (you search for 'home' and with one click, you can filter the results for the browser, for mail or for calendar for example). The other one is providing search suggestions when your search yields no results with the best similar matches ("your search for 'lookmark' yielded no result, maybe you were searching for 'Bookmark'?").

For the localization tools community (software or web apps like Pontoon, Mozilla translator, Babelzilla, OmegaT plugins...), I rewrote entirely our old Json API and extended it to provide more services. Our old API was initially created for our own purposes and basically was just giving the possibility to get our search results as a Json feed on our most popular views. Tools started using it a couple of years ago and we also got requests for API changes from those tool makers, therefore it was time to rewrite it entirely to make it scalable. Since we don't want to break anybody's workflow, we now redirect all the old API calls to the new API ones. One of the significant new service to the API is a translation memory query that gives you results and a quality index based on the Levenshtein distance with the searched terms. You can get more information on the new API in our documentation.

I also worked on improving our internal workflow and make it easier for potential developers wanting to hack on Transvision to install and run it locally. That meant that now we do continuous integration with Travis CI (all of our unit tests are ran on each commit and pull request on PHP 5.4 and 5.5 environments), we have made a lot of improvements to our unit tests suite and coverage, we expose to developers peak memory usage and time per request on all views so as to catch performance problems early, and we also now have a "dev" mode that allows getting Transvision installed and running on the PHP development server in a matter of minutes instead of hours for a real production mode. One of the blockers for new developers was the time required to install Transvision locally. Since it is a spidering tool looking for localized strings in Mozilla source repositories, it needed to first clone all the repositories it indexes (mercurial/git/svn) which is about 20GB of data and takes hours even with a fast connection. We are now providing a snapshot of the final extracted data (still 400MB ;)) every 6 hours that is used by the dev install mode.

Check the release notes for 3.3 and 3.4 to see what other features were added by the team (/ex: on demand TMX generation or dynamic Gaia comparison view added by Théo, my intern).

Web dashboard / Langchecker

The main improvement I brought to the web dashboard is probably this quarter the deadline field to all of our .lang files, which allows to better communicate the urgency of projects and for localizers are an extra parameter allowing them to prioritize their work.

Theo's first project for his internship was to build a 'project' view on the web dashboard that we can use to get an overview of the translation of a set of pages/files, this was used for the Australis release (ex: http://l10n.mozilla-community.org/webdashboard/?project=australis_all) but can be used to any other project we want to define , here is an example for the localization of two Android Add-ons I did for the World Cup that we did and tracked with .lang files.

We brought other improvements to our maintenance scripts for example to be able to "bulk activate" a page for all the locales ready, we improved our locamotion import scripts, started adding unit tests etc. Generally speaking, the Web dashboard keeps improving regularly since I rewrote it last quarter and we regularly experiment using it for more projects, especially for projects which don't fit in the usual web/product categories and that also need tracking. I am pretty happy too that now I co-own the dashboard with Francesco who brings his own ideas and code to streamline our processes.

Théo's internship

I mentionned it before, our main French localizer Théo Chevalier, is doing an internship with me and Delphine Lebédel as mentors, this is the internship that ends his 3rd year of engineering (in a 5 years curriculum). He is based in Montain View, started early April and will be with us until late July.

He is basically working on almost all of the projects I, Delphine and Flod work on.

So far, apart from regular work as an l10n-driver, he has worked for me on 3 projects, the Web Dashboard projects view, building TMX files on demand on Transvision and the Firefox Nightly localized page on mozilla.org. This last project I haven't talked about yet and he blogged about it recently, in short, the first page that is shown to users of localized builds of Firefox Nightly can now be localized, and by localized we don't just mean translated, we mean that we have a community block managed by the local community proposing Nightly users to join their local team "on the ground". So far, we have this page in French, Italian, German and Czech, if your locale workflow is to translate mozilla-central first, this is a good tooll for you to reach a potential technical audience to grow your community .

Community

This quarter, I found 7 new localizers (2 French, 1 Marahati, 2 Portuguese/Portugal, 1 Greek, 1 Albanian) to work with me essentially on mozilla.org content. One of them, Nicolas Delebeque, took the lead on the Australis launch and coordinated the French l10n team since Théo, our locale leader for French, was starting his internship at Mozilla.

For Transvision, 4 people in the French community (after all, Transvision was created initially by them ;)) expressed interest or small patches to the project, maybe all the efforts we did in making the application easy to install and hack are starting to pay, we'll probably see in Q3/Q4 :)

I spent some time trying to help rebuild the Portugal community which is now 5 people (instead of 2 before), we recently resurrected the mozilla.pt domain name to actually point to a server, the MozFR one already hosting the French community and WoMoz (having the French community help the Portuguese one is cool BTW). A mailing list for Portugal was created (accessible also as nntp and via google groups) and the #mozilla-portugal IRC channel was created. This is a start, I hope to have time in Q3 to help launch a real Portugal site and help them grow beyond localization because I think that communities focused on only one activity have no room to grow or renew themselves (you also need coding, QA, events, marketing...).

I also started looking at Babelzilla new platform rewrite project to replace the current aging platform (https://github.com/BabelZilla/WTS/) to see if I can help Jürgen, the only Babelzilla dev, with building a community around his project. Maybe some of the experience I gained through Transvision will be transferable to Babelzilla (was a one man effort, now 4 people commit regularly out of 10 committers). We'll see in the next quarters if I can help somehow, I only had time to far to install the app locally.

In terms of events, this was a quiet quarter, apart from our l10n-drivers work week, the only localization event I was in was the localization sprint over a whole weekend in the Paris office. Clarista, the main organizer blogged about it in French, many thanks to her and the whole community that came over, it was very productive, we will definitely do it again and maybe make it a recurring event.

Summary

This quarter was a good balance between shipping, tooling and community building. The beginning of the quarter was really focused on shipping Australis and as usual with big releases, we created scripts and tools that will help us ship better and faster in the future. Tooling and in particular Transvision work which is probably now my main project, took most of my time in the second part of the quarter.

Community building was as usual a constant in my work, the one thing that I find more difficult now in this area is finding time for it in the evening/week end (when most potential volunteers are available for synchronous communication) basically because it conflicts with my family life a bit. I am trying to be more efficient recruiting using asynchronous communication tools (email, forums…) but as long as I can get 5 to 10 additional people per quarter to work with me, it should be fine with scaling our projects.

lundi 7 avril 2014

My Q1-2014 report

Here is what I did in Q1

Tools and code

This quarter we have made 2 releases of Transvision (3.1 and 3.2). For 3.1, most of the credit goes to my colleague (and Italian localizer) Francesco Lodolo who integrated his productization scripts into the app and worked on redesigning the menus and making the app better in responsive mode, my work on 3.1 was limited on performance patches and release management. Transvision 3.2 received a lot more of my code as it integrated one major new feature (planned since I took the project under my umbrella two years ago), which is indexing all translations of our flagship website www.mozilla.org. So now Transvision is no longer a search engine and QA tool for all of our products translations, it also supports websites using the .lang format (next up is indexing websites using gettext). From a developper perspective, this is also the release in which we automate the generation of the documentation of our classes thanks to phpDocumentor. Currently I am working on a better MVC approach and organization of code so as to work on features such as atom feeds, on the fly generation of TMX files and other more flexible export features, it may be in addition or in replacement of the TMX files we generate at extraction time. Caching is also in the pipe, the app is currently very fast and responsive but caching could help us extend more our external API to more time consuming data generation.

A personal achievement is that I finally rewrote my old Web Dashboard (whose code dated back to 2007) and moved that to github. Two new features, direct query of web localization bugs per locale on Bugzilla and display of the translation status for most of the projects hosted on Verbatim, our web localization platform, the latter was a patch by Francesco. The big feature is that the code went from 6000 lines of spaghetti code to 400 clean code, old features that made sense 7 years ago and now useless were removed and the fact that we can now track www.mozilla.org work in Bugzilla per locale allowed cutting a lot of code. Pretty happy that this was totally transparent to the user and that we are already starting to add new features to help us ship software!

On the Langchecker side, the tool we use to track .lang based projects and deploy lang files on repositories, I added per locale json feeds for the status of the locale and it now warns about invalid metadata and can now removes obsolete or invalid tags that we use on mozilla.org to activate a feature for a locale on a page. We also used it to expose strings from our first project based on Pontoon.

Other small tools of mine got updated, my mass bug filing script can now file bugs marked as mozilla confidential, something we needed for Mobile World Congress pages, I whipped up a script using Transvision data to know the distribution of strings across components in Firefox/FirefoxOS which allows specifically to know how many strings we have for devtools (potentially a future Transvision feature) etc.

All in all, I'd say I spent about 30% of my time this quarter hacking on code, which is cool.

Events and community

This quarter I attended one event outside of Paris, Fosdem. As usual it was interesting in terms of networking with European open source hacktivists. I also organized a one day event in the Paris office with April which mostly consisted of workshops on how to contribute to an open source project (I led two workshops on participating to Mozilla localization). I also attended 3 events in the Paris office, one with the French community to welcome half a dozen new volunteers, one with Rosana and Goofy dedicated  to SUMO localization and a last one which was an impromptu meeting between the French community and Brian King from Reps. With a Paris office tailored for meetings, I expect that I will continue to organize / attend to community meetings locally instead of travelling a lot like in the past, that's more compatible with my recent fatherhood :)

This wasn't a big quarter in terms of finding contributors, I can identify only 2 new people that became active and productive in the Mozilla l10n project directly because of me, that was mostly due to the fact that I spent more time on shipping projects and building tools this quarter. I also had some more paperwork than usual to deal with as I have an intern starting in April and I also worked with my colleagues on a tax refund paper for Research and Development in the Paris office.

I spent some specific time helping the Lithuanian community trying to grow in general, we created an IRC channel, opened a mailing list for Lithuania, did some work on etherpads  and contacted other open source projects in Lithuanians, past contributors, would be contributors through the Contribute page... We found some people interested in helping with l10n but more work will be needed to reboot the Lithuanian community (not just in l10n).

I also closed the mozilla.community.europe which had been created after we closed Mozilla Europe and merged its activities with Mozilla, it unfortunately never attracted any activity and was just collecting spam (which I had to delete on a daily basis).

About the Transvision community, the project reached 9 committers in March, is now listed on What Can I Do for Mozilla (which makes it the only active PHP project listed on the site ;)). It is growing slowly but steadily on all fronts (uses, codebase, contributors, features...). We are also working on making it easier to hack (static and automatic documentation, better installation scripts...) but one of the roadblock is the amount of data that needs to be downloaded first to make it useful locally, the sum of our hg/git/svn repos are about 17GB big. Even after extraction of strings from all of our repos, it is probably like 200MB of text, we may evaluate a downloadable snapshot of that in the install process to make it easier for contributors that want to hack on it.

From a tooling community perspective, big thanks to Enrique Estevez, our galician localizer, who is working on upstreaming patches to OmegaT to make it work better with Mozilla formats (.properties and .lang) and who is also writing an Omega T plugin to get translation suggestions from Transvision. Babelzilla also contacted me for similar purposes, that means that at least four Mozilla tools use it or plan to use it directly (Mozilla Translator, OmegaT, Pontoon, Babelzilla). We will put a focus on improving, documenting and versionning our external API this year to make it easier to the tools community to integrate it.

Mozilla.org localization

On Mozilla.org, the big deal this year was like last year the Mobile World Congress event, we updated all of our Firefox OS pages and home page + tabzilla in 17 languages in time before the event and also added some extra content for a dozen of these locales. As usual with big projects, we exposed feature needs and we now can publish promotions in tabzilla per locale, using the same mecanism as for the home page, so as to target only the languages that we were working on for MWC.

MWC was not all though, we also worked on a new Pricacy page for a few locales, we worked on a landing page for Firefox Metro, but unfortunately the product got cancelled, we updated a lot of older content, made patches in our templates to avoid duplicated strings, shipped new locales on the release channel with all o their web content done (Xhosa and Aragonese) and shipped Malay on the Beta and Aurora channels too.

The amount of strings is now around 1500 for a big locale on mozilla.org and about 600 for a small locale. Of course, since we have frequent content changes (promos, minor string updates on tabzilla, download pages, in-product pages...), this is actually more, especially for the bigger locales and Firefox OS locales, but I am happy that we succeed in keeping all of the locales in good shape, especially the small ones, while not slowing down the creation of English content. The site is definitely getting better and more localized month after month, two years after the switch to Django and the total rewrite, this is starting to look really good again.

And now Q2!

Expect Q2 to be more of the same :) One interesting point is that I am taking Theo Chevalier, our main French localizer, for an internship at Mozilla, which means that he will work on all of the cool stuff I have in mind but never get the time to do (like working on growing our l10n Firefox Nightly userbase which is ridiculously low compared to en-US), he will also of course work on the big Q2 project that is the launch of Firefox Australis!

jeudi 19 décembre 2013

My Q4-2013 report

It's the end of the quarter, just list last quarter I wrote down a summary of what I did this quarter for Mozilla for posterity, here it is ;)

Tools and code

Once again, I spent significant time working on tools this quarter. My activity was focused on Transvision, Langchecker and my FirefoxOS minidashboard.

There were 2 releases of Transvision, 2.9 and 3.0, adding many new features and additional support for Gaia repositories. I also created a #transvision IRC channel on Mozilla IRC server. You can now search strings for 3 locales simultaneaously, check all existing translations for an entity, list all potentially wrong varables in your repo or quickly check  all strings that need some extra QA for Firefox OS.

There were also many improvements to langchecker, the tool that I now maintain with my colleague Francesco Lodolo to track and manage progress of translations for projects using our .lang format. Many views were improved and we added features specific to the metadata used on mozilla.org (page activation and home page promos). We also added checks for UTF8 validity of the source files as well as checks for broken or missing python-style replacement variables in translations. We can also know how much of our l10n user base we cover not only per page but also per string on a page, which allows us to decide when we can activate a minor but visible text change on our pages (recently for example, html meta description and title tag changed for SEO reasons on the Firefox download pages).

As for my FirefoxOS mini dashboard (which syndicates data from the l10n dashboard, the langchecker and also contains some manually maintained data sources), it followed Gaia progresses and now tracks Gaia 1.1 and 1.2 in addition to the master branch.

Community building

This quarter I found 8 new localizers for mozilla.org and key Firefox web parts for the following locales: Afrikaans, Arabic, Basque, Bulgarian, Czech, Slovak and Spanish (Mexico). As usual I tried to focus on helping teams that lack manpower and / or maintain Firefox for a minor language.

I also created / revived IRC channels for these locales to help community building:  Catalan (#mozilla-cat), Slovak (#mozilla-sk) and Serbian (#mozilla.sr).

If we can find 5 to 10 localizers working on key content every quarter, we shouldn't have any problem growing with all of our locales together in the years to come, the thing is that we have to be proactive and look for these people and not wait for them to come to us :),

Events

The only event I went to was the Mozilla Summit, it was great and very productive from a localization point of view, I worked with Dwayne who maintains Locamotion, the Pootle instance focused on Mozilla projects for minor locales (Firefox, mozilla.org content, Firefox OS, Firefox health report) and we worked on improving our collaboration. One of the immediate results this quarter is that now we automate imports of strings for mozilla.org from Locamotion, which takes us a few minutes of work per week  and is faster for both Dwayne and ourselves. We are working on how to make it easier for locales on Locamotion to also follow mozilla.org work as this happens at a much quicker pace than product localization.

I also talked and worked with many localizers either on their specific issues (for example Brano and Wlado from the Slovak team asked me for help finding new localizers) or to check what problems a locale has and how to fix them.

Mozilla.org

A lot of work happened on mozilla.org this quarter. The most visible one is that we now have the home page available in 55 languages, versus 28 at the end of the last quarter. This is a steadily growing number, I hope that we can get the page in 70 locales, the most important is of course maintenance over time. The home page received also several updates promoting various topics and we scaled out l10n work to cover that (end of year donation promo, lightbeam, webmaker, addons). The webdev team implemented a way for us (l10n-drivers) to manage the activation of promos on the home page without code changes thanks to metadata in our lang files, that allowed us to never show mixed language content on the home page and activate these promos for locales as they get done.

Key pages in the main menu (products, mission, about, contribute) are all localizable and localized to about the same scale as the main page. Other key download pages (firefox/channels and firefox/installer-help) pages are also now translated anf maintained at large scale. Lightbeam and State of Mozilla sections were proposed as opt-in projects and have many translations (between 15 and 20 languages). I am happy that we were able to scale the localization of mozilla.org in terms of content (more pages, more content for products), number of locales and locale-specific improvements on the mozilla.org platform (better rtl support, better fonts, l10n friendly templates..), and our management tools to allow us to grow.

Another cool l10n feature that happened on the site was the creation of a 'translation bar' proposing you a mozilla.org page in your language if it exists. This was entirely done by a volunteer Mozillian, Kohei Yoshino, many thanks to him for this cool feature that may expand to other Mozilla sites ! Kohei wrote about it on the webdev blog. It is really cool to see improvements brought by volunteers and it is also cool to see that many people in the webdev team are also acquiring an l10n culture and often spot potential problems before myself or flod get to them !


That's all for this quarter, overall an excellent quarter for mozilla.org and tools which improve steadily. On a side note, it is also an excellent quarter for me at a personal level  as my daughter was born last month (which explains why I am less often connected  these days ;) )

lundi 4 novembre 2013

PHP: détecter si l'encodage d'un fichier est en utf8

Dans mon boulot on travaille uniquement avec des fichiers source en UTF8, notre site principal est en python mais j'ai des outils de maintenance extérieurs au site qui sont en PHP, étant donné que l'on travaille avec une bonne centaine de bénévoles qui ont accès au svn où nous stockons les fichiers de traduction et que nous avons des milliers de fichiers, il arrive qu'un bénévole envoie un fichier dans le mauvais encodage (genre Latin 1 pour certains europeéns et UTF16 pour certains asiatiques) et là, pour Django, c'est le drame :)

En bash on peut lister tous ces fichiers assez facilement et se créer un alias pour ça :

find . -type f -name "*.lang" -exec file --mime {} + | grep -viE "utf-8|us-ascii"

(via mon collègue italien Francesco Lodolo bien meilleur que moi en bash :) )

Ça marche bien mais je préfèrerais pouvoir afficher cette information dans mes tableaux de bords que je consulte en permanence, j'avais donc besoin d'une fonction pour détecter l'encodage des fichiers et j'ai pas mal sué pour trouver quelque chose qui marche correctement.

Ma première solution qui marchait a été celle là :

function isUTF8($file) 
{
    return in_array(exec('file --mime-encoding -b ' . $file), ['utf-8', 'us-ascii']) ? true : false;
}
Je délégais donc au shell la détection du charset, ça marche bien, mais ça a plusieurs inconvénients. Le premier est que ça ne marche pas sous Windows, même si j'avoue que c'est pas ma priorité, l'une des forces de PHP est tout de même sa compatibilité cross-plateforme. Le deuxième problème est que j'aime pas faire des exec, je trouve souvent ça un peu crade et c'est en général l'indice que j'ai pas réussi à le faire en PHP, le troisième problème et c'est le plus grave pour moi c'est que c'est très très lent. En local avec un disque SSD, un script qui mettait 3 secondes à s'éxécuter (et qui parsait déjà un petit millier de fichiers pour chercher des erreurs de variables python dans des chaînes) est passé à 18 secondes avec cette fonction et est interrompu sur le serveur qui n'a probablement pas de ssd pour dépasser les 30 secondes.

Ça marche donc, mais c'est trop lent pour mes besoins et je ne voyais pas comment l'améliorer.

J'ai cherché du côté de mb_detect_encoding() mais j'avais des faux négatifs avec un fichier en UTF8 que je savais corrompu et que php me détectait comme de l'UTF-8 alors que bash me le détectait en fichier binaire et que mon éditeur de texte me donnait en UTF16LE sans BOM. Comme c'est précisément ce genre de problèmes que je cherchais à détecter, après plusieurs heures de recherche du côté des fonctions mb_, j'ai l'aissé tomber.

Finalement ce matin j'ai trouvé une solution qui a des perfs correctes pour mon usage (je suis passé de 3 secondes à 6 secondes et j'ai des idées dans mon contexte précis pour faire baisser ça) en utilisant les fonctions finfo_* que je ne connaissais pas ! la voici :

function isUTF8($filename)
{
$info = finfo_open(FILEINFO_MIME_ENCODING);
$type = finfo_buffer($info, file_get_contents($filename));
finfo_close($info);

return ($type == 'utf-8' || $type == 'us-ascii') ? true : false;
}

La fonction ci-dessus correspond bien à mon besoin: pouvoir détecter si l'encodage d'un fichier est en utf-8 ou compatible utf-8 pour une utilisation sur le Web. Si quelqu'un a une meilleure solution, je suis bien sûr preneur :)

mardi 1 octobre 2013

What I did in Q3

A quick recap of what I did in Q3  so as that people know what kind of work we do in the l10n-drivers team and because as a service team to other department, a lot of what we do is not necessarily visible.

Tools and code

I spent significantly more time on tool this quarter than in the past, I am also happy to say that Transvision is now a 6 people team and that we will all be at Brussels for the Summit (see my blog post in April). I like it, I like to create the small tools and scripts that make my life or localizers life better.

  • Two releases of Transvision (release notes) + some preparatory work for future l20n compatibility
  • Created a mini-dashboard for our team so as to help us follow FirefoxOS work
  • Wrote the conversion script to convert our Serbian Cyrillic string repository to Serbian Latin (see this blog post)
  • Turned my langchecker scripts (key part of the Web Dashboard) into a github project and worked with Flod on improving our management scripts for mozilla.org and fhr. A recent improvement is that we can now import automatically translations done on Locamotion You can see a list of the changes in the release notes.
  • Worked on scripts allowing to query bugzilla without using the official API (because the data I want is specific to the mozilla customizations we need for locales), that will probably be part of the Webdashboard soon so as to be able to extract Web localization bugs from multiple components (gist here). Basically I had the idea to use the CSV export feature for advanced search in Bugzilla as a public read-only API :)
  • Several python patches to mozilla.org to fix l10n bugs or improve our tools to ship localized pages (Bug 891835, Bug 905165, Bug 904703).

Mozilla.org localization

Since we merged all of our major websites (mozilla.org, mozilla.com, mozilla-europe.org, mozillamessaging.com) under the single mozilla.org domain name two years ago with a new framework based on Django, we have gained in consistency but localization of several backends under one single domain and a new framework slowed us down for a while. I'd say that we are now mostly back to the old mozilla.com speed of localization, lots of bugs and features were added to Bedrok (nickname of our Django-powered site), we have a very good collaboration with the webdev/webprod teams on the site and we are more people working on it. I think this quarter localizer felt that a lot more work was asked from them on mozilla.org, I'll try to make sure we don't loose locales on the road, this is a website that hosts content for 90 locales, but we are back to speed with tons of new people!

  • Main Firefox download page (and all the download buttons across the site) finally migrated to Bedrock, our Django instance.  Two major updates to that page this quarter (+50 locales), more to come next quarter, this is part of a bigger effort to simplify our download process, stop maintaining so many different specialized download pages and SEO improvements.
  • Mozilla.org home page is now l10n-friendly and we just shipped it in 28 languages. Depending on your locale, visitor see custom content (news items, calls for contribution or translation...)
  • Several key high traffic pages (about products updade) are now localized and maintained at large scale (50+ locales)
  • Newsletter center and newsletter subscription process largely migrated to Bedrock and additional locales supported (but there is still work to do there)
  • The plugincheck web application is also largely migrated to Bedrock (61 locales on bedrock, about 30 more to migrate before we can delete the older backend and maintain only one version)
  • The contribute page scaled up tp 28 locales with local teams of volunteers behind answering people that contact us
  • Firefox OS consumer and industry sub-sites released/updated for +10 locales, with some geoIP in addition to locale detection for tailored content!
  • Many small updates to other existing pages and templates

Community growth

This quarter, I tried to spend some time looking for localizers to work on web content as well as acompanying volunteers that contact us. I know that I am good at finding volunteers that share our values and are achievers, unfortunately I don't have that much time to spend on that. Hopefully I will be able to spend a few days on that every quarter because we need to grow and we need to grow with the best open source contributors! :)

  • About 20 people got involved for the folowing locales: French, Czech, Catalan, Slovenian, Tamil, Bengali, Greek, Spanish (Spain variant), Swedish. Several became key localizers and will be at the Mozilla summit
  • A couple of localizers moved from mozilla.org localization to product localization where their help was more needed, I helped them by finding new people to replace them on web localization and/or empowering existing community members to avoid any burn-out
  • I spent several days in a row specifically helping the Catalan community as it needed help to scale since they now also do all the mobile stuff. I opened a #mozilla-cat IRC channel and found 9 brand new volunteers, some of them professional translators, some of them respected localizers from other open source projects. I'll probably spend some more time to help them next quarter to consolidate this growth. I may keep this strategy every quarter since it seems to be efficient (look for localizers in general and also help one specific team to grow and organize itself to scale up)

Other

  • Significant localization work for Firefox Health Report, both Desktop (shipped) and Mobile versions (soon to be shipped)
  • Lots of meetings for lots of different projects for next quarter :)
  • Two work weeks, one focused on tooling in Berlin, one focused on training my new colleagues Peying and Francesco (but to be honest, Francesco didn't need much of it thanks to his 10 years of involvement in Mozilla as a contributor :) )
  • A lot of work to adjust my processes to work with my new colleague Francesco Lodolo (also an old-timer in the community, he is the Italian Firefox localizer). Kudos to Francesco for helping me with all of the projects! Now I can go on holidays knowing that i have a good backup :)

French community involvement

  • In the new Mozilla paris office I organized a meeting with the LinuxFR admins, because I think it's important to work with the rest of the Open Source ecosystem
  • With Julien Wajsberg (Gaia developer) we organized a one day meeting with the Dotclear community, a popular blogging platform alternative to  Wordpress in France (purely not-for-profit), because we think it's important to work with project that build software that allows people to create content on the Web
  • Preparation of more open source events in the Paris office
  • We migrated our server (hosting Transvision, womoz.org, mozfr.org...) to the latest Debian Stable, which finally brings us a decent modern version of PHP (5.4). We grew our admin community to 2 more people with Ludo and Geb :). Our server flies!

In a nutshell, a very busy quarter! If you want to speak about some of it with me, I will be at the Mozilla Summit in Brussels this week :)

lundi 9 septembre 2013

Événements chez Mozilla Paris en Septembre !

Depuis la récente ouverture des nouveaux locaux de Mozilla à Paris, nous organisons régulièrement des réunions et des événements avec la communauté Mozilla bien sûr, mais aussi avec les communautés du libre et du web francophones.

Nous organisons aussi de nombreuses autres rencontres et séminaires de travail dans d'autres domaines (par exemple cette semaine le W3C et le CSS WG travailleront dans nos locaux) et ce mois-ci, nous avons plusieurs événements intéressants auxquels vous pouvez assister / participer :

  • Mercredi 11 septembre c'est Javascript les doigts dehors, de 19h à 23h. Si vous voulez apprendre, ou enseigner le javascript, en mangeant des gateaux fait main, c'est par ici. Inscription obligatoire (dans la limite des places disponibles).
  • Jeudi 12 septembre à 19h, rencontre avec les trois startups françaises sélectionnées par Mozilla dans le cadre de notre programme WebFWD d'accélérateur de startups du Web : CozyCloud, PLOM.IO et Webshell.io (par ordre alphabétique). Pour mieux les connaitre, les féliciter… et boire un coup à leur santé, linscription est sur ce framadate.
  • Week end des 14 et 15 septembre : en collaboration avec la mairie du 9ème arrondissement, les locaux de Mozilla seront ouverts au public pour les journées du patrimoine ! Comme vous le savez peut être, Mozilla occupe des locaux classés monuments historiques et qui bénéficient d'une décoration exceptionnelle. Si vous voulez rencontrer Mozilla et des Mozilliens tout en faisant une sortie culturelle, c'est une excellente occasion !
  • Le samedi 21 septembre, nous organisons une rencontre avec la communauté Dotclear, si vous voulez participer au code de Dotclear, au développement des futures version, au design, apprendre à faire un thème ou une extension et de manière générale participer au projet Dotclear, vous êtes les bienvenus (mais inscrivez-vous svp ;) )!
  • week end des 28 et 29 septembre : Mozilla Game Jam Paris, hackathon de création de jeux vidéos en HTML5, a priori c'est déjà plein mais il y a une liste d'attente

Ce n'est évidemment qu'un début, si vous faites du libre et du web et que vous voulez orgnaniser un petit événement ou une réunion de travail, n'hésitez pas à nous (me) contacter ! :)

Plan vers Mozilla Paris

mardi 13 août 2013

Dotclear a 10 ans, mon blog aussi !

Aujourd'hui 13 juillet 2013, Dotclear fête ses 10 ans !

De mon côté, j'ai ouvert mon blog sous Blogger il y a a un peu plus de 10 ans et je l'ouvrais avec ces mots :

Ok, voici donc mon carnet web, à force de lire ceux des autres, ça m'a donné envie d'avoir le mien :-)

J'y mettrai essentiellement mes trouvailles sur le web, ceux qui me connaissent savent qu'elles sont mes passions et ne seront pas étonnés de trouver des infos sur Mozilla/Netscape, HTML/XHTML/CSS, l'Espagne et l'espagnol, mon chat, les séries télé... enfin bref, des trucs qui n'intéressent qu'une minorité de personnes mais je l'espère une majorité de mes lecteurs :-)

On notera au passage que trois ans plus tard je commençais à travailler pour Mozilla, que j'ai représenté Mozilla en Espagne plusieurs années et que si finalement je n'ai pas parlé de chats ni de séries télé, le Pascal d'il y a 10 ans n'est finalement pas si différent du Pascal d'aujourd'hui :D

Un an plus tard, je passais sous Dotclear 1.2 bêta après avoir migré ma base de données Blogger à grands coups de SQL.

Un grand merci donc à Dotclear pour avoir motorisé mon carnet web toutes ces années !

Depuis le mois dernier, je participe un petit peu au développement de Dotclear et à l'animation de sa communauté. Dotclear a connu un ralentissement de son développement ces dernières années, puis une crise mais heureusement depuis deux mois , le projet est reparti sur les chapeaux de roues et après une 2.5.1 le mois dernier, une 2.5.2 devrait arriver très bientôt !

Si votre blog est sous Dotclear depuis des années, je vous encourage fortement vous aussi à participer au projet Dotclear, il y a besoin de codeurs bien sûr, mais pas que. Bêta test, documentation, traduction, promotion, événements... il y a plein de manières de participer au projet. Inscrivez-vous à la liste de discussion de Dotclear et lancez-vous!

Le logiciel libre a besoin de contributeurs, si vous vous dîtes ou vous pensez libriste mais ne participez activement à aucun des projets de logiciel libre que vous utilisez au quotidien, remettez-vous en question ;)

Longue vie à Dotclear !