| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | "pgsql-translators(at)postgresql(dot)org" <pgsql-translators(at)postgresql(dot)org> |
| Subject: | translator comments for GUC descriptions useful? |
| Date: | 2025-11-07 08:53:38 |
| Message-ID: | 1a89b3f0-e588-41ef-b712-aba766143cad@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-translators |
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 easily.
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?
I suppose the only possible disadvantage is that it would use more
vertical 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 = %s,\n", dquote($entry->{name});
printf $ofh "\t\t.context = %s,\n", $entry->{context};
printf $ofh "\t\t.group = %s,\n", $entry->{group};
+ printf $ofh "\t\t/* translator: GUC %s short description */\n",
$entry->{name};
printf $ofh "\t\t.short_desc = gettext_noop(%s),\n",
dquote($entry->{short_desc});
printf $ofh "\t\t.long_desc = gettext_noop(%s),\n",
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavlo Golub | 2025-11-07 09:16:42 | Re: translator comments for GUC descriptions useful? |
| Previous Message | Peter Eisentraut | 2025-11-04 11:21:27 | Re: [PATCH] Fix Korean typo 'checkpoint' in log |