Wednesday, October 13, 2010

How we use Narro to localize Firefox

Narro is a community-maintained web-based project (mainly alexxed AFAIK) which is hosted at

This web interface allows localizers to translate Firefox without having to deal with Mercurial, compare-locales or tools to generate language packages. It is easy to use, speeds up the translation process and improves collaboration between new contributors and veterans.

The way I have used it so far is:
  • Our Armenian localizer lead visits the "Translate" tab and starts translating
  • Since he is the main localizer he is also an approver and by default his changes are auto-approved
  • He should also be visiting once in a while the "Review" tab to approve and discard suggestions from people on the community
  • Once in a while I will visit the "Export" tab to generate a zip file (Image 1)
    • I still have not figured out when to have these checkboxes checked before exporting:
      • " - I believe I don't need this one as it gives me .xml files
      • " - 
  • I unzip the tar ball containing the Armenian repo exported from Narro on my Mercurial local checkout overwritting everything
  • I run the following commands:
    •  find . -type f -exec chmod -x {} \;
    • modules=( browser dom extensions netwerk other-licenses security toolkit); for module in ${modules[@]}; do cd $module; for file in `find . -name "*dtd" -type f`; do cat /Users/armenzg/moz/armenian/patches/headers/header.dtd $file > $; mv $ $file; done; for file in `find . -name "*properties" -type f`; do cat /Users/armenzg/moz/armenian/patches/headers/ $file > $; mv $ $file; done; cd ..; done
    • I don't know yet on which point the permissions get changed to +x from the narro server to the zip file. According to alexxed, the Armenian project does not have +x on the files on disk.
    • I also have to re-insert the license headers as it seems that Narro uses the very old headers which I have not yet learned how to overwrite
  • After  analysing the output of "hg diff" I decide to commit
  • My commit will add new translations that have been approved by the Armenian localization lead and new en-US strings that Narro has imported into the Armenian project
  • My commit changes will be shown in tomorrow's nightly
    • You can see that I name my commits with "Narro import for $date"
  • You can see the status of the Armenian locale and the output of compare-locales after having pushed my changes
  • The new compare-locale 0.9 can even catch parsing problems (Image 2):
    • Fixing those with Narro can be real painful
    • A trick is to uncheck "Show files" and "Show folders" when looking at the "Files" tab
I hope this feeds the curiosity of some people that have asked me how do I use Narro to drive the localization of Firefox.

I will explain more in other blog posts on how I use compare-locales, how I used bitbucket before we became an official localization team and how I sign-off my revision for a beta. So much to blog about!

Image 1 - This is the output of exporting a Narro project. It gives you a XPI, a diff and an exported project

Image 2 - Compare-locales 0.9 now also shows parsing errors and warnings besides missing strings

Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

No comments:

Post a Comment