ertza

software librea eta lokalizazioaren arteko ertzean.

Archive for the ‘projects’


Pootle 1.2.0 is out

Finally, after working hard Pootle 1.2.0 is out (along with the new version of Translate Toolkit). There have been lots of changes in the last months (most of the in the backend), and it’s a pleasure seeing this released publicly.

But the way goes on, since there’s quite a bit of work to do: improving the recently added features, adding new ones, but specially merging the mozootle branch with the main development branch. It will bring very attractive changes, starting from the appeareance.

But until all of this sees the light, we will have to wait some months. Meanwhile, there we have the new Pootle.

Summer of Code is over: Summary

It seems it was yesterday when I applied for the Google Summer of Code 2008, and official coding period ended just some days ago. It’s been a new fantastic experience for me, and in this post I’ll try to summarize the work that has been done and what’s been left out.

As you probably know, my project aimed to improve Pootle’s user experience by adding new functionalities and improving existing ones.

(more…)

Fixing git-svn after SourceForge update

Recently SourceForge has updated its SVN infrastructure and it seems that from now on git-svn dcommit doesn’t work anymore with repositories configured to use the plain HTTP protocol, so we have to change some things in order to have our git-svn environment working with HTTPS.

Wynand has shown me his orange-belt-git-man abilities and in a few minutes we’ve managed to get all the stuff working again. I’m going to list the command we’ve used just for the record.

  1. First, we create a file containing all our refs list, .git/packed-refs:
    $ git-gc
  2. Before making any change to our repository, we make a backup. After that, we can run git-filter-branch, a tool that lets rewrite the git revision history by rewriting the branches. Wynand provided a one-liner that does the job:
    $ git-filter-branch --msg-filter 'sed "s/git-svn-id: http/git-svn-id: https/g"' $(cat .git/packed-refs | awk '/[a-fA-F0-9]*/ {print $2}' | grep -v 'pack-refs')

    Which replaces the occurrences of http with https for each reference listed under .git/packed-refs. We should see something like this in the progress:

    Rewrite 05f17b2a31e82fc1354d3865ae9adcaef3a7ca5e (3374/3415)
  3. Then, we need to fix our repository configuration stored in .git/config:
    $ vi .git/config
    :s/http/https
    :wq
  4. Now, the first step to see whether it works:
    $ git-svn rebase

    Perhaps we get an error regarding SVN:

    Unable to determine upstream SVN information from working tree history

    In that case,

    rm -rf .git/svn/

    does the trick.

Note that probably we need to pass the -f flag to git-push the first time we’re pushing after this change.
Now we can keep on working with git and SVN! Thank you Wynand!

Testing needed for the new suggestions interface

More or less the new suggestions interface is finished so the more we test it, the better we get it. So feel free to test the latest patch from bug 427, and please comment the issues you found. You can provide feedback here, in the tracking bug, in my personal dashboard, or in the translate-pootle mailing list.

Update: we’ve setup the beta Pootle server at beta.locamotion.org with the new suggestions interface so it’s easier for you to check out this new feature.

Enabling suggestions while translating

Pootle has the ability of making translation suggestions but at the moment they’re invisible at the time of translating unless the user selects View Suggestions from the editing functions, which is not a really effective approach.

Therefore, aiming to avoid duplicated work that can cause not seeing what others have suggested before, I’m working on enabling suggestions while translating. The user now sees the suggestions just below the translation text area. Users with reviewing privileges are able to accept and discard suggestions from the same interface, and that’s actually the part where I’ve been thinking of something different. Here comes the AJAX part.

To keep things easy and not reinventing the wheel, I’ve used jQuery, just as the guys working at mozootle have done ;) jQuery is a JavaScript library focused on keeping simplicity for developers at the same time of being fast and powerful. For instance, creating an HTTP POST request using the famous XMLHttpRequest object is as easy as writing $.post("myscriptname", {param1: "value1"});

Coming back to our context, if the user has reviewing privileges, the interface will show two additional buttons (images) to accept or reject the suggestion. I’ve used the tangoished GTK+ stock icons (resizing them from 20×20 to 16×16), although I could use famfamfam silk icons too; both are great.
When the user selects an option, jQuery starts its action: first, retrieves the necessary parameters and creates a serialized string, then it makes an AJAX request and finally if all goes fine the suggestion is added or removed.

Viewing suggestions while translatingAccepting/rejecting suggestions works in an AJAX-fashion. Click to enlarge.

To give this a cool aspect, I’ve used an effect similar to the WordPress Comments Management. As of today, this is implemented only for the reject option, because accepting a suggestion should suppose more things than simply accepting that one: it should reject all the remaining suggestions and display things accordingly.

I think this feature will be more or less finished by this week, so keep an eye on bug 427 for patches.

Update: I’ve made a little screencast to show you how this works.

Status update

Although there’s nothing tracked on this blog, Summer of Code officially started on May 26th (see the timeline), and it’s almost a month since then.

For those who aren’t on the loop, I’m working on adding and improving some Pootle functionalities, mentored by Sayamindu Dasgupta. Pootle is a web-based translation software built on top of the Translate Toolkit.

Obviously there have been things happening, and I’ll try to summarize in this post the main development that has been done.

For the impatient: you can checkout my project dashboard to have an overview of what’s going on.

(more…)