Re: pg_upgrade: prep_status doesn't translate messages - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pg_upgrade: prep_status doesn't translate messages
Date
Msg-id 20190611141120.GA14854@alvherre.pgsql
Whole thread Raw
In response to Re: pg_upgrade: prep_status doesn't translate messages  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: pg_upgrade: prep_status doesn't translate messages
List pgsql-hackers
On 2019-Jun-11, Kyotaro Horiguchi wrote:

> Thanks for the pointer. I'm seeing the result of the discussion
> now. Apart from the discussion of translate-or-not decision,
> there can be a discussion how we can reduce the burden of
> translation work. I was a bit tired to translate something like
> the followings:
> 
> old and new pg_controldata block sizes are invalid or do not match
> old and new pg_controldata maximum relation segment sizes are invalid
> or do not match
> old and new pg_controldata WAL block sizes are invalid or do not match
> ...
> 
> I'm not sure where is the compromisable point between burden of
> translators and programmers, though.

I think the problem with those messages is that they are poorly
worded/styled, but I haven't tried to figure out how to make them
better.  That may also fix the translation burden, not sure.  If you
have proposals for improvement, let's hear them.

Here's a quick idea. We already have this:

msgid "The target cluster lacks some required control information:\n"
msgid "  checkpoint next XID\n"
msgid "  latest checkpoint next OID\n"

so this gives me the idea that one way to fix the problem you mention is
something like this:

msgid "The following source and target pg_controldata items do not match:"
msgid "  block size"
msgid "  maximum relation segment size"

etc.  (One thing to note is that those strings already exist in the .po
files, so already translated).  Obviously needs a bit of code rework
(and the first new one should use the plural stuff, because it's likely
it'll only be one item that does not match).  Also will need separate
messages (with plurals) for

msgid "The following source pg_controldata items are invalid:"
msgid "The following target pg_controldata items are invalid:"

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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: tableam: abstracting relation sizing code
Next
From: Sergei Kornilov
Date:
Subject: Re: check_recovery_target_lsn() does a PG_CATCH without a throw