Обсуждение: some strange messages

Поиск
Список
Период
Сортировка

some strange messages

От
Alvaro Herrera
Дата:
There are a couple of messages in the backend that are probably
misworded:

#: utils/misc/guc.c:1553
msgid "The Unix-domain socket directory to listen to"

I think it should be something like
"Directory where the Unix-domain socket should be created"


#: utils/adt/acl.c:780
msgid "cannot remove the world ACL"

What exactly is "the world ACL"?  The code there is not too commented
and I couldn't find out what's this about.  Some sort of default or
initial ACL maybe?


#: parser/gram.y:3249
msgid "argument type missing (use NONE for unary operators)"

Maybe the string between parenthesis should be in a separate errhint() ?

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"¿Qué importan los años?  Lo que realmente importa es comprobar que
a fin de cuentas la mejor edad de la vida es estar vivo"  (Mafalda)


Re: some strange messages

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> There are a couple of messages in the backend that are probably
> misworded:

> #: utils/misc/guc.c:1553
> msgid "The Unix-domain socket directory to listen to"
> I think it should be something like
> "Directory where the Unix-domain socket should be created"

Fair enough --- any objections?

> #: utils/adt/acl.c:780
> msgid "cannot remove the world ACL"

> What exactly is "the world ACL"?

Privileges granted to PUBLIC --- the ACL code always keeps PUBLIC
privileges as an ACL entry, even when they are empty.  I suspect this is
an internal error that cannot happen unless an upper software layer blew
it, and as such does not need to be translated.  Can anyone check that?
I'm about out of steam for tonight...

> #: parser/gram.y:3249
> msgid "argument type missing (use NONE for unary operators)"

> Maybe the string between parenthesis should be in a separate errhint() ?

Or rewrite entirely.  Do you have a better wording?
        regards, tom lane


Re: some strange messages

От
Alvaro Herrera
Дата:
On Mon, Sep 15, 2003 at 01:28:52AM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre@dcc.uchile.cl> writes:

> > #: utils/adt/acl.c:780
> > msgid "cannot remove the world ACL"
> 
> > What exactly is "the world ACL"?
> 
> Privileges granted to PUBLIC --- the ACL code always keeps PUBLIC
> privileges as an ACL entry, even when they are empty.  I suspect this is
> an internal error that cannot happen unless an upper software layer blew
> it, and as such does not need to be translated.  Can anyone check that?
> I'm about out of steam for tonight...

Hmm.. the code is making the assumption that this ACL is at position 0
of the ACL list.

It would be quite nice if this message needs not be translated, because
it's the only message that's left for me currently, and even if I
understand what's about I can't find a good translation.

> > #: parser/gram.y:3249
> > msgid "argument type missing (use NONE for unary operators)"
> 
> > Maybe the string between parenthesis should be in a separate errhint() ?
> 
> Or rewrite entirely.  Do you have a better wording?

Yes.  In fact something very similar appears in regproc.c, line 636:
   if (nargs == 1)       ereport(ERROR,               (errcode(ERRCODE_UNDEFINED_PARAMETER),
errmsg("missingargument"),                errhint("Use NONE to denote the missing argument of a unary operator.")));
 

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El realista sabe lo que quiere; el idealista quiere lo que sabe" (Anonimo)


Re: some strange messages

От
Peter Eisentraut
Дата:
Alvaro Herrera writes:

> #: utils/adt/acl.c:780
> msgid "cannot remove the world ACL"
>
> What exactly is "the world ACL"?  The code there is not too commented
> and I couldn't find out what's this about.  Some sort of default or
> initial ACL maybe?

I've changed to message to "aclitem for public may not be removed".
"aclitem" is a data type, "public" refers to the public grantee.  I think
that's easier to translate, and it should be clear to someone who uses the
function (which should be no one).

-- 
Peter Eisentraut   peter_e@gmx.net



Re: some strange messages

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> On Mon, Sep 15, 2003 at 01:28:52AM -0400, Tom Lane wrote:
>> Or rewrite entirely.  Do you have a better wording?

> Yes.  In fact something very similar appears in regproc.c, line 636:

>     if (nargs == 1)
>         ereport(ERROR,
>                 (errcode(ERRCODE_UNDEFINED_PARAMETER),
>                  errmsg("missing argument"),
>                  errhint("Use NONE to denote the missing argument of a unary operator.")));

Done; I also adjusted the guc.c entry per your suggestion.  Peter
already dealt with the third item.
        regards, tom lane