Subject: Re: [COMMITTERS] pgsql: pg_test_timing: Add NLS

From: Alvaro Herrera <[email-masked]>
Date: Thu, 6 Jul 2017 14:56:45 -0400

Peter Eisentraut wrote:
> pg_test_timing: Add NLS
> 
> Also straighten out use of time unit abbreviations a bit.

We (well, Carlos Chapi, who's doing the translation work now) just
noticed that this has a bug in this line

+   printf("%6s   %10s %10s\n", _("< us"), _("% of total"), _("count"));

_() marks the strings with the c-string flag, which means that the
%-specifiers are checked by gettext, but the % in the third literal is
not a printf specifier.  So there's no correct way to write the
translation.  We need to use a different xgettext trigger there, one
that doesn't set c-format, but I don't know what.

Babel is now complaining:

/home/nlsuser/admin/wwwtools/scm/postgresql-master/src/bin/pg_test_timing/po/es.po:73: format specifications in 'msgid' and 'msgstr' for argument 1 are not the same

where the line is

#: pg_test_timing.c:181
#, c-format
msgid "% of total"
msgstr "% del total"

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

-- 
Sent via pgsql-hackers mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

---

From: Peter Eisentraut <[email-masked]>
Date: Sat, 26 Aug 2017 15:22:16 -0400

> that doesn't set c-format, but I don't know what.

I have fixed this.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services