Fix NLS for incorrect GUC enum value hint message

The translation markers were applied at the wrong place, so no string
was extracted for translation.

Also add translator comments here and in a similar place.

Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://www.postgresql.org/message-id/2c961fa1-14f6-44a2-985c-e30b95654e8d%40eisentraut.org
pull/248/head
Peter Eisentraut 4 weeks ago
parent 300c8f5324
commit 0fc33b0053
  1. 1
      src/backend/replication/logical/relation.c
  2. 9
      src/backend/utils/misc/guc.c

@ -249,6 +249,7 @@ logicalrep_get_attrs_str(LogicalRepRelation *remoterel, Bitmapset *atts)
{ {
attcnt++; attcnt++;
if (attcnt > 1) if (attcnt > 1)
/* translator: This is a separator in a list of entity names. */
appendStringInfoString(&attsbuf, _(", ")); appendStringInfoString(&attsbuf, _(", "));
appendStringInfo(&attsbuf, _("\"%s\""), remoterel->attnames[i]); appendStringInfo(&attsbuf, _("\"%s\""), remoterel->attnames[i]);

@ -3135,14 +3135,17 @@ parse_and_validate_value(const struct config_generic *record,
char *hintmsg; char *hintmsg;
hintmsg = config_enum_get_options(conf, hintmsg = config_enum_get_options(conf,
"Available values: ", _("Available values: "),
".", ", "); /* translator: This is the terminator of a list of entity names. */
_("."),
/* translator: This is a separator in a list of entity names. */
_(", "));
ereport(elevel, ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid value for parameter \"%s\": \"%s\"", errmsg("invalid value for parameter \"%s\": \"%s\"",
record->name, value), record->name, value),
hintmsg ? errhint("%s", _(hintmsg)) : 0)); hintmsg ? errhint("%s", hintmsg) : 0));
if (hintmsg) if (hintmsg)
pfree(hintmsg); pfree(hintmsg);

Loading…
Cancel
Save