Re: Consistent coding for the naming of LR workers

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Consistent coding for the naming of LR workers
Date: 2023-06-15 10:37:59
Message-ID: 20230615103759.bkkv226czkcnuork@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2023-Jun-15, Peter Smith wrote:

> PSA a small patch to modify the code accordingly. This is not intended
> to be a functional change - just a code cleanup.

From a translation standpoint, this doesn't seem good. Consider this
proposed message:
"lost connection to the %s"

It's not possible to translate "to the" correctly to Spanish because it
depends on the grammatical gender of the %s. At present this is not an
actual problem because all bgworker types have the same gender, but it
goes counter translability good practices. Also, other languages may
have different considerations.

You could use a generic term and then add a colon-separated or a quoted
indicator for its type:
lost connection to logical replication worker of type "parallel apply"
lost connection to logical replication worker: "parallel apply worker"
lost connection to logical replication worker: type "parallel apply worker"

and then make the type string (and nothing else in that message) be a
%s. But I don't think this looks very good.

I'd leave this alone, except if there are any actual inconsistencies in
which case they should be fixed specifically.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
Thou shalt check the array bounds of all strings (indeed, all arrays), for
surely where thou typest "foo" someone someday shall type
"supercalifragilisticexpialidocious" (5th Commandment for C programmers)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yura Sokolov 2023-06-15 10:46:02 Re: When IMMUTABLE is not.
Previous Message John Naylor 2023-06-15 10:30:02 Re: [PATCH] Add loongarch native checksum implementation.