Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 891624f

Browse files
committed
psql: Fix translation marking
Commit 5a28324 added addFooterToPublicationDesc() as a wrapper around printTableAddFooter(). The translation marker _() was moved to the body of addFooterToPublicationDesc(), but addFooterToPublicationDesc() was not added to GETTEXT_TRIGGERS, so those strings were lost for translation. To fix, add the translation markers to the call sites of addFooterToPublicationDesc() and remove the translation marker from the body of the function. This seems easiest since there were only two callers and it keeps the API consistent with printTableAddFooter(). While we're here, add some const decorations to the prototype of addFooterToPublicationDesc() for consistency with printTableAddFooter().
1 parent 8ec5694 commit 891624f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/psql/describe.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -5966,8 +5966,8 @@ listPublications(const char *pattern)
59665966
* Add footer to publication description.
59675967
*/
59685968
static bool
5969-
addFooterToPublicationDesc(PQExpBuffer buf, char *footermsg,
5970-
bool as_schema, printTableContent *cont)
5969+
addFooterToPublicationDesc(PQExpBuffer buf, const char *footermsg,
5970+
bool as_schema, printTableContent *const cont)
59715971
{
59725972
PGresult *res;
59735973
int count = 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
goto error_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
goto error_return;
61676167
}

0 commit comments

Comments
 (0)