Implementing a Web Based Translation Interface for Gallery2

Google Summer of Code (GSoC) 2008: John Britton Abstract - The idea, in brief
The goal of this project is to simplify the task of user interface translation in Gallery2 (G2). In itʼs current state the translation process is not simple enough for the general public, and maintaining translations is a tedious burden on the G2 team. I will lower the barrier of entry for translators by implementing a web based translation collection system and I will ease the burden on the G2 maintainers by integrating the system as closely as possible with the G2 build and distribution process. The new translation system will provide three main benefits to the G2 project: faster translations for newly released code, more available languages, and better translation quality. The starting point for my work will be code produced by Gábor Hojtsy in his 2007 Google Summer of Code project entitled “Tools for Drupal Translation Teams and Users”, in which he produced the “localization_server” Drupal module suite. Gáborʼs “localization_server” was built specifically to translate the Drupal software; my primary task is to write a new connector module to interface with the G2 software. I will automate string harvesting from core, official, and if possible contributed modules. If time permits, I will automate the process of distributing the language packs by integrating with the upcoming G2 Language Manager.

Detailed Description - The “nitty gritty”
By implementing a web based translation interface for G2, anyone, regardless of technical ability, will be able to translate G2 from the comfort of their favorite web browser. This has the potential to impact the G2 project substantially by enabling community members to more quickly translate the G2 interface, by increasing the number of languages available, and by enhancing the overall quality of translations. The proposed translation server will accept translation suggestions from all users, regardless of registration status. Designated language maintainers will moderate translations and ultimately decide which translations are included. This proposal is based off of Gábor Hojtsyʼs “localization_server” Drupal module suite.

The Drupal “localization_server” suite of modules is composed of l10n_community, l10n_groups, and a l10n_connector module. l10n_community holds the translation interface and the database backend for the suite, l10n_groups provides an interface to the organic groups Drupal module allowing per language groups to self organize, and the l10n_connector module is responsible for importing translatable strings and associated metadata (project, release, file, line, string, and translation). At present, two l10n_connector modules exist, both Drupal specific: l10n_localpacks and l10n_drupalorg. l10n_localpacks parses locally stored Drupal packages for translatable strings and extracts associated metadata based on filenames and directory paths. l10n_drupalorg parses an XML file from drupal.org, downloads Drupal packages and extracts translatable strings and metadata for translation. My main task will be to create a new l10n_connector module, specifically tailored to the needs of G2. The new module, l10n_gallery2, will be hosted on the Gallery website http://gallery.menalto.com (GMC). Conveniently GMC runs the Drupal CMS so I’ll be able to leverage the existing userbase to increase participation in the translation process. The module will directly access the G2 codebase (either from SVN or automated builds) to harvest translatable strings and associated metadata. At first I will include only G2 core and official modules, however I will plan for the inclusion of contributed modules at the discretion of the G2 team. The code structure of G2 is entirely different from that of Drupal, as such, metadata harvesting techniques will have to be rewritten and a revised parsing mechanism will have to be implemented. More specifically the parsing of project and release information will need to be considered in detail to enable translation status monitoring and browsing on a per project (module) basis. The “l10n_server” module suite exports translations in a format that is suitable for Drupal, modifications will have to be made to adapt the output for G2. In the simplest form this will be accomplished by the ability to export Gettext PO(T) files from the web interface. As time permits, further integration and automation will be pursued. An upcoming version of G2 will have a new feature available called Language Manager (LM). LM will enable end users to download and install G2 language packs from within

the G2 administration area. If time permits, I will implement an additional module to automatically export translations from l10n_gallery2 to LM. Although not my primary goal, the addition of group functionality to the G2 website will enable community members to organize themselves according to areas of interest and facilitate furthering the development of the Gallery project, especially in the area of localization management. Per-language groups will be created, individual language maintainers will be responsible for moderating end-user translations, lightening the burden on the G2 core team. The project timeline consists of the “Community Bonding Period” followed by four phases, each of which is three weeks in length. The first three phases have two milestones, a preliminary milestone at the end of the first two weeks and an advanced milestone at the end of the third week. The fourth and final phase contains one task to be completed as time permits in addition to testing and documentation. The first two weeks of the fourth phase are before Google’s suggested “pencils down” date. The final week before Google’s firm “pencils down” date is reserved for additional testing and fixes as well as preparing the translation server for launch on GMC. Beyond the timeline of GSoC, I plan to continue to work on the G2 project and to maintain the l10n_gallery2 module and related code as needed. The four phases and the associated dates are outlined below. Project Timeline & Milestones Community Bonding Period April 21 - May 25: Talk with G2 core developers via IRC, flesh out project requirements and goals. There are a few parts of this proposal that depend on what we think is best for the Gallery project, I will make these decisions during the introductory time period with help from my mentor and the community. Phase 1 - String Harvesting May 26 - June 9 (two weeks): Basic string harvesting June 10 - June 16 (one week): Advanced and automated string harvesting from SVN and/or automated builds Phase 2 - Metadata Harvesting

June 17 - June 30 (two weeks): Basic metadata harvesting July 1 - July 7 (one week): Full metadata harvesting, including project (module), and release Phase 3 - Exporting July 8 - July 21 (two weeks): Basic exporting July 22- July 28 (one week): Full exporting of PO(T) files useable by G2 Phase 4 - Advanced Exporting, Documentation & Testing July 29 - August 4 (one week, if time permits): Automated exporting to G2 Language Manager, easier download for end users July 5 - August 11 (one week): Stability testing before going live on GMC, end user G2 Codex docs August 12 - August 18 (one week): Additional testing and fixes as needed, live launch on GMC at the discretion of my mentor and the Gallery team

Deliverables - WYSIWYG (What you see is what you get)
• A simplified, user friendly web based translation interface integrated with GMC • l10n_gallery2, a custom “l10n_connector” module to integrate with G2 • Automated string and metadata fetching from G2 • Translation completion status monitoring • Per language • Per project (module) • Translation moderation • Suggest -> approve model to allow unregistered/new community members to contribute more easily • Role/Right administration • Translation “groups” for each language, with the ability to assign “maintainership” to distribute responsibility and work among volunteers • Codex documentation for end users • Unit tests as required by G2 style and quality guidelines • Automated delivery of language packs to the G2 Language Manager, if time permits

Qualifications - I’m your man, here’s why:
I’m a Computer Science student at Rensselaer Polytechnic Institute (http:// www.rpi.edu), and programming is a passion. My formal programming instruction includes C/C++, Java, PERL, and Ruby. In the working world I’ve developed mostly in PHP, Ruby, and Java including maintaining three different PHP web applications with multi-language capabilities. Beyond programming languages I’m well versed in SQL, Unix/Linux, web standards and related topics. Most importantly, I’ve been a member of the G2 community for four years, most active in development over the past six months. I’m familiar with the way the G2 team operates including weekly IRC meetings, code review process, and coding standards. I have contributed to the project, and plan to continue well beyond the end of GSoC. In addition to my G2 contributions and experience, I’ve worked with Drupal for as many years, including attending Drupalcon Boston 2008. While in Boston, I met with Gábor Hojtsy and talked with him about his “localization_server” module, upon which this proposal is based. My G2 Contributions • Started discussion and wrote preliminary code for what is now the FLV module • Comment moderation feature committed to the Comment module • Bug reports • Code under review for inclusion into the slideshow module (MediaRSS paging) • Provide support via IRC from time to time Motivation There are a few reasons I’d like to work on this project, all of which make me a strong candidate who is determined to succeed. • I love to take and share photos, G2 is the best way to do that • I love FLOSS, I use it everyday and want to give back • I’m a language junkie, I love to study foreign language My strongest motivation for this project is definitely my interest in foreign language. I’ve studied Spanish for 10 years, I’ve also formally studied Basque and informally studied Polish. In the fall I will begin studying Chinese.