| From: | "Pavlo Golub" <pavlo(dot)golub(at)gmail(dot)com> |
|---|---|
| To: | "Peter Eisentraut" <peter(at)eisentraut(dot)org>, "pgsql-translators(at)postgresql(dot)org" <pgsql-translators(at)postgresql(dot)org> |
| Subject: | Re: translator comments for GUC descriptions useful? |
| Date: | 2025-11-07 09:16:42 |
| Message-ID: | emddf10409-6346-4574-9bec-689ba4e4792a@f1b0613a.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-translators |
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 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?
The more context translator has, the better!
>
>
>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",
>
>
--
Hoc est vivere bis, vita posse priore frui.
Nullus est in vitae sensus, ipsa vera est sensus.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Álvaro Herrera | 2025-11-07 09:57:23 | Re: translator comments for GUC descriptions useful? |
| Previous Message | Peter Eisentraut | 2025-11-07 08:53:38 | translator comments for GUC descriptions useful? |