pg_upgrade translation

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-translators(at)postgresql(dot)org
Subject: pg_upgrade translation
Date: 2017-05-23 00:28:27
Message-ID: 20170523002827.lzc2jkzh2gubclqb@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-translators

Translatability was turned on for pg_upgrade on pg10, but it needs some
work. The choices are we fix it now, or we revert the addition of NLS
there and we do it for PG11.

I think the ugliest one is to change the messages about "the %s server",
which are about a dozen -- things like:
msgid "pg_ctl failed to start the %s server, or connection failed\n"
where the %s is either "new" or "old".

These need be to be split in two messages, and I think I'd replace the
"old" with "source" and "new" with "target". Something like this:

*** a/src/bin/pg_upgrade/server.c
--- b/src/bin/pg_upgrade/server.c
***************
*** 285,293 **** start_postmaster(ClusterInfo *cluster, bool throw_error)
PQerrorMessage(conn));
if (conn)
PQfinish(conn);
! pg_fatal("could not connect to %s postmaster started with the command:\n"
! "%s\n",
! CLUSTER_NAME(cluster), cmd);
}
PQfinish(conn);

--- 285,297 ----
PQerrorMessage(conn));
if (conn)
PQfinish(conn);
! if (cluster == &old_cluster)
! pg_fatal("could not connect to source postmaster started with the command:\n"
! "%s\n", cmd);
! else
! pg_fatal("could not connect to target postmaster started with the command:\n"
! "%s\n", cmd);
!
}
PQfinish(conn);

Aye or nay?

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neha Khatri 2017-05-23 00:47:51 Re: Improve logical decoding error message (was wal_level > WAL_LEVEL_LOGICAL)
Previous Message Michael Paquier 2017-05-23 00:26:04 Re: Improve logical decoding error message (was wal_level > WAL_LEVEL_LOGICAL)

Browse pgsql-translators by date

  From Date Subject
Next Message Daniele Varrazzo 2017-05-24 13:26:42 Re: [HACKERS] translatable string fixes
Previous Message Alvaro Herrera 2017-05-23 00:15:57 Re: [HACKERS] translatable string fixes