[Koha-translate] Little translating help

Piotr Wejman ropuch at bagno.be
Sat Oct 8 11:02:10 CEST 2011


Hello

Translating terms without context can be quite hard, especially in
languages with declension, so I was looking for a way to see the
term-in-context.
I'm using Lokalize for translating (don't really remeber why I gave up
on using poedit/gtranslator) and it provides the links for template in
which translated term appears, but clicking it ends with missing
script error popup. I've found opensrc script for showing the source
of translated strings, but it didin't  work for me (probably it needs
some simple hack, but that's beyond my programming skills). So I write
a simple script myself. It opens the template in chosen editor and set
cursor to the line the string occurs.
I've found it extremly useful so I thought I'd share it.

To make it work:
1. Start lokalize, create a new project (with project wizard), point
it to the directory where your po file are. Close Lokalize.
2. Go to project directory, locate lokalize-scripts directory, copy
the 3 showtemplate files from attached tar.gz to lokalize-scripts.
3. Open showtemplate_config.py file and edit the basePath so it points
to your koha-tmpl directory.
    Default editor is gedit. You can change it to the one you like, as
long as it accepts the + switch (which most editors probably do).
4. Save showtemplate_config.py and start lokalize. Now, clicking the
link in "Unit metadata" window will open the file on the line
translated term occurs.

I hope it's useful to someone.

Piotr Wejman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: showtemplate.tar.gz
Type: application/x-gzip
Size: 634 bytes
Desc: not available
URL: </pipermail/koha-translate/attachments/20111008/0b66f347/attachment.bin>


More information about the Koha-translate mailing list