[Gimp-docs] First experience with po's

julien jm.hard at wanadoo.fr
Sat Dec 27 09:34:02 PST 2008


Hi all,

Here is my first experience using po's (po/fr/../doc.po, pot/../doc.pot,
src/../doc.xml). I consider two cases:

A - Translating only:
No change in the help structure; no add, no deletion. Only translation
of the strings.
	1- Using the po file is the simplest way.
		a/ First update this po to get strings that have changed by using the
following command:
msgmerge -U po/fr/../doc.po
This will add changed strings that are marked with a "Fuzzy" comment.
Edit this updated po files, searching for "Fuzzy".
		b/ When your file is OK, validate it with this command (being in the
folder containing  doc.po):
msgfmt -c --stat doc.po
This displays possible errors and some stats and generate a doc.mo file
that is of no use here.
		c/ make the "svn diff"

	2- You may want to work on a xml file rather than on a po:
		a/ update the po files you want to use as above
		b/ Create the xml files for your language (being in "trunk"):
make -f Makefile.GNU xml-fr for example.
This creates a xml folder in "trunk".
		c/ Edit the wanted xml file.
		d/ We can't validate xml for the moment. But you can open the file in
a web browser (Firefox) that will detect some errors.
Or copy the file in an old sandbox (before xml2po migration) and run
make validate...:-(
		e/ Transform your xml file to po (being in trunk):
xml2po -e -o <path to doc.po> -r <path to your doc.xml> src/../doc.xml
(the english doc.xml).
		f/ cut-paste the doc.po file into the po directory.
		g/ Goto 1b

B - Updating gimp-help-2

	1- Edit the src/../doc.xml file (english). Or edit a xml file in your
language and translate it after.
	2- Validate it
	3- Transform the updated doc.xml file to doc.pot:
xml2po -e -o doc.pot doc.xml
	4- Edit the doc.xml file in your language, validate it
	5- goto 1e

You may want to view your xml file in html. Waiting for Ulf's make
html-fr, I use
$yelp file:///home/<user-id>/.../trunk/xml/<LANG>/doc.xml
Unfortunately, images are not displayed by yelp. How to do?

I would be very pleased if you can provide a more simple way to work.

Julien




More information about the Gimp-docs mailing list