Fix NLS for incorrect GUC enum value hint message
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 19 Nov 2025 07:46:31 +0000 (08:46 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 19 Nov 2025 07:48:21 +0000 (08:48 +0100)
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

src/backend/replication/logical/relation.c
src/backend/utils/misc/guc.c

index 745fd3bab640621fb8984b5ab557d7f86d08b9bd..10b3d0d9b823fb67614f37729f73cc96a662ca96 100644 (file)
@@ -249,6 +249,7 @@ logicalrep_get_attrs_str(LogicalRepRelation *remoterel, Bitmapset *atts)
    {
        attcnt++;
        if (attcnt > 1)
+           /* translator: This is a separator in a list of entity names. */
            appendStringInfoString(&attsbuf, _(", "));
 
        appendStringInfo(&attsbuf, _("\"%s\""), remoterel->attnames[i]);
index 7e2b17cc04e0ffa0655a1055162efaf716d6756a..526a57a16f878c0571ae4cda697a1ae5aa1d6148 100644 (file)
@@ -3135,14 +3135,17 @@ parse_and_validate_value(const struct config_generic *record,
                    char       *hintmsg;
 
                    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,
                            (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                             errmsg("invalid value for parameter \"%s\": \"%s\"",
                                    record->name, value),
-                            hintmsg ? errhint("%s", _(hintmsg)) : 0));
+                            hintmsg ? errhint("%s", hintmsg) : 0));
 
                    if (hintmsg)
                        pfree(hintmsg);