A Japanese-unfriendy error message contruction

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: A Japanese-unfriendy error message contruction
Date: 2018-05-22 09:20:20
Message-ID: 20180522.182020.114074746.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello.

While I revised the translation, I ran across the following code.

> form_policy = (Form_pg_policy) GETSTRUCT(tuple);
>
> appendStringInfo(&buffer, _("policy %s on "),
> NameStr(form_policy->polname));
> getRelationDescription(&buffer, form_policy->polrelid);

getRelationDescription appends a string like "table %s" to the
buffer so finally a message like "policy %s on table %s" is
constructed but this is very unfriendly to Japanese syntax.

The "policy %s" and "<objname> %s" are transposed in Japaese
syntax. Specifically "<objname> %s NO <policy> %s" is the
natural translation of "policy %s on <objname> %s". But currently
we cannot get the natural error message in Japanese.

For the reason, I'd like to propose to refactor
getObjectDescription:OPCLASS_POLICY as the attached patch. The
same structure is seen for OPCLASS_AMOP.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
make_a_message_jp_friendly.patch text/x-patch 1.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anthony Bykov 2018-05-22 09:33:09 Re: Transform for pl/perl
Previous Message Ideriha, Takeshi 2018-05-22 08:44:48 Update backend/lib/README