Hello. On Tue, Jun 11, 2019 at 11:11 PM Alvaro Herrera <alvhe...@2ndquadrant.com> wrote: > 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.
I didn't think so deeply. What I had in mind at the time was splitting-out of the variable part from template part, as we have many existing examples. > 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" == By the way, I found a similar but to-exit message: controldata.c:175 | if (cluster == &old_cluster) | pg_fatal("The source cluster lacks cluster state information:\n"); The colon should be a period? == END OF "By the way" > 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 Each of the message is pg_fatal'ed. So the following insated will work: pg_fatal("The source and target pg_controldata item do not match:%s", _(" maximum alignment\n")); That seems closer to the the guideline. (But I don't think "[SP][SP]maximum[SP]alignment\n" is not proper as a translation unit..) > (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:" Something like the attached works that way. By the way I'm a bit annoyed also by the (seemingly) random occurrence of "old/new" and "source/target". regards. -- Kyotaro Horiguchi NTT Open Source Software Center
PoC_pg_upgrade_controldata_error_refactor.patch
Description: Binary data