Friday, March 28, 2008

XPI or CVS ?

I just discovered that there are some localization teams that have a language pack translated but don't have a CVS structure translated.

I remembered that before I got Romanian firefox released, I created a script that made the conversion from the CVS structure to the language pack and it was a nightmare.

Anyway, I think in Narro you should have the CVS structure. You could have the language pack structure and export that, but you do fight to get in CVS right ? So I assume that having in Narro a converter from CVS to XPI and XPI to CVS is a must, so I'll start working on it.

Thursday, March 27, 2008

Upcoming release

I've decided to stop adding new features and start setting things up for a first public release. This upcoming release will have:

- only support for mozilla projects and narro itself
- user and permissions management
- voting for suggestions, editing, deleting, validating
- file browsing
- searching
- import only through command line
- export via web and command line
- entities checking, punctuation checking
- probably some other things I've forgotten

There are several functionalities that are there but I just don't have time to test them for this release:

- gettext po support
- native sdf open office support
- spell checking
- single file export/import
- import via web

How about the future ? Here are some features from the future:

- languages list page with translation progress
- rss/email notifications when new untranslated texts are ready to be munched
- an api for interacting with other tools, such as transifex
- translation statistics for users and profile (user's quality, speed, volume, etc)

So stay tuned for the release announcement.

What goes in, must come out

Import and export for the masses is now there. Just login or register and then login and you'll see those buttons.

Since I didn't receive feedback from all languages I've imported, I've decided to let you do the first import for your language. So go ahead and do it.

Things are pretty stable now and the next step is to pull a fresh cvs copy daily and let people use Narro as an alternative.

Until then, please take into consideration that nothing stays in Narro, so if you do use it, please export your work.

Happy testing!

Wednesday, March 19, 2008

Access Keys

So I initially started on to work on the export/import operations. Although they were working great, the code was commentless and needed beautifying. During that time I went on and made some modifications to the database. I think I have now a solid database structure, so the first release will be soon.

Another thing that I've discovered is that people who want to help translating do not know what access keys are. Or if they know, they don't look in the menu to see if there's a conflict. So I decided to adopt a new approach on this topic. The access key for the original text and the access key for the translated text are now tied to the context. Selecting the access key is up to the person who validates a suggestion for a context. Regular users will not have to type in "M&ove" but just "Move".

Also, I've changed the voting system. Users now vote for a suggestion only for that context. It made no sense seeing that a suggestion had 10 votes but still someone validated the one with no votes because in that context it was more appropriate.

Until now I didn't care about showing the dtd comments or ini comments in Narro. But since in Mozilla, the context is quite small, I've decided to import the comments too as context comments. You can opt in to see them by pressing a button.

I haven't posted yet any code on svn as I'm still cleaning up and don't want to put a mess in there.

I'll have something there by the end of this week.

Tuesday, March 11, 2008

Endurance test

Although I designed Narro to work with only a pair of languages, I received some feedback that some languages, like spanish for example have various forms that would like to be used on the same translation site.

On the other hand, the romanian translators want to see how was the text translated in a few key languages, like french, spanish, italian.

So now Narro supports multiple languages. It took me some time to change all the code, mostly carefully search and replace.

Even so I would not recommend keeping all the languages in one instance, I just don't see the point in that, this is a tool that is supposed to help people who translate from one language to another, so displaying 100 languages isn't productive.

Mozilla is kind enough to offer me a playground, so feel free to test the progress.
I've imported Firefox 3 into 57 languages as an endurance test and the speed is still good. Of course if you install only a few languages that you need you'll have better performance.

You might want to register first. Since it's a playground, by registering you'll receive super powers like delete, edit and validation rights.

Don't take anything for granted, everything you put in there is not going to stay. An official installation will be available soon in case you want to use Narro to translate software in your language.

Stay tuned until I add the export button so you can see how easy it is to manage your locale.

Thursday, March 6, 2008

Code like crazy

That's what I do these days. Code like crazy. Mostly on Narro.

The first public release (a thing that is installable by anyone) should come in a month.

Now let me make this perfectly clear. This application is meant to help localization communities to do a better job, by allowing more people to translate, not for the developers to manage translations. That's the reason why it works only with one pair of languages. Original and translation. If you're already thinking at de-CH and de-DE, there are no worries. You can just take the suggestions from de-CH and import them into de-DE. Or the other way around.

When I started to write the application, I used Drupal's user management system because I just didn't need one of my own. I was thinking of an application that just did the job for me and only me. Since people got interested and wanted to use it, I thought Drupal was way too much overhead. I've got qcodo in there, I'll most probably use some ZendFramework as well so Drupal had to go.

I've wrote a simple user management system, login procedure, registration, permission and preferences. I still have to do a forgotten password thingie.

I've wrote a plugin handler and a first plugin. I'm still not sure about the need of these plugins, but hey, I need a special thing for Romanian, and I cannot distribute that for all of you. I have in the database s and t with comma under and I want people to be able to use my application with s and t with cedilla as well. Because we have people typing both of these caracters. Yes, it's madness, but I got that now in a plugin. Just delete it if you don't need it. Or maybe I'll add an active flag so it can be deactivated.

The application still works like the only working copy available online. Yes, that's the one with Drupal in it. Get over there and try it if you're curious. But I'm really using that one for the translation of those projects, so don't add thousands of suggestions, please. You can add suggestions without an account in the project named Firefox 3 (for Narro tests).

I am now working on the import/export procedures. I used to do this in the command line and I had cvs/svn commands there so I'll have to change this a bit. I need to build a page for import/export. Let me describe how would you import and export Firefox using Narro. I have a basic bash script to execute all these commands.
cvs -z3 co -r MOZILLA_1_8_BRANCH mozilla/
cd mozilla
Here I create a file .mozconfig with this in it:
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_CO_LOCALES=ro

I need to do the above only once, for my first checkout. Then, each time I want to import the changes from CVS in narro I execute:
make -f l10n-checkout
rm -rf ../l10n/en-US
make -f tools/l10n/ create-en-US
make -f tools/l10n/ check-l10n
cd ../l10n
rm -f mozilla.tar.bz2
tar cjf mozilla.tar.bz2 *
The next step is to run the php script to import mozilla.tar.bz2.
php importer.php --import-mozilla --project_id 2 --archive mozilla.tar.bz2
That's it. On my copy, I execute all the commands inside importer.php, but I cannot assume that you'll have cvs, make on the server where you're installing Narro. So you'll just do the cvs thing and produce the archive, then upload it in Narro. If you do have a server, well you'll just add a cron to do it all for you.

If I had to start a new translation, I'd just have to make an archive only with en-US in it.

The export operation is now done this way:
php importer.php --export-mozilla --project_id 2 --archive mozilla.tar.bz2
Just untar the archive over the l10n directory that you have. I am doing it automatically, the only thing I do is review the translation with a simple cvs diff command. It's not necessary, but I just like to check before I commit.

Now if all this sounds complicated, I understand. Mozilla promised me a server so I could install Narro there and you won't have to know nothing about cvs at all. You'll just push export and import buttons and that's it.

If you're a cvs freak and this sounds scary to you, I can give you more details in the comments upon request, as this is not the subject here.

Ok, that's it for today's briefing, see you in a few days with some pictures and demos and further development news.

Monday, March 3, 2008

Narro is now open

Here starts the adventure of my first open source project, Narro
If you're interested, please subscribe to this blog.