Re: Inconsistent printf placeholders - Mailing list pgsql-hackers

From David Rowley
Subject Re: Inconsistent printf placeholders
Date
Msg-id CAApHDvo+0Ax9NtoMw-gEog8aOt+SWW6yasa5A2j10dU4aKPwVw@mail.gmail.com
Whole thread Raw
In response to Re: Inconsistent printf placeholders  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Inconsistent printf placeholders
List pgsql-hackers
On Fri, 15 Mar 2024 at 15:27, Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote:
> I have considered only the two messages. Actually, buffile.c and md.c
> are already like that. The attached aligns the messages in
> pg_combinebackup.c and reconstruct.c with the precedents.

This looks like a worthy cause to make translator work easier.

I don't want to widen the goalposts or anything, but just wondering if
you'd searched for any others that could get similar treatment?

I only just had a quick look at the following.

$ cat src/backend/po/fr.po | grep -E "^msgid\s" | sed -E
's/%[a-zA-Z]+/\%/g' | sort | uniq -d -c
     31 msgid ""
      2 msgid "could not accept SSL connection: %"
      2 msgid "could not initialize LDAP: %"
      2 msgid "could not look up local user ID %: %"
      2 msgid "could not open file \"%\": %"
      2 msgid "could not read file \"%\": read % of %"
      2 msgid "could not read from log segment %, offset %: %"
      2 msgid "could not read from log segment %, offset %: read % of %"
      2 msgid "index % out of valid range, 0..%"
      2 msgid "invalid value for parameter \"%\": %"
      2 msgid "%%% is outside the valid range for parameter \"%\" (% .. %)"
      2 msgid "must be owner of large object %"
      2 msgid "oversize GSSAPI packet sent by the client (% > %)"
      2 msgid "permission denied for large object %"
      2 msgid "string is too long for tsvector (% bytes, max % bytes)"
      2 msgid "timestamp out of range: \"%\""
      2 msgid "Valid values are between \"%\" and \"%\"."

I've not looked at how hard it would be with any of the above to
determine how hard it would be to make the formats consistent.  The
3rd last one seems similar enough that it might be worth doing
together with this?

David



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Possibility to disable `ALTER SYSTEM`
Next
From: "Euler Taveira"
Date:
Subject: Re: speed up a logical replica setup