public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Álvaro Herrera <[email protected]>
To: Kyotaro Horiguchi <[email protected]>
Cc: [email protected]
Subject: Re: Mark class_descr strings for translation
Date: Tue, 7 Jul 2026 14:39:02 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On 07.07.26 13:51, Álvaro Herrera wrote:
> On 2026-Jul-03, Kyotaro Horiguchi wrote:
> 
>> diff --git a/src/backend/catalog/pg_depend.c b/src/backend/catalog/pg_depend.c
>> index 9a7a401aced..0d28d34412d 100644
>> --- a/src/backend/catalog/pg_depend.c
>> +++ b/src/backend/catalog/pg_depend.c
>> @@ -810,7 +810,7 @@ dependencyLockAndCheckObject(Oid classId, Oid objectId)
>>   			ereport(ERROR,
>>   					(errcode(ERRCODE_UNDEFINED_OBJECT),
>>   					 errmsg("referenced %s was concurrently dropped",
>> -							get_object_class_descr(classId))));
>> +							_(get_object_class_descr(classId)))));
> 
> I agree with the patch idea in general, but I'm not sure that this
> string is really adequate.  For instance, with this string we cannot
> make "referenced" and "dropped" in the right gender declension depending
> on the object type, and that will make the message look weird in some
> languages -- specifically in Spanish but I'm guessing it can be a
> problem in others as well.
>       "rol referenciado fue borrado concurrentemente"
>     "tabla referenciada fue borrada concurrentemente"
> and so on.
> (Most object types are feminine, but at least "role" and "operator" are
> masculine.)
> 
> I propose we make this
>    "referenced object of type \"%s\" was concurrently dropped"
> 
> so that the declension of "referenced" and "dropped" refer to the gender
> of the word "object".  We'd no longer have a problem there:
>    "el objeto referenciado de tipo "tabla" fue borrado concurrentemente"
> This reads a bit odd, but we no longer have a grammatical gender problem
> there.
> 
> (We could leave out the quote marks, perhaps.)

The class_descr is meant for internal messages only, for the reasons you 
describe.  The fact that there is now a non-internal message that uses 
it is a bug and that should be fixed at that caller.

When I was working on generating the ObjectProperty tables 
automatically, I was working toward getting rid of class_descr 
altogether, because it's mostly not useful.  (For internal error 
messages, you might as well just print the actual catalog name.)  I 
don't think we should be working toward making this facility more 
attractive now.







view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Mark class_descr strings for translation
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox