Skip to content

Use itstool instead of xml2po

Dirk HOFFMANN requested to merge github/fork/City-busz/itstool into master

Created by: City-busz

xml2po is deprecated and itstool from Yelp is recommended as its replacement.

The code in wscript that handles this looks at the Makefile.am file to figure out what pages and languages to compile. The Makefile is not actually executed in this process, but is presumably present to allow manually compiling the helpfiles too. This makefile is adapted to the style used by itstool, changing DOC_ variables to HELP_ variables.

This also moves legal.xml from DOC_INCLUDES to HELP_PAGES, to make sure it is still processed. At the same time, the python code is modified to also process .xml files (instead of just .page files). Note that before this commit, legal.xml would be processed by the Makefile, but not by the wscript file, which is now fixed.

Whereas xml2po (when run with -p) would combine an XML file and a .po file and produce a translated xml file, itstool does the same but with a .mo file. This means that the .po file must be compiled into a .mo beforehand, which done with an added msgfmt rule.

This fixes #583 (closed).

Merge request reports

Loading