Re: [HACKERS] [COMMITTERS] pgsql: pg_test_timing: Add NLS - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] [COMMITTERS] pgsql: pg_test_timing: Add NLS
Date
Msg-id 20170706185645.nfgdq52qlxiexicl@alvherre.pgsql
Whole thread Raw
Responses Re: [HACKERS] [COMMITTERS] pgsql: pg_test_timing: Add NLS
List 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Rust bindings to pgtypes lib
Next
From: Dean Rasheed
Date:
Subject: Re: [HACKERS] Multi column range partition table