Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit87c6f8b

Browse files
committed
Generate translator comments for GUC parameter descriptions
Automatically generate comments like /* translator: GUC parameter "client_min_messages" short description */in the generated guc_tables.inc.c.This provides translators more context.Reviewed-by: Pavlo Golub <pavlo.golub@gmail.com>Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>Reviewed-by: Stéphane Schildknecht <sas.postgresql@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/1a89b3f0-e588-41ef-b712-aba766143cad%40eisentraut.org
1 parent8b3e2c6 commit87c6f8b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

‎src/backend/utils/misc/gen_guc_tables.pl‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,20 @@ sub print_table
110110
printf$ofh"\t\t.name =%s,\n", dquote($entry->{name});
111111
printf$ofh"\t\t.context =%s,\n",$entry->{context};
112112
printf$ofh"\t\t.group =%s,\n",$entry->{group};
113+
printf$ofh
114+
"\t\t/* translator: GUC parameter\"%s\" short description */\n",
115+
$entry->{name};
113116
printf$ofh"\t\t.short_desc = gettext_noop(%s),\n",
114117
dquote($entry->{short_desc});
115-
printf$ofh"\t\t.long_desc = gettext_noop(%s),\n",
116-
dquote($entry->{long_desc})
117-
if$entry->{long_desc};
118+
119+
if ($entry->{long_desc})
120+
{
121+
printf$ofh
122+
"\t\t/* translator: GUC parameter\"%s\" long description */\n",
123+
$entry->{name};
124+
printf$ofh"\t\t.long_desc = gettext_noop(%s),\n",
125+
dquote($entry->{long_desc});
126+
}
118127
printf$ofh"\t\t.flags =%s,\n",$entry->{flags}if$entry->{flags};
119128
printf$ofh"\t\t.vartype =%s,\n", ('PGC_' .uc($entry->{type}));
120129
printf$ofh"\t\t._%s = {\n",$entry->{type};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp