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

Commit 84f2f5c

Browse files
committed
Fix to use the same format specifiers in both branches of a ngettext().
Zdenek Kotala
1 parent 6ec0753 commit 84f2f5c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/bin/psql/describe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
1010
*
11-
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.212 2009/05/05 02:29:06 tgl Exp $
11+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.213 2009/05/27 20:47:55 petere Exp $
1212
*/
1313
#include "postgres_fe.h"
1414

@@ -2036,7 +2036,7 @@ describeRoles(const char *pattern, bool verbose)
20362036
if (conns == 0)
20372037
appendPQExpBuffer(&buf, _("No connections"));
20382038
else
2039-
appendPQExpBuffer(&buf, ngettext("1 connection", "%d connections", conns), conns);
2039+
appendPQExpBuffer(&buf, ngettext("%d connection", "%d connections", conns), conns);
20402040
}
20412041

20422042
attr[i] = pg_strdup(buf.data);

src/bin/psql/print.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.112 2009/04/11 14:11:45 petere Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.113 2009/05/27 20:47:55 petere Exp $
77
*/
88
#include "postgres_fe.h"
99

@@ -2348,7 +2348,7 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout, FILE *f
23482348
char default_footer[100];
23492349

23502350
total_records = opt->topt.prior_records + cont.nrows;
2351-
snprintf(default_footer, 100, ngettext("(1 row)", "(%lu rows)", total_records), total_records);
2351+
snprintf(default_footer, 100, ngettext("(%lu row)", "(%lu rows)", total_records), total_records);
23522352

23532353
printTableAddFooter(&cont, default_footer);
23542354
}

0 commit comments

Comments
 (0)