A Japanese-unfriendy error message contruction
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
From: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
To: pgsql-hackers@postgresql.org
Date: 2018-05-22T09:20:20Z
Lists: pgsql-hackers
Attachments
- make_a_message_jp_friendly.patch (text/x-patch) patch
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
Commits
-
Improve English wording of some other getObjectDescription() messages.
- b86b7bfa3e8b 11.0 landed
-
Improve translatability of some getObjectDescription() messages.
- 7c89eb750d0c 11.0 landed
-
Fix objectaddress.c code for publication relations.
- e8cb8fdfd3a2 10.5 landed
- 1a31baf61ed8 11.0 landed
-
Properly schema-qualify additional object types in getObjectDescription().
- cbb37b2e1fbe 9.3.24 landed
- eb1aa1b46bd9 10.5 landed
- ad73c07b4457 9.5.14 landed
- 8f2143bc8fe9 9.4.19 landed
- 3d3165210dcc 9.6.10 landed
- 056f52d9c3ee 11.0 landed