Re: more message fixes

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, pgsql-translators(at)lists(dot)postgresql(dot)org
Subject: Re: more message fixes
Date: 2019-05-15 22:25:28
Message-ID: 20190515222528.GA23894@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-translators

On 2019-May-15, Tom Lane wrote:

> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > Here's a bunch of message fixes in the postgres.po module. Please
> > comment if anything seems amiss.
>
> These sorts of changes trouble me a bit from a translatability standpoint:
>
> - errmsg("connect = false and enabled = true are mutually exclusive options")));
> + errmsg("%s and %s are mutually exclusive options",
> + "connect = false", "enabled = true")));
>
> - (errmsg("CREATE_REPLICATION_SLOT ... USE_SNAPSHOT "
> - "must not be called in a subtransaction")));
> + (errmsg("%s must not be called in a subtransaction",
> + "CREATE_REPLICATION_SLOT ... USE_SNAPSHOT")));
>
> A translator might expect the %s's to represent single words.
> I think at least you'd want a translator: comment to warn about
> what the insertion will be.

Fair point, I can add that. (As a translator, I know I have to
reference the source files more often than I would like.) :-(

> + /* XXX is it okay to use %d for BlockNumber everywhere? */
>
> BlockNumber should be %u, no?

Yeah. It's %d in basebackup.c, hence the comment. I think technically
it's okay most of the time, because it's only used to reference to block
numbers in a *file*, not a relation; however, I fear it might still
break in cases of a very large --with-segsize option.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2019-05-16 01:22:31 Avoiding hash join batch explosions with extreme skew and weird stats
Previous Message Tom Lane 2019-05-15 21:48:01 Re: more message fixes

Browse pgsql-translators by date

  From Date Subject
Next Message Ioseph Kim 2019-05-16 02:35:33 Re: inconsistent translations, or the language is like that?
Previous Message Tom Lane 2019-05-15 21:48:01 Re: more message fixes