• Improving the Firefox Home Localization Process

    October 4th, 2010 by seth bindernagel with 1 comment »

    When I wrote about localizing the Firefox Home iPhone application, I mentioned that once translations were gathered in Verbatim, I had to download the .po files, and with the help of the Translate Toolkit, convert those from .po files to strings files, the file type used by iOS.

    At the end of last week, I received an unexpected email from Stefan Arentz, the new developer working with Dan and Ragavan on the project:

    “I have automated the localization process with some simple scripts to grab the .po files from localize.mozilla.org and run the conversion tools on them to make them iOS compatible.

    “I have also integrated this in my continuous build scripts. This means the most recent build will always contain the most recent localizations automatically. This is done ON TOP of the hg checkout. So that means that the localizations still need to be imported and committed manually when QA has approved. (with the same scripts, so it is a no-brainer).”

    That’s a clever solution, isn’t it?  Thanks for taking that initiative, Stefan.

  • How We Localized the Firefox Home iPhone Application

    September 1st, 2010 by seth bindernagel with 6 comments »

    On Wednesday, August 25, 2010, Mozilla submitted an update to its Firefox Home application for the iPhone. Among other new features, this update included support for 15 localizations. Executing this global release was not an easy task, so if you’re interested, please read the rest of the story.

    (understatement alert) It turns out that localization on the Apple iPhone platform has some pieces that are very easy to understand and manage, and other pieces that are unique, complex, and do not align well with a global open source project like Mozilla.

    A Brief Technical Description on How to Localize an iPhone Application

    I worked closely with the Firefox Home lead developer, Dan Walkowski, to learn how iPhone applications are localized. I will paraphrase some specific technology tidbits provided to me by Dan to give a brief description on what was necessary.

    To begin, all Mac/iPhone localization projects use strings files, which are very similar to property files. After translation and testing, all of the localized files are built into a binary and loaded at run time. The twist from Apple is that there are two ways to generate strings files, and they are used differently.

    Way #1: For all places where the application uses a localizable string in code (ex: displayAlert: “uh oh!”), strings are wrapped in a macro. The developer then runs a tool to generate strings files for everything. That is the easy part.

    Way #2: Most of the Firefox Home UI is defined using Interface Builder, which generates serialized object trees known as xib files. These xib files are loaded at runtime, ready to go, and attached to the rest of the running code. Most of the strings a user will see are embedded in xib files. In this case, xib files require a two-step process to create. A different tool is run over each xib file to generate a strings file mentioned above. After that new file is translated, an inverse tool runs to create a *new* xib file by substituting in the new, localized strings from the strings file. The new xib file is placed in the project in the correct place and loads at runtime when that locale is active.

    The disadvantage of this is that, unlike the code-based strings, the strings files from xibs are only an intermediate step, not the actual entity needed for the build. The advantage is that since every locale gets their own serialized object tree, and we can actually alter the arrangement of UI elements (resize buttons, etc.) to better suit the locale.

    Here is how Dan set it up in Hg.

    Project Management with the Localizers

    For this project, I chose to file all tasks needing l10n as individual bugs inside Bugzilla. Under this scenario, every locale would have several bugs representing tasks that would block a locale-specific tracking bug. Then, all the locale-trackers would block a project-wide tracking bug. Here is the dependency tree from Bugzilla showing all the bugs and the structure of the tasks.

    The Localization Work

    To provide the easiest way to localize the application strings, we loaded them into our Verbatim web translation tool. Once translations were gathered in Verbatim, I downloaded the .po files, and with the help of the Translate Toolkit, converted the .po files to strings files. Many thanks to Dwayne Bailey who updated the po2prop script in his toolkit that I used for this project. Dwayne also blogged about his experience with this project.

    For other tasks like localizing the Mozilla website, the Application Store Description, and the emails that are sent to Firefox Home users after download, we filed bugs to gather the localization work. You can see from the dependency tree above all the tasks that needed l10n.

    In hindsight, I would have like to used Verbatim and the Translate Toolkit to do more with the project. After chatting with Dwayne, we could have used Verbatim to manage most of the tasks that needed l10n. Furthermore, I intend to follow up with our French localizer’s recommendation to use SVN to store all of our text based translations, rather than text files in Bugzilla. Luckily, I learned from Alex Buchanan, who is the Mozilla webdev on this project, that he has placed all the translated emails into Github. Because of that, we should be able to extract them as .po files from Github and put them into Verbatim.

    Testing

    Because many of our localizers do not have iPhones, and because Apple gives us a limited pool of beta testing slots, we decided to place an emulated iPhone with the multi-locale build on a remote machine for our localizers to test. I wrote a test plan with Dan and we left that as an open text document on the desktop of the remote machine where the emulator was running. Localizers logged in with a VNC client and followed the test plan. Because more than one person was able to log in at the same time, everyone had to state in bold font at the top of the page that their locale was testing. When finished, the localizers had to return the OS of the emulator back to English so the next team could test. I think my tweet says a bit about how tricky this was. It may have been a bit of a rudimentary solution, but it was the best way we could think to get 15 different locales testing under the constraints placed by Apple.

    Next Steps

    Firefox Home’s past minor update (1.0 -> 1.0.1) took Apple seven days to approve. Unfortunately, I do not know how long this time will take because Apple tells us very little. We are presently waiting to hear from them.

    Since the app is served as a multi-locale build, users will be able to shift to any of the supported 15 locales we are shipping. In some cases where Apple provides a localized App Store, special content localized by our community will help advertise our app.

    Thank you to everyone who participated to make this a success.

  • What Goes Into Reviewing New Locales

    August 30th, 2010 by seth bindernagel with 1 comment »

    Each time we add a new locale to the Firefox build and release process, the files from the new localization team need to be reviewed by the l10n-drivers team before we move forward with the request. For the last eight locales that we added, Pike provided me with a brief, but helpful wiki page that I used to successfully review the new requests. I took that page and bolstered it with more wording to describe what we do for the process. If you are curious what goes into a new locale review, please review this wiki page. (One understandable caveat, it is a work-in-progress and can always be improved with new things to review.)

  • Adding New Locales for FF 4, Five African Languages Among the Group

    August 26th, 2010 by seth bindernagel with 2 comments »

    The beta release cycle for Firefox 4 is a perfect time for us to add new locales. This week, we added eight more localizations, all of whom are working toward a completed version so they can be included for the upcoming final release. This new group of volunteers has endured a long wait to be included in this process, so many thanks to them for their patience and sticktoitiveness. Perhaps most noteworthy, we added five new African languages, expanding our presence to new highs on the continent. The entire batch of new locales includes Akan, Breton, Bosnian, South African English, Armenian, Luganda, Northern Sotho, and Songhay.

    If all the new locales close out their outstanding bugs and perform some testing in time for FF 4′s final release, they will go out as official and final. If they do not complete all the tasks required to fully localize their version, they will be released in beta and keep working to close any open issues. In the very least, they need to translate all strings by the release date.

    Here is a pretty rough HTML table for you to see all the new locales. The table shows the locale name, the tracking bug that lists all tasks, and where any users can download language packs or nightly builds. Please click on the tracking bugs to see everything a new locale has to do. Or, download and test some of the builds. These builds use our “l10n-merge” technology that supplants untranslated pieces in the user interface with English strings. It’s never too early to test, so please help if you can.

    Tracking bug Langpack Linux Linux 64 OSX OSX 64 Windows
    Akan ship ak langpack.xpi linux-i686.tar.bz2 linux-x86_64.tar.bz2 mac.dmg mac64.dmg win32.installer.exe
    Breton ship br langpack.xpi linux-i686.tar.bz2 linux-x86_64.tar.bz2 mac.dmg mac64.dmg win32.installer.exe
    Bosnian ship bs langpack.xpi linux-i686.tar.bz2 linux-x86_64.tar.bz2 mac.dmg mac64.dmg win32.installer.exe
    English (ZA) ship en-ZA langpack.xpi linux-i686.tar.bz2 linux-x86_64.tar.bz2 mac.dmg mac64.dmg win32.installer.exe
    Armenian ship hy-AM langpack.xpi linux-i686.tar.bz2 linux-x86_64.tar.bz2 mac.dmg mac64.dmg win32.installer.exe
    Luganda ship lg langpack.xpi linux-i686.tar.bz2 linux-x86_64.tar.bz2 mac.dmg mac64.dmg win32.installer.exe
    Northern Sotho ship nso langpack.xpi linux-i686.tar.bz2 linux-x86_64.tar.bz2 mac.dmg mac64.dmg win32.installer.exe
    Songhay ship son langpack.xpi linux-i686.tar.bz2 linux-x86_64.tar.bz2 mac.dmg mac64.dmg win32.installer.exe

    Lastly, I’ll mention it quickly now and blog more later, but we also added two new locales for the release of Firefox 3.6.9. For that release, you will see Asturian and Scottish Gaelic in beta.

  • Friday night in SF – Saturday morning in Manila – Same time on the Web

    March 20th, 2010 by seth bindernagel with 3 comments »

    ==Log, Friday, March 19, 2010==

    18:30: I arrive home after work and return online for a webinar hosted by the community folks in Manila, the capital city of The Philippines where it is presently 09:30 Saturday morning.  (I just linked you to another MCS installation, which is a tool created by Gandalf.) Since Gen’s and my visit, a burgeoning Filipino community has been promoting Mozilla with community get-togethers and other activities, including this evening’s webinar on how to localize Firefox

    18:45: Audio/Video test with Regnard Raquedan, the local community leader. I share with him my Tokbox video conference URL and we have audio with intermittent video. Not a big deal, with chat room functionality on Tokbox, I can speak and pass URLs to all who attend the webinar. Those with video can see me on a Friday night in my SF apartment.

    19:00: Webinar starts with 7 people initially logging in.  Introductions made.  Active Filipino community includes Regnard, Joel, Kevin, Gian, Bob, Martin, Charmaine, and other guest users joining as we go.

    19:15: I pass the following URLs to demonstrate localization:

    1. How to create a new localization –  The centerpiece of our documentation written by Stas (and me) that we believe is the one-stop for all localizers to begin (or reference later when a question arises).
    2. Localizing with a web tool (in this case Narro) — A sub-article of the above piece.  I gave Regnard a few options to look at before this webinar and he chose Narro.
    3. Narro — The webtool developed by Alexandru, our Romanian localizer, and hosted on our l10n-server.

    19:30: I walk the webinar attendees through localization of the two main Mozilla l10n file types: DTD and property files.  The demo we constructed has new localizers translating two highly visible strings so they can immediately see the impact of their work.  As show in the document in point 2 above, we choose the “Manage Search Engines…” DTD file and the “Add %S” property file as examples of where to start.  These strings are located in the search box UI of Firefox.  You know where it is, check for yourself!  :)

    19:45: The Filipino community offers translations for these two strings and decides which to use.  Regnard is the initial Narro admin, so he reviews all the suggestions from the community participating in the webinar.  After consensus, he approves the appropriate translations.

    19:50: I discuss how we can create a language pack for testing through out the process so we don’t have to wait until all strings are translated to see the fruits of the labor.  Narro allows teams to easily generate .XPIs for testing straight from the UI.  Regnard can do this for the team and we decide to version our language packs (using the date as the versioning number) so people can keep the archive if they choose.  (i.e. Tagalog_langpack_marso_20_2010, Tagalog_langpack_marso_21_2010, etc.,  or something like that…)

    19:55: Final Q&A.  Joel asks, “If we install a testable Tagalog .XPI, how can we switch back and forth to our original English-only UI?”  I pass along the Quick Locale Switcher add-on.  Everyone smiles.

    20:00: We end the evening with pretty solid progress having been made.  I think the evening was a success.  I retire on my couch to watch Cal and Ohio State win their opening round games of the NCAA basketball tournament.  Go Bears!  Go Buckeyes!  I fall asleep before the games are finished, much to the chagrin of my brother who excitedly texts me updates.

    ==Signing off==