Re: Consistent coding for the naming of LR workers - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Consistent coding for the naming of LR workers
Date
Msg-id 20230615103759.bkkv226czkcnuork@alvherre.pgsql
Whole thread Raw
In response to Consistent coding for the naming of LR workers  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: Consistent coding for the naming of LR workers
List 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)



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [PATCH] Add loongarch native checksum implementation.
Next
From: Yura Sokolov
Date:
Subject: Re: When IMMUTABLE is not.