Translate docs using po files
nikosx at gmail.com
Sat Jul 3 17:56:29 EDT 2010
On Fri, May 14, 2010 at 12:45 AM, Nikos Charonitakis <nikosx at gmail.com>wrote:
> 2010/5/12 Christian Stimming <stimming at tuhh.de>:
> > Am Wednesday 12 May 2010 schrieb Derek Atkins:
> >> > Create the pot template:
> >> > xml2po -o Help_ch_Intro.xml.pot Help_ch_Intro.xml
> >> >
> >> > Rename pot file according to your language code:
> >> > Help_ch_intro.xml.pot to Help_ch_intro.xml.xx.po
> >> >
> >> > Translate and convert back to xml:
> >> > xml2po -e -p Help_ch_Intro.xml.el.po -o el_Help_ch_Intro.xml
> >> > Help_ch_Intro.xml
> >> >
> >> > I have also used these steps for .xea files (accounts)
> >> >
> >> > It seems to work...
> >> While translating the docs might work great this way, it's unclear that
> >> translating the xea files are appropriate, only because the hierarchies
> >> might not make sense to your locale. In particular, various types of
> >> asset or liabilities might have different structures, and certainly the
> >> income and expense categories might differ based on your locale. So
> >> just translating the xea files is not necessarily sufficient because you
> >> might need to adjust the structure, too....
> > Absolutely. I've already explained the issue with the .xea account
> > here:
> > @Nikos: Nevertheless thanks a lot for your instructions. Do you think you
> > could add them to the wiki page http://wiki.gnucash.org/wiki/Translation,
> > maybe in the "How to translate the GnuCash guide and/or help files"
> > Thank you very much!
> > Regards,
> > Christian
> Ok, I will add instructions to docs section.
i have added this section to
"How to translate the GnuCash guide and/or help files"Using po editors
Translators are more familiar with po editors like poedit,Kbabel,Gtranslator
etc. In order to use po files you have first to convert xml files to po
files, translate them and then convert back to xml.
First you have to install a fresh version of gnome-doc-utils. For example in
a Fedora 13 system
yum install gnome-doc-utils.
1. Do the convertion with the following commands (xx is your language
code, example: el for Greek): xml2po -o helpfile.xml.pot helpfile.xml mv
2. Translate helpfile.xml.xx.po using your favorite po editor.
3. Convert back to xml: xml2po -e -p helpfile.xml.xx.po -o
4. Test your translated xml file as mention above: xmllint --valid
5. Remove xx from xx_helpfile.xml and you are ready to commit it in your
language help directory
More information about the gnucash-devel