Re: [COMMITTERS] pgsql: pg_test_timing: Add NLS

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Carlos Chapi <carlos(dot)chapi(at)2ndquadrant(dot)com>
Subject: Re: [COMMITTERS] pgsql: pg_test_timing: Add NLS
Date: 2017-07-06 18:56:45
Message-ID: 20170706185645.nfgdq52qlxiexicl@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2017-07-07 12:09:27 pgsql: Fix out of date comment
Previous Message Teodor Sigaev 2017-07-06 14:21:04 pgsql: Fix potential data corruption during freeze

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2017-07-06 19:55:15 Re: Multi column range partition table
Previous Message Andres Freund 2017-07-06 18:29:33 Re: Rust bindings to pgtypes lib