[GRASS-dev] temporal: gettext warnings

Glynn Clements glynn at gclements.plus.com
Mon Jan 30 04:19:44 EST 2012


Martin Landa wrote:

> They could be fixed by splitting the message [1] or using named
> convention [2].

[1] is the wrong thing to do (and that particular example should be
reverted). It eliminates the warning without addressing the issue
which caused the warning.

Warnings provide clues as to how the code can be improved. They
shouldn't be silenced by making the code worse.

If it isn't possible to eliminate a warning without degrading the
code, then the warning should just be allowed to happen.

In Python code, using named substitutions is the right approach; it's
guaranteed to be supported by any version of Python which will work
with GRASS. With C code, not all platforms support numbered
specifications, but I don't think that xgettext warns about that.

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


More information about the grass-dev mailing list