Wednesday, June 13, 2007

Firefox l10n mr-IN: Journey from :( to :)

Finally Done ! ! ! :)

It was a real nightmare when we started the activity. Since it's a volunteers activity it was bit slow initially but all those (though very few) were committed to their task, thanks to

Abhijit Mapgaonkar (MOS),

Anish Patil (MOS)

Gaurav Shah (IITB)

Girish Katre

Ivan Desouza (MOS)

Manoj Rege (IITB)

Parag Iyer (IITB)

Prashil Thakur (IITB)

Rahul Bhalerao (MOS)

Sandeep Shedmake (MOS)

Swapnil Hajare (MOS)

Vijay Barve (MOS)


Special Thanks to Dr. Alka Irani (Cheif Investigator of our project) for having faith in me.

They did their job, now it was my turn :)

Being a Langauge Coordinator for Marathi (mr-IN) my job was to coordinate the workdone so far and that was a REAL nightmare :(

Almost an year passed by during this translation activity and meanwhile there were so many changes happened upstream in the source code itself. Reflecting those changes in the localization tree itself was a tedious job.

I was carrying to versions of translations one by our Marathi Open Source Group (MOS) and one by Manoj's group from IITB . Then I had choose best translations out of those by seeing individual string in every file. Before that there was another crucial task of converting existing l10n tree structure to the standardized one which cvs has and that was done by the script langpack2cvstree.sh writen by Cédric Corazza.

This script needs a GNU/Linux distribution, a command-line cvs client, perl client and the ab-CD.jar of the xpi langpack.

Basically, it downloads the current version of en-US files from branch or trunk and reorganizes them in the proper way. You'll be asked if you want to include the toolkit part (in case you already have it on mozilla.org cvs). Then, it reorders ab-CD files against the downloaded local en-US directory. Finally, compare-locales.pl is executed and provides the results.log file which shows what files/strings are missing.

Howto

* Create an empty directory
* Copy into it the ab-CD.jar included in your langpack (if you
want to choose calendar, also copy the calendar-ab-CD.jar).
* Copy langpack2cvstree.sh into it
* Make a chmod +x langpack2cvstree.sh to make it executable
* Then run ./langpack2cvstree.sh ab-CD product where:
ab-CD is your locale name (two-letter locale code is accepted)
and product is either browser, mail or calendar
* Then, you are asked if you want to add the toolkit. Valid
answers are Y, y, N, n (for Yes or No)
* Then, you are asked the branch you want to use. Valid answers
are B, b, T, t (for branch or trunk. Currently, the branch is
MOZILLA_1_8_BRANCH)
* At the end of the process, you should have in the directory you
created the following items:
- en-US
- ab-CD
- locale
- results.log
- ab-CD.jar
* Then, open the results.log file in your favorite editor to see
what files/strings are missing. The missing files/strings can be
obtained from the en-US directory

NOTE: langpack2cvstree.sh essentially gives us the skeleton cvs tree structure equivalent to en-US and we have to fill it up with translated .dtd & .properties files.

ISSUES:
  • Some files in locale.rar, Manoj and in mr-IN l10n tree were in ascii format (all the translated strings were in hex form viz.\u0909\u0918\u0921\u093E\u0935\u0947) got a perl programme from Sunilmohan to convert it to text (utf-8). :)

#!/usr/bin/perl

binmode STDOUT, ":utf8";
while (<>)
{
s/\\u([0-9a-f]*)/chr(hex($1))/eig;
print;
}

  • Earlier I used to replace \u0 with in ascii file thro' text editor's (gedit) replace utility then save the text in html format, put
    as a new line character to each and every line, then open it in a browser, copy & paste text to the text processor again then save it as .dtd or .properties , Hushh, that was quite tough job :(

Finally complete updated cvs tree structure sent to Axel Hecht for review !! ;)

Labels:

0 Comments:

Post a Comment

<< Home