[GRASS-dev] Re: [GRASS-SVN] r48376 - in grass/trunk: lib/python lib/temporal temporal temporal/t.create temporal/t.time.abs temporal/t.time.rel

Hi,

2011/9/20 <svn_grass@osgeo.org>:

Author: huhabla
Date: 2011-09-19 15:45:22 -0700 (Mon, 19 Sep 2011)
New Revision: 48376

...

+ core.error("Unable to remove space time dataset register table " + self.get_stds_register())

...

btw, the messages should be marked for translation. Also string
substitutions is preferable, it's better for translators. In this case

core.error(_("Unable to remove space time dataset register table ") +
self.get_stds_register())

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Martin Landa wrote:

btw, the messages should be marked for translation. Also string
substitutions is preferable, it's better for translators. In this case

core.error(_("Unable to remove space time dataset register table ") + self.get_stds_register())

Use:

core.error(_("Unable to remove space time dataset register table %s") % self.get_stds_register())

Using substitution allows the position of the subject/object to be
changed if that's appropriate for a particular language. Appending
means that it has to come at the end, which can sometimes require
contrived and/or grammatically incorrect translations.

If a string contains more than one substitution, it's better to use
the dictionary form, to allow the order to be changed. Unlike C's
printf(), Python doesn't support the "%1$s" notation.

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