[GRASS-dev] Re: more translation - manual pages

Glynn Clements glynn at gclements.plus.com
Thu Oct 9 23:16:52 EDT 2008


Markus Neteler wrote:

> Action item for us:
> - understand how to support multi-language manual pages. this is
>   a request which is on the plate for years meanwhile... Cannot be so hard!

Making them in the first place isn't hard. Ensuring that the
translations get updated whenever the original is updated may be
harder to achieve.

In terms of technical changes, the main problem is that you can't have
multiple wildcards (%) in a pattern rule, and the wildcard is already
being used for the module name, so we would need to repeat the
HTML-related Makefile rules for each locale.

This could be done using $(foreach ... $(eval $(call ...))), but that
can be quite hard to read (see include/Make/Multi.make or
locale/Makefile for examples).

It can be simplified if you only want to generate a single language
from each run (although package maintainers won't be very happy with
this), by just adding $(LANG) to the rules, e.g.:

	-$(HTMLDIR)/%.html: %.html %.tmp.html $(HTMLSRC)
	+$(HTMLDIR)/$(LANG)/%.html: %.$(LANG).html %.$(LANG).tmp.html $(HTMLSRC)

Even so, you'll probably still need at least two rules, one for the
untranslated (i.e. English) version and one for the translated
version, unless you're assuming that all translations will be complete
(i.e. every file will have a translated version), rather than having
only the most important pages translated.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list