Re: Mark class_descr strings for translation

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Mark class_descr strings for translation
Date: 2026-07-07 11:51:51
Message-ID: akzmXVUUL7nVrgT6@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.)

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-07-07 12:07:14 Re: implement CAST(expr AS type FORMAT 'template')
Previous Message Bertrand Drouvot 2026-07-07 11:02:03 Add per-backend AIO statistics