[GRASS-translations] G.manual expression missing
glynn at gclements.plus.com
Tue Jul 26 17:40:09 EDT 2011
Luisa Peña wrote:
> I'm running g.manual and I'm getting this error:
> No HTML manual page entry for <%s>
> But it seems to be missing from po files. Is this true? can I add it to the
> po file? if so, to which file?
g.manual is a script. Currently, there is no mechanism for translating
messages within shell scripts (the "help" output is generated by
g.parser, which translates labels, descriptions, etc). 7.0 uses Python
for scripts, which can use Python's gettext module for translation.
In theory, it would be possible to extend g.message to support
translation. One complication is that any substitutions would have to
be perfomed by g.message after the template string has been
E.g. g.manual does:
g.message -e "No HTML manual page entry for <$1>."
where $1 is the name of the manual page. The shell substitutes the
value into the string passed to g.message, which only sees the final
If g.message just translated the message= argument, you would need a
separate translation for each manual page. So it would need to accept
a template and a list of substitutions, e.g.:
g.message -t -e "No HTML manual page entry for <%s>." subs="$1"
The template string would be translated, then the parameters
substituted, and the resulting string passed to G_message(),
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-translations