more message fixes

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: pgsql-translators(at)lists(dot)postgresql(dot)org
Subject: more message fixes
Date: 2019-05-15 18:30:05
Message-ID: 20190515183005.GA26486@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-translators

Here's a bunch of message fixes in the postgres.po module. Please
comment if anything seems amiss. This is not a final patch, since
regression output has not been adjusted; I only verified that the
backend still compiles cleanly. Some of the changes are going from this
style of message:
You need an unconditional ON DELETE DO INSTEAD rule with a RETURNING clause.
to this:
You need an unconditional %s rule with a RETURNING clause.
where the ON DELETE DO INSTEAD part is inserted at execution time, and
can be things like ON UPDATE DO INSTEAD of ON INSERT DO INSTEAD. If the
reduced string context causes inappropriate changes for any language, I
suppose we shouldn't make this kind of change, but I hope not.

I'm also changing
"ucnv_fromUChars failed: %s"
to this:
"%s failed: %s", "ucnv_fromUChars"
so it essentially reduces the number of translated strings, because we
already have "%s failed: %s" in other parts of the backend. I think
this is not an issue. Alternatively, we could just remove that message
from translation altogether, and have it emit the English version
always, by changing it from errmsg() to errmsg_internal().

The bulk of the changes are much less interesting that those.

I'm proposing changes in a lot of files:

src/backend/commands/copy.c | 6 +++---
src/backend/commands/publicationcmds.c | 2 +-
src/backend/commands/subscriptioncmds.c | 32 ++++++++++++++++++++------------
src/backend/commands/tablecmds.c | 9 +++++----
src/backend/parser/analyze.c | 2 +-
src/backend/parser/parse_oper.c | 1 +
src/backend/postmaster/postmaster.c | 7 ++++---
src/backend/replication/basebackup.c | 17 +++++++----------
src/backend/replication/walsender.c | 20 ++++++++++----------
src/backend/rewrite/rewriteHandler.c | 19 +++++++++++++------
src/backend/utils/adt/jsonpath.c | 3 ++-
src/backend/utils/adt/jsonpath_exec.c | 2 +-
src/backend/utils/adt/jsonpath_scan.l | 10 +++++-----
src/backend/utils/adt/pg_locale.c | 10 ++++++----
src/backend/utils/adt/regexp.c | 14 ++++++++++----
15 files changed, 89 insertions(+), 65 deletions(-)

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
messages.patch text/x-diff 21.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-05-15 18:54:47 Re: Pluggable Storage - Andres's take
Previous Message Andres Freund 2019-05-15 17:58:06 Re: New EXPLAIN option: ALL

Browse pgsql-translators by date

  From Date Subject
Next Message Tom Lane 2019-05-15 21:48:01 Re: more message fixes
Previous Message Alvaro Herrera 2019-05-15 17:23:20 inconsistent translations, or the language is like that?