[GRASS-dev] temporal: gettext warnings
Martin Landa
landa.martin at gmail.com
Mon Jan 30 05:44:58 EST 2012
Hi,
2012/1/30 Glynn Clements <glynn at gclements.plus.com>:
>> 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.
I am not sure if we are speaking about same thing.
Index: grass/branches/develbranch_6/gui/wxpython/gmodeler/model.py
===================================================================
--- a/grass/branches/develbranch_6/gui/wxpython/gmodeler/model.py
+++ b/grass/branches/develbranch_6/gui/wxpython/gmodeler/model.py
@@ -386,5 +386,5 @@
break
if report:
- errList.append(_("%s: undefined variable
'%s'") % (cmd[0], var))
+ errList.append(cmd[0] + ": " +
_("undefined variable '%s'") % var)
### TODO: check variables in file only optionally
### errList += self._substituteFile(action, checkOnly = True)
@@ -448,5 +448,5 @@
var = sval.group(2).strip()[1:] # ignore '%'
cmd = item.GetLog(string = False)[0]
- errList.append(_("%s: undefined variable '%s'") % (cmd, var))
+ errList.append(cmd + ": " + _("undefined variable '%s'") % var)
if not checkOnly:
such changes doesn't eliminate any kind of warnings...
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
More information about the grass-dev
mailing list