[GRASS-dev] Re: [GRASS-SVN] r36591 - grass/trunk/imagery/i.modis.qc

Hi,

2009/4/5 <svn_grass@osgeo.org>:

input\-&gt;answer = \_\(&quot;mod09Q1&quot;\);
input1\-&gt;key = \_\(&quot;qcname&quot;\);

there is no sense to use _() macro. These strings should not be
translated. I remember that I have had fixed these issues in the past.
Please use _() where it make sense not everywhere;-)

M.

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

Oh, OK. Sorry for that.
I will have a look at it now.
Yann

2009/4/5 Martin Landa <landa.martin@gmail.com>:

Hi,

2009/4/5 <svn_grass@osgeo.org>:

input\-&gt;answer = \_\(&quot;mod09Q1&quot;\);
input1\-&gt;key = \_\(&quot;qcname&quot;\);

there is no sense to use _() macro. These strings should not be
translated. I remember that I have had fixed these issues in the past.
Please use _() where it make sense not everywhere;-)

M.

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

--
Yann Chemin
Mobile: +33 (06) 10 11 39 26
Home: +33 (02) 35 27 08 20,
Address: Gite de Mortagne,
16 rue de la chenaie,
76110 Bec de Mortagne,
France

Perso: http://www.freewebs.com/ychemin
YiKingDo: http://yikingdo.unblog.fr/

Hi,

2009/4/5 Yann Chemin <yann.chemin@gmail.com>:

Oh, OK. Sorry for that.
I will have a look at it now.

another note, please use standardized messages [1], e.g. replace

    if ((infd = G_open_cell_old(qcchan, "")) < 0)
  G_fatal_error(_("Cannot open cell file [%s]"), qcchan);

By

"Unable to open raster map %s"

Thanks, M.

[1] http://grass.osgeo.org/wiki/Development_Specs#Standard_messages_sandbox

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

Martin Landa <landa.martin@gmail.com> writes:

>> Oh, OK. Sorry for that. I will have a look at it now.

> another note, please use standardized messages [1], e.g. replace

> if ((infd = G_open_cell_old(qcchan, "")) < 0)
> G_fatal_error(_("Cannot open cell file [%s]"), qcchan);

> By

> "Unable to open raster map %s"

  If there're standardized messages, why not to have them typed in
  exactly once somewhere in the source?

  The Unix Libc custom was to make the standard messages available
  via the strerror () function, and to format the error message
  like:

PROGRAM: OBJECT: STANDARD-MESSAGE

  I. e., once the program gets into trouble, it may simply do:

   G_fatal_error ("%s: %s: %s",
                  my_name, object, G_strerror (G_get_errno ()));

  But even with the messages printed GRASS-way, it still seems to
  be possible to do something like:

int
G_open_cell_old_or_fail (...)
{
    int fd;

    if ((fd = G_open_cell_old (...)) < 0)
        G_fatal_error (_("Unable to open raster map %s"), ...);

    return fd;
}

  Given that the ``fail-if-cannot-open'' is the most common
  behaviour of the GRASS modules, this approach will probably save
  some lines of code as well.

> [1] http://grass.osgeo.org/wiki/Development_Specs#Standard_messages_sandbox

--
FSF associate member #7257