[GRASS-dev] [GRASS-SVN] r65497 - grass/trunk/locale/po

On Wed, Jun 17, 2015 at 10:14 AM, <svn_grass@osgeo.org> wrote:

Modified: grass/trunk/locale/po/grasslibs_fr.po

— grass/trunk/locale/po/grasslibs_fr.po 2015-06-17 13:53:52 UTC (rev 65496)
+++ grass/trunk/locale/po/grasslibs_fr.po 2015-06-17 14:14:56 UTC (rev 65497)
@@ -1909,7 +1909,7 @@
#: …/lib/init/grass.py:130 …/lib/gis/parser.c:599
#, fuzzy
msgid “ERROR”
-msgstr “ERREUR :”
+msgstr "ERREUR: "

Hi Mortitz, I’m not experienced with translations but it seems to me that the translations doesn’t need to be fuzzy and it should not contain colon and space but only “ERREUR”.

On 18/06/15 15:48, Vaclav Petras wrote:

On Wed, Jun 17, 2015 at 10:14 AM, <svn_grass@osgeo.org
<mailto:svn_grass@osgeo.org>> wrote:
>
> Modified: grass/trunk/locale/po/grasslibs_fr.po
> ===================================================================
> --- grass/trunk/locale/po/grasslibs_fr.po 2015-06-17 13:53:52
UTC (rev 65496)
> +++ grass/trunk/locale/po/grasslibs_fr.po 2015-06-17 14:14:56
UTC (rev 65497)
> @@ -1909,7 +1909,7 @@
> #: ../lib/init/grass.py:130 ../lib/gis/parser.c:599
> #, fuzzy
> msgid "ERROR"
> -msgstr "ERREUR :"
> +msgstr "ERREUR: "

Hi Mortitz, I'm not experienced with translations but it seems to me
that the translations doesn't need to be fuzzy

Don't know about the fuzzy, I didn't touch that.

and it should not contain
colon and space but only "ERREUR".

Well lib/gis/error.c, l 360ff define:

     prefix_std[0] = "";
     prefix_std[1] = _("WARNING: ");
     prefix_std[2] = _("ERROR: ");

so I guess the translation should also have the colon and space. We could do something like this:

     char *postfix
     postfix = ": "
     prefix_std[0] = "";
     prefix_std[1] = _("WARNING%s", postfix);
     prefix_std[2] = _("ERROR%s", postfix);

But then again, maybe there are different rules of how to position colons and spaces according to locales.

Moritz

On Thu, Jun 18, 2015 at 10:08 AM, Moritz Lennert <
mlennert@club.worldonline.be> wrote:

On 18/06/15 15:48, Vaclav Petras wrote:

On Wed, Jun 17, 2015 at 10:14 AM, <svn_grass@osgeo.org
<mailto:svn_grass@osgeo.org>> wrote:
>
> Modified: grass/trunk/locale/po/grasslibs_fr.po
> ===================================================================
> --- grass/trunk/locale/po/grasslibs_fr.po 2015-06-17 13:53:52
UTC (rev 65496)
> +++ grass/trunk/locale/po/grasslibs_fr.po 2015-06-17 14:14:56
UTC (rev 65497)
> @@ -1909,7 +1909,7 @@
> #: ../lib/init/grass.py:130 ../lib/gis/parser.c:599
> #, fuzzy
> msgid "ERROR"
> -msgstr "ERREUR :"
> +msgstr "ERREUR: "

Hi Mortitz, I'm not experienced with translations but it seems to me
that the translations doesn't need to be fuzzy

Don't know about the fuzzy, I didn't touch that.

As I said my experience is limited but I though that when you translate the
string manually, you remove fuzzy.

and it should not contain

colon and space but only "ERREUR".

Well lib/gis/error.c, l 360ff define:

    prefix_std[0] = "";
    prefix_std[1] = _("WARNING: ");
    prefix_std[2] = _("ERROR: ");

According to your commit there is "ERROR: " but also "ERROR" somewhere.
"ERROR: " should be translated as "ERREUR: " while "ERROR" as "ERREUR".
That's what I was trying to say.

https://trac.osgeo.org/grass/changeset/65497

so I guess the translation should also have the colon and space. We could
do something like this:

    char *postfix
    postfix = ": "
    prefix_std[0] = "";
    prefix_std[1] = _("WARNING%s", postfix);
    prefix_std[2] = _("ERROR%s", postfix);

That's unnecessary complicated and it doesn't solve all issues as you note
below. Having two different strings, with and without colon&space, should
account for most of the cases (the state we have now).

But then again, maybe there are different rules of how to position colons
and spaces according to locales.

I don't know the current situation but ideally, the error message should be
composed using [in Python syntax]:

_("ERROR: %s") % msg

rather then

_("ERROR: ") + msg

But this would require two step construction of the message since `msg`
again will have again variable parts and it might be too complex or too
cumbersome (especially in C unless there is some gettext feature which
would help us).

Moritz

On 18/06/15 16:55, Vaclav Petras wrote:

On Thu, Jun 18, 2015 at 10:08 AM, Moritz Lennert
<mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>> wrote:

    On 18/06/15 15:48, Vaclav Petras wrote:

        On Wed, Jun 17, 2015 at 10:14 AM, <svn_grass@osgeo.org
        <mailto:svn_grass@osgeo.org>
        <mailto:svn_grass@osgeo.org>> wrote:
          >
          > Modified: grass/trunk/locale/po/grasslibs_fr.po
          >
        ===================================================================
          > --- grass/trunk/locale/po/grasslibs_fr.po 2015-06-17
        13:53:52
        UTC (rev 65496)
          > +++ grass/trunk/locale/po/grasslibs_fr.po 2015-06-17
        14:14:56
        UTC (rev 65497)
          > @@ -1909,7 +1909,7 @@
          > #: ../lib/init/grass.py:130 ../lib/gis/parser.c:599
          > #, fuzzy
          > msgid "ERROR"
          > -msgstr "ERREUR :"
          > +msgstr "ERREUR: "

        Hi Mortitz, I'm not experienced with translations but it seems to me
        that the translations doesn't need to be fuzzy

    Don't know about the fuzzy, I didn't touch that.

As I said my experience is limited but I though that when you translate
the string manually, you remove fuzzy.

I have not been involved in translation very much, so I don't know. Maybe someone can educate us ? :wink:

According to your commit there is "ERROR: " but also "ERROR" somewhere.
"ERROR: " should be translated as "ERREUR: " while "ERROR"as "ERREUR".
That's what I was trying to say.

Oops, you're right. I just modified the French, without even looking at the English... The first one comes from parser.c where the colon and space are added in the code.

Thanks for noticing that !

Moritz

2015-06-18 18:58 GMT+03:00 Moritz Lennert <mlennert@club.worldonline.be>:

On 18/06/15 16:55, Vaclav Petras wrote:

As I said my experience is limited but I though that when you translate
the string manually, you remove fuzzy.

I have not been involved in translation very much, so I don't know. Maybe
someone can educate us ? :wink:

What kind of tool you were using for translating? If it was an
ordinary text editor, I would strongly suggest to give Lokalize a
shot. It helps to keep PO file in order.
As it goes with fuzzy - it should be removed if string is considered
to be properly translated. For PO file it means - "something changed
in the original source file. Dear translator, please check if the old
translation still fits". When generating MO file, fuzzy string equals
untranslated one.

Moritz, your idea on using "string%s" % postfix is really bad for
translators as then it needs an explanation on contents of %s to
translate it in a proper way. GRASS code contains mechanism to extract
comments for translators (see GTC in readme file), but still I would
call it a bad idea without any clear benefit.

_("ERROR: ") + msg is also not a bright idea as it would not play
nicely with right to left (RTL) languages. I am not an expert in RTL
and thus can not comment too much. At the moment there seems to be no
feedback from RTL users on GRASS issues thus RTL hasn't got any
attention in GRASS.
I think - better would be (RTL experts can correct me):
// GTC %s will contain translated error message
_("ERROR: %s") % msg

WBR,
Maris.

On Thu, Jun 18, 2015 at 1:48 PM, Maris Nartiss <maris.gis@gmail.com> wrote:

_("ERROR: ") + msg is also not a bright idea as it would not play
nicely with right to left (RTL) languages. I am not an expert in RTL
and thus can not comment too much. At the moment there seems to be no
feedback from RTL users on GRASS issues thus RTL hasn't got any
attention in GRASS.
I think - better would be (RTL experts can correct me):
// GTC %s will contain translated error message
_("ERROR: %s") % msg

Agreed, that's exactly what I meant! But what is the current state, I don't
know.