Re: Letter case of "admin option" - Mailing list pgsql-hackers
From | Alvaro Herrera |
---|---|
Subject | Re: Letter case of "admin option" |
Date | |
Msg-id | 20220825085816.ffsfhk2rvgc5ua2j@alvherre.pgsql Whole thread Raw |
In response to | Re: Letter case of "admin option" (Kyotaro Horiguchi <horikyota.ntt@gmail.com>) |
Responses |
Re: Letter case of "admin option"
|
List | pgsql-hackers |
On 2022-Aug-25, Kyotaro Horiguchi wrote: > At Tue, 23 Aug 2022 09:58:47 -0400, Robert Haas <robertmhaas@gmail.com> wrote in > I would translate "ADMIN OPTION" to "ADMIN OPTION" in Japanese but > "admin option" is translated to "管理者オプション" which is a bit hard > for the readers to come up with the connection to "ADMIN OPTION" (or > ADMIN <roles>). I guess this is somewhat simliar to use "You need to > give capability to administrate the role" to suggest users to add WITH > ADMIN OPTION to the role. > > Maybe Álvaro has a similar difficulty on it. Exactly. I ran a quick poll in a Spanish community. Everyone who responded (not many admittedly) agreed with this idea -- they find the message clearer if the keyword is mentioned explicitly in the translation. > > In short, I'm wondering whether we should regard ADMIN as the name of > > the option, but OPTION as part of the GRANT syntax, and hence > > capitalize it "ADMIN option". However, if the non-English speakers on > > this list have a strong preference for something else I'm certainly > > not going to fight about it. > > "ADMIN option" which is translated into "ADMINオプション" is fine by > me. I hope Álvaro thinks the same way. Hmm, but our docs say that the option is called ADMIN OPTION, don't they? And I think the standard sees it the same way. You cannot invoke it without the word OPTION. I understand the point of view, but I don't think it is clearer done that way. It is different for example with INHERIT; we could say "the INHERIT option" making the word "option" translatable in that phrase. But then you don't have to add that word in the command. > What do you think about the attached? I prefer the <literal>ADMIN OPTION</literal> interpretation (both for docs and error messages). I think it's clearer that way, given that the syntax is what it is. > > > > !is_admin_of_role(currentUserId, roleid)) > > > > ereport(ERROR, > > > > (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), > > > > errmsg("must have admin option on role \"%s\"", > > > > rolename))); > > > > > > The message seems a bit short that it only mentions admin option while > > > omitting CREATEROLE privilege. "must have CREATEROLE privilege or > > > admin option on role %s" might be better. Or we could say just > > > "insufficient privilege" or "permission denied" in the main error > > > message then provide "CREATEROLE privilege or admin option on role %s > > > is required" in DETAILS or HINTS message. I'm not opposed to moving that part of detail/hint, but I would prefer that it says "the CREATEROLE privilege or ADMIN OPTION". > --- a/doc/src/sgml/ref/alter_group.sgml > +++ b/doc/src/sgml/ref/alter_group.sgml > @@ -55,7 +55,7 @@ ALTER GROUP <replaceable class="parameter">group_name</replaceable> RENAME TO <r > <link linkend="sql-revoke"><command>REVOKE</command></link>. Note that > <command>GRANT</command> and <command>REVOKE</command> have additional > options which are not available with this command, such as the ability > - to grant and revoke <literal>ADMIN OPTION</literal>, and the ability to > + to grant and revoke <literal>ADMIN</literal> option, and the ability to > specify the grantor. > </para> I think the original reads better. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "La libertad es como el dinero; el que no la sabe emplear la pierde" (Alvarez)
pgsql-hackers by date: