[sldev] Translations

Erik Hill zortiger at gmail.com
Fri Jul 27 11:59:34 PDT 2007


I think your over thinking  the gettext.

Gettext is vary handy, ill admit. But if it was it would be best to redo the
hole translation structure if gettext was used.
One of the best things about gettext in my opinion is that there are tools
to phrase actual source code.
So the hole thing could be done with english and the use of the function
_gettext(translate), then the source could be ran though a program to
process all the gettext generating a pot file.

Then translations, would be done from that, saves a lot of time, and if a
translations missing, the defaults used.


On 7/27/07, Daniel Nylander <po at danielnylander.se> wrote:
>
>
> Guys (and gals), I think I'm on to something here.
>
> I'm using the xml2po from the gnome-doc-utils package to convert all
> translatable XML data to GNU gettext strings. GNU gettext is also
> required.
>
>
> cd indra/newview/skins/xui
>
> (I'm using the 1.18.0.6 release source code on Linux)
>
>
> 1. Create the POT file (POT = untranslated PO Template)
>
> xml2po -o secondlife.pot en-us/*.xml
>
> 2. Copy the template (secondlife.pot) to xx.po (where xx is your country
> code) with a PO editor (such as poedit, kbabel etc.). The file contains
> 1609 different text strings.
>
> I have generated a template which you can see over at
> http://home.danielnylander.se/translations/secondlife/secondlife.pot
>
> 3. Convert the translated PO file back to localized XML files
>
> xml2po -p xx.po en-us/alerts.xml > xx/alerts.xml
>
> This can also be automated for all 137 English XML files (Unix shell
> script)
>
> cd en-us; for a in *.xml; do xml2po -p ../xx.po $a > ../xx/$a; echo "$a
> done"; done
>
> 4. Voila! Now you should have a complete translation.
>
>
> If you need to update an existing translation, create the POT file but
> use the 'msgmerge' command to merge is new structure with the old  PO
> file. This will add/change the strings in the existing PO file and the
> translator will directly see the changed/new strings.
>
>
> This process means:
>
> - Translators should not touch the XML files at all. One string can be
> used at hundreds of places but will only be translated once.
>
> - No faulty XML files(?). Translators will only touch translatable
> strings and nothing else.
>
> - Developers can update the translations and send the incomplete PO file
> to the translators for a quick update. Developers will then generate the
> XML files.
>
> - Proofreading will be so easy. Everything is in one file. Creating a
> diff between versions is even more simple.
>
> - There are web based translation tools which can be offered to
> translators and translator teams. One free tool is Pootle.
> http://www.wordforge.org/drupal/projects/wordforge/tools/pootle
>
>
> Please test this process and see if it works out for you!
>
> --
> Daniel Nylander (CISSP, GCUX, GCFA)
> Stockholm, Sweden
> http://www.DanielNylander.se
> info at danielnylander.se  yeager at ubuntu.com  dnylande at gnome.org
>
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> /index.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20070727/f6d13cd4/attachment-0001.htm


More information about the SLDev mailing list