[GRASS-user] HTML manuals languages
Glynn Clements
glynn at gclements.plus.com
Fri Feb 26 14:24:34 EST 2010
Markus Neteler wrote:
> > As I said last time, first we need to determine whether:
> >
> > 1. A single set of manual pages are installed, for a single language,
> > or:
> > 2. Multiple languages are installed, in which case how are the files
> > named and in which directories are they stored?
>
> My suggestion some years ago was:
> - naming scheme: description|module_ISO.html
> - put files alongside the description|module.html files
> - prefer existing description|module_ISO.html files in the installed docs/html/
> directory over the english one while having in the header or footer the
> link to the english page
>
> > Also, if a translated manual page doesn't exist, the English version
> > would presumably be used, but should the --html-description header be
> > generated in English or in the selected language?
>
> IMHO in the selected language to have as much as possible available in
> that language (btw, the Japanese team translated almost all .po files in one
> month!).
So you want something like:
for each module:
generate non-localised --interface-description header (with LC_ALL=C)
generate $GISBASE/docs/html/<module>.html from <module>.html and the
non-localised header
for each language in <desired languages>:
generate --interface-description header for that language
if <module>_<lang>.html exists:
generate $GISBASE/docs/html/<module>_<lang>.html from
<module>_<lang>.html and the localised header
else:
generate $GISBASE/docs/html/<module>_<lang>.html from
<module>.html and the localised header
?
What about the (nroff) manual pages?
As for links between manual pages:
The generated headers don't contain any links. The only links are
those put there by the author of the <module>.html file. Authors of
localised <module>.html files can put links to the localised versions
of other files if they exist. However: if a semi-localised HTML file
is generated by combining the localised header with the English
<module>.html, any links will refer to the English version even if a
localised or semi-localised version exists.
An alternative approach would be to put localised and semi-localised
versions of HTML files in a separate directory, i.e.
$GISBASE/docs/html/<lang>/<module>.html. As the "See Also" links are
relative, they will always refer to the (semi-) localised version in
the same directory.
The alternative would be to process the HTML files to re-write any
links to point to the localised version, which means writing the code
to do it (as well as recognising any links which shouldn't be
re-written).
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list