i18n for pbuilder chroot


Today started working with bug #953753, it’s about the klavaro interface, klavaro is a program to learn writing faster in a keyboard, the problem is than when it’s launched shows a mixed version between English/Spanish, I know very little about how launchpad manage translations, however I found that klavaro maintain its own po directory where translations live, the problem is because in the es.po file are some fuzzy strings left, so I translated the missing strings and make it works (at least in my computer), I’m still working in the patch…

Once I build it correctly I had no idea how to test it, after a while searching I finally found the answer hiding at https://help.ubuntu.com/community/Locale, the current steps are as follow:

    $ sudo DIST=precise ARCH=amd64 pbuilder login

if you don’t have a pbuilder image, check https://wiki.ubuntu.com/PbuilderHowto out, or our notes

    [chroot] # apt-get install language-pack-es #interchange -es for the\
               2 letters of your own lang
    [chroot] # LC_ALL=es_MX.utf-8  command_foo

So, in this case, I wanted to see if the whole klavaro interface was translated, I went like this:

     [chroot] # bzr branch lp:ubuntu/klavaro && cd klavaro
     [chroot] # edit-patch 03-fix-mixed-interface
     [chroot] # added the patch
     [chroot] # bzr bd -- -B -uc -u && dpkg -i .../klavaro*.deb
     [chroot] # LC_ALL=es_MX.utf-8  klavaro

And it worked as expected =]

PD: I had to report a bug against edit-patch coz didn’t work out of the box for me, however, what a nice tool once it’s running n___n


One response »

  1. It also may be the case that it would require LANGUAGE to be setup too:

    [chroot]# LANGUAGE=es LC_ALL=es_MX.utf-8 command

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s