Translating Mallard files

Shaun McCance <shaunm at gnome.org>
Fri Feb 17 12:57:08 EST 2017

On Wed, 2017-02-15 at 21:20 +0100, Sascha Manns wrote:
> Hello list,
> 
> i have created a original "C" documentation for my new app. So i have
> some *.page files and one legal.xml.
> Now i would like to translate that stuff into german.
> How can i create one po file what contains all strings from all the
> mentioned stuff?

Hi Sascha,

You'll probably want to use itstool for this. To create a PO file for
the page files and legal.xml:

itstool -o de.po *.page *.xml

Edit that PO file with whichever tool you prefer. To merge, you should
create a separate directory for each language. I'm going to assume you
have a directory structure like this:

help
 - C
   - *.page
   - legal.xml
 - de
   - de.po
   - de.mo

You have to pass itstool the MO file for merging, not the PO file. To
get an MO file from a PO file, run

msgfmt -o de.mo de.po

Then to merge, from the de directory, run this:

itstool -m de.mo ../C/*.page ../C/*.xml

--
Shaun