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

Commit891624f

Browse files
committed
psql: Fix translation marking
Commit5a28324 addedaddFooterToPublicationDesc() as a wrapper aroundprintTableAddFooter(). The translation marker _() was moved to thebody of addFooterToPublicationDesc(), but addFooterToPublicationDesc()was not added to GETTEXT_TRIGGERS, so those strings were lost fortranslation. To fix, add the translation markers to the call sites ofaddFooterToPublicationDesc() and remove the translation marker fromthe body of the function. This seems easiest since there were onlytwo callers and it keeps the API consistent withprintTableAddFooter(). While we're here, add some const decorationsto the prototype of addFooterToPublicationDesc() for consistency withprintTableAddFooter().
1 parent8ec5694 commit891624f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/bin/psql/describe.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5966,8 +5966,8 @@ listPublications(const char *pattern)
59665966
* Add footer to publication description.
59675967
*/
59685968
staticbool
5969-
addFooterToPublicationDesc(PQExpBufferbuf,char*footermsg,
5970-
boolas_schema,printTableContent*cont)
5969+
addFooterToPublicationDesc(PQExpBufferbuf,constchar*footermsg,
5970+
boolas_schema,printTableContent*constcont)
59715971
{
59725972
PGresult*res;
59735973
intcount=0;
@@ -5980,7 +5980,7 @@ addFooterToPublicationDesc(PQExpBuffer buf, char *footermsg,
59805980
count=PQntuples(res);
59815981

59825982
if (count>0)
5983-
printTableAddFooter(cont,_(footermsg));
5983+
printTableAddFooter(cont,footermsg);
59845984

59855985
for (i=0;i<count;i++)
59865986
{
@@ -6149,7 +6149,7 @@ describePublications(const char *pattern)
61496149
" AND c.oid = pr.prrelid\n"
61506150
" AND pr.prpubid = '%s'\n"
61516151
"ORDER BY 1,2",pubid);
6152-
if (!addFooterToPublicationDesc(&buf,"Tables:", false,&cont))
6152+
if (!addFooterToPublicationDesc(&buf,_("Tables:"), false,&cont))
61536153
gotoerror_return;
61546154

61556155
if (pset.sversion >=150000)
@@ -6161,7 +6161,7 @@ describePublications(const char *pattern)
61616161
" JOIN pg_catalog.pg_publication_namespace pn ON n.oid = pn.pnnspid\n"
61626162
"WHERE pn.pnpubid = '%s'\n"
61636163
"ORDER BY 1",pubid);
6164-
if (!addFooterToPublicationDesc(&buf,"Tables from schemas:",
6164+
if (!addFooterToPublicationDesc(&buf,_("Tables from schemas:"),
61656165
true,&cont))
61666166
gotoerror_return;
61676167
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp