Skip to content

Commit 0fc33b0

Browse files
committed
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
1 parent 300c8f5 commit 0fc33b0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/backend/replication/logical/relation.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ logicalrep_get_attrs_str(LogicalRepRelation *remoterel, Bitmapset *atts)
249249
{
250250
attcnt++;
251251
if (attcnt > 1)
252+
/* translator: This is a separator in a list of entity names. */
252253
appendStringInfoString(&attsbuf, _(", "));
253254

254255
appendStringInfo(&attsbuf, _("\"%s\""), remoterel->attnames[i]);

src/backend/utils/misc/guc.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3135,14 +3135,17 @@ parse_and_validate_value(const struct config_generic *record,
31353135
char *hintmsg;
31363136

31373137
hintmsg = config_enum_get_options(conf,
3138-
"Available values: ",
3139-
".", ", ");
3138+
_("Available values: "),
3139+
/* translator: This is the terminator of a list of entity names. */
3140+
_("."),
3141+
/* translator: This is a separator in a list of entity names. */
3142+
_(", "));
31403143

31413144
ereport(elevel,
31423145
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
31433146
errmsg("invalid value for parameter \"%s\": \"%s\"",
31443147
record->name, value),
3145-
hintmsg ? errhint("%s", _(hintmsg)) : 0));
3148+
hintmsg ? errhint("%s", hintmsg) : 0));
31463149

31473150
if (hintmsg)
31483151
pfree(hintmsg);

0 commit comments

Comments
 (0)