raw output

Galician debconf template translation workflow

By jacobo, on 2008-5-20 at 00:43, under Translation, Debian

One of the things I do when I’m at home is translating debconf templates into Galician. I’m not doing bad at all. Although it’s just me working alone (by choice), mine is the 10th most complete translation, and climbing :)

I’m going to document my workflow, for two reasons: one is that others may find it useful or may suggest improvements. The other is that, in this way, I won’t depend on my bash history not being erased :)

I have a compendium with almost all strings in all debconf templates I translated, and several scripts I use to maintain that compendium, apply it to translations, etc. It is available at http://darcs.tarrio.org/gl-templates/, and can be downloaded with Darcs using this command:

$ darcs get http://darcs.tarrio.org/gl-templates/

In my local machine I keep it in $HOME/pos.

(You may use this compendium and scripts freely, if you want, but be sure to change all appearances of “gl.po” into the appropriate file name for your language.)

Nowadays I’m mostly driven by bubulle’s NMU announcements. Whenever he announces a NMU for a package I haven’t translated or whose Galician translation is outdated, I work on it.

This is what I do to start a new translation for a package called “example":

  1. Extract the attached templates.pot file into $HOME/pos/example_templates.pot.
  2. Bootstrap the translation with my compendium, using this command:
    $ ./bootstrap-po example_templates.pot > gl.po

    The script is smart enough to know that a file called example_templates.pot is a templates file for a package called example. However, I can specify a different package name as its second argument:

    $ ./bootstrap-po nonsensicalfilename.pot example > gl.po
  3. The generated gl.po file is UTF-8 encoded. However, I use xemacs to translate, which cannot read that, so I encode it into iso-8859-1:
    $ msgconv -t iso-8859-1 gl.po -o gll.po
  4. Edit the file.
  5. Encode the edited file into utf-8:
    $ msgconv -t utf-8 gll.po -o gl.po
  6. Add the translations to my compendium:
    $ ./add-total-po

    (My compendium is the total.po.txt file, hence the name.)

  7. Optional: edit the compendium to remove obsolete strings or strings which may be ambiguous so I don’t want them in the compendium.
  8. Send the translated file to the package maintainer using the BTS:
    $ ./send-po example
  9. Record and push the changes to the compendium:
    $ darcs record -a
    $ darcs push -a

This is how I update an existing, outdated translation:

  1. Extract the file into $HOME/pos/gl.po.
  2. Most likely, it’s UTF-8 encoded. Encode it into iso-8859-1:
    $ msgconv -t iso-8859-1 gl.po -o gll.po
  3. Edit the file, fix only the fuzzy translations.
  4. Encode it back into UTF-8:
    $ msgconv -t utf-8 gll.po -o gl.po
  5. Update the translation using the existing translated strings and the compendium:
    $ ./refresh-po gl.po | msgconv -t iso-8859-1 -o gll.po
  6. Open the file. Hopefully you’ll have new fuzzy translations. Edit the translation and complete it, or do some strings then refresh again and edit and refresh again until the file is completed. If the file contains lots of similar sentences you can just translate a couple of them, refresh, and the other ones will then be all fuzzy. Magic!
  7. When I’m done, encode into UTF-8, update the compendium, send to maintainer, submit changes to compendium.


There are 3 comments for this post.

  1. Comment by Leandro Regueiro, on 2008-5-20 at 11:23 | permalink

    Ánimo Jacobo, ti podes!! Moitas grazas pola información sobre a túa forma de traballar, sempre é útil saber como traballan outros tradutores para mellorar a nosa propia formar de traballar…

  2. Comment by Nekral, on 2008-5-20 at 11:37 | permalink

    Climbing, indeed!

    Did you try using the compendium from Eddy:

    Good luck with your translation!

  3. Comment by Javier, on 2008-5-22 at 01:27 | permalink

    I would add two steps to the ones you have in your process:

    - review if the translation is correctly formated and fully up-to-date with ‘msgstat gl.po’, where msgstat is this little alias: alias msgstat=’msgfmt –stat -c -v -o /dev/null’

    - spellcheck the translation before adding it to the glosary with ‘msgspell’. I use two alias here (for ISO-8859-1 and UTF-8 files):

    alias msgspell-lat1=’POFileSpell –command="ispell -l” -i’
    alias msgspell-u8=’POFileSpell –command="iconv -f utf8 -t latin1 | ispell -l” -i’

    The first one allows one to edit the PO file when a typo is found while the second one doesn’t (you have to edit the file later one) but you can add known “good” words and they will be added to the PO file (in the translation header: X-POFile-SpellExtra)

Sorry, the comment form is closed at this time.