Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vHIaP-002zkq-7C for pgsql-translators@arkaria.postgresql.org; Fri, 07 Nov 2025 09:16:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vHIaN-00DH45-Me for pgsql-translators@arkaria.postgresql.org; Fri, 07 Nov 2025 09:16:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vHIaN-00DH3x-CW for pgsql-translators@lists.postgresql.org; Fri, 07 Nov 2025 09:16:47 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vHIaL-005saY-28 for pgsql-translators@postgresql.org; Fri, 07 Nov 2025 09:16:46 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-b7042e50899so82225266b.0 for ; Fri, 07 Nov 2025 01:16:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762506999; x=1763111799; darn=postgresql.org; h=mime-version:user-agent:reply-to:references:in-reply-to:message-id :date:subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=EHGmcSmL3at744prDzb907IhyhnuVvqVXKgJEsgy31k=; b=Uoyo6Pz57Q0RCokVbwLFjtNqOvfl8NsyawW7sCiMIH1JDXQ++ii+FFeLMFnhtX2kdT V5W88jTRA5QMnqfT3o3oboKYtle6a/1aNtVnLGz5ebCmFILx7RNB5vD4rK4usn9Oh0QW ZCTvlPb826cJOIinUMK2E1NKcE6Dm99786Ao8/BGwVHzdFqQI/e4VN+KKQcOyUrAavoZ 4rryj5enYzDkVB7E1ElAYpoX/aqV/uUo9yqK8PEBHypbj/aT21sJkw9sqx9ytElxByzW 02gRobi7ewgr4KfrxiGqnXMvTYg2jfDPQVKYOTX+knDlfQ9J0I0M/kdSxPmryKPRcLxj 9JOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762506999; x=1763111799; h=mime-version:user-agent:reply-to:references:in-reply-to:message-id :date:subject:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=EHGmcSmL3at744prDzb907IhyhnuVvqVXKgJEsgy31k=; b=tMRBuGIVwZgqhHRcYv1WYSFZSY4BtoQtylrIodUIYBMF+LT2l/3+SP4iMcrd7jUG3K LqofiAD9r8m2Uo0u9D0q7e8XSLyWZz06S/rz8UJt6cKZbOKQFtJN4GTZiwj1kQUw6npu xBXXiVdmhmuC27zzso+rtr3/iwZeBIzCSiS74b4aGJKSGcwkMj+pwVPdr94HbCs+YW7Y 8HEmVFOvQXakadRYwojGJTXnKTcEfA0fMA0FjVHdmBtPosWGLE0BxGzkywJBOK5oTEJ3 u2VrRnYjKsq9D2U8Bpyd0KbTmWCGNSpIju40a8sOn40z4ln/G/U1m2E8YNYJoDRi1Wt3 cYBA== X-Forwarded-Encrypted: i=1; AJvYcCWkHiBnvcLnI/RWInSZgnU/WE7y2Ntn9f5ZDIuJTeOzJRtGWK6lWNO9Arvl2XJxeEj3T4hN/7OBYCncVFIEU8Mc8g==@postgresql.org X-Gm-Message-State: AOJu0Yy5DvTAnE2ntjkD7vYKF7vErAOcKCW85ckeM/db7aS1zGxhZkJ0 /rIXVkFkBz0avHRC4HQCIQKnxeJWrmzq7E2cr7fZnGvoJaGH9dNtYmbd X-Gm-Gg: ASbGncsrMB01DIqQMS8RQ0qYGUTgjY2vNI7BrKEQFo5GnLScsDUmlh1YUYqz9LUEvgQ r0hiag08Fg6WgTGJL+zA0WwpHaz89ZMH5skWZijc6GxPiPRcsXS/PJKRGRRxW4piKGIJJpTXRpF ObAr68/IgKglezfLSxD+rZH2D1JBXovrmkR2B/C8sk7yzvYd2YfPOjy1KrcQ73/fSB7jQIcQ0vU xiKKxBOy7oqS/jB8o9QI2bw0ZbD/4MF0/pluU60qc/19NhxwIRhKQRq4nsl4ZwvYThtPjTHpAms l+EmcJNvwvyvXMyWddKpvztUTHxCTGYL0S6/eBpWHSDfVx7ZozQS49kFNg5turVgxkvKEaDHTwm DE88psOWlnx/+h78ou1PcPzvUkuduXTNntKvX8S6YQfe1aQG0hvIgULW0YW3+qTESMB+f2QLs80 F0y8SXoSWqq5uhaFkGvvVaeqMBj1pDv8JZAOK9 X-Google-Smtp-Source: AGHT+IFnsyjpHB/e7tAS6ZimMURnDnY61Gi94kkHPrAyptD3FJNBkdYsoeZ+GbbAegWPFsA0XMxDLQ== X-Received: by 2002:a17:907:7f26:b0:b5c:835d:8d2a with SMTP id a640c23a62f3a-b72c092858bmr275124666b.15.1762506998588; Fri, 07 Nov 2025 01:16:38 -0800 (PST) Received: from ?IPv6:::ffff:192.168.0.101? ([62.197.243.85]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b72bf312e25sm191033566b.20.2025.11.07.01.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Nov 2025 01:16:38 -0800 (PST) From: "Pavlo Golub" To: "Peter Eisentraut" , "pgsql-translators@postgresql.org" Subject: Re: translator comments for GUC descriptions useful? Date: Fri, 07 Nov 2025 09:16:42 +0000 Message-Id: In-Reply-To: <1a89b3f0-e588-41ef-b712-aba766143cad@eisentraut.org> References: <1a89b3f0-e588-41ef-b712-aba766143cad@eisentraut.org> Reply-To: "Pavlo Golub" User-Agent: eM_Client/10.3.2619.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------=_MB01DD947D-C749-41A0-BBC7-A2177386C86D" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --------=_MB01DD947D-C749-41A0-BBC7-A2177386C86D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi! >Hi all, > >I've done some work recently in the source code to make the GUC C structs= automatically generated. That now allows changing the output format more e= asily. > >One random idea I had is that we could automatically generate "translator" = comments on the short and long description strings of GUC parameters. So= the PO entries could then look like this: > >#. translator: GUC huge_pages_status short description >#: utils/misc/guc_tables.c:5020 >msgid "Indicates the status of huge pages." >msgstr "" > >(and analogously for the long description). > >This would be trivial to implement now (see below for an example). > >Would this be useful? The more context translator has, the better! > > >I suppose the only possible disadvantage is that it would use more vertica= l space. > >(Any related ideas while we're here?) > > >diff --git a/src/backend/utils/misc/gen_guc_tables.pl b/src/backend/utils/= misc/gen_guc_tables.pl >index 601c34ec30b..25aa98debed 100644 >--- a/src/backend/utils/misc/gen_guc_tables.pl >+++ b/src/backend/utils/misc/gen_guc_tables.pl >@@ -62,6 +62,7 @@ sub print_table > printf $ofh "\t\t.name =3D %s,\n", dquote($entry->{name}); > printf $ofh "\t\t.context =3D %s,\n", $entry->{context}; > printf $ofh "\t\t.group =3D %s,\n", $entry->{group}; >+ printf $ofh "\t\t/* translator: GUC %s short description */\n", $e= ntry->{name}; > printf $ofh "\t\t.short_desc =3D gettext_noop(%s),\n", > dquote($entry->{short_desc}); > printf $ofh "\t\t.long_desc =3D gettext_noop(%s),\n", > > -- Hoc est vivere bis, vita posse priore frui. Nullus est in vitae sensus, ipsa vera est sensus. --------=_MB01DD947D-C749-41A0-BBC7-A2177386C86D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi!
Hi all,
=C2=A0
I've done some work recently in the source code t= o make the GUC C structs automatically generated. That now allows changing = the output format more easily.
=C2=A0
One random idea I had is that we could automatica= lly generate "translator" comments on the short and long description string= s of GUC parameters. So the PO entries could then look like this:
=C2=A0
#. translator: GUC huge_pages_status short descri= ption
#: utils/misc/guc_tables.c:5020
msgid "Indicates the status of huge pages."
msgstr ""
=C2=A0
(and analogously for the long description).
=C2=A0
This would be trivial to implement now (see below = for an example).
=C2=A0
Would this be useful?

The more = context translator has, the better!=C2=A0


=C2=A0
I suppose the only possible disadvantage is that= it would use more vertical space.
=C2=A0
(Any related ideas while we're here?)
=C2=A0
=C2=A0
diff --git a/src/backend/utils/misc/gen_guc_table= s.pl b/src/backend/utils/misc/gen_guc_tables.pl
index 601c34ec30b..25aa98debed 100644
--- a/src/backend/utils/misc/gen_guc_tables.pl
+++ b/src/backend/utils/misc/gen_guc_tables.pl
@@ -62,6 +62,7 @@ sub print_table
printf $ofh "\t\t.name =3D %s,\n", dquote= ($entry->{name});
printf $ofh "\t\t.context =3D %s,\n", $en= try->{context};
printf $ofh "\t\t.group =3D %s,\n", $entr= y->{group};
+ printf $ofh "\t\t/* translator: GUC %s sh= ort description */\n", $entry->{name};
printf $ofh "\t\t.short_desc =3D gettext_= noop(%s),\n",
dquote($entry->{short_desc});
printf $ofh "\t\t.long_desc =3D gettext_n= oop(%s),\n",
=C2=A0
=C2=A0

--
Hoc = est vivere bis, vita posse priore frui.
Nullus est in vitae sensus,= ipsa vera est sensus.
--------=_MB01DD947D-C749-41A0-BBC7-A2177386C86D--