public inbox for [email protected]  
help / color / mirror / Atom feed
From: Kyotaro Horiguchi <[email protected]>
To: [email protected]
Subject: Mark class_descr strings for translation
Date: Fri, 03 Jul 2026 15:37:42 +0900 (JST)
Message-ID: <[email protected]> (raw)

Hello,

While working on the translation, I encountered the following message.

pg_depend.c:809
>		if (!HeapTupleIsValid(tuple))
>			ereport(ERROR,
>					(errcode(ERRCODE_UNDEFINED_OBJECT),
>					 errmsg("referenced %s was concurrently dropped",
>							get_object_class_descr(classId))));

As you can see, it is a user-facing message, which embeds the return
value from get_object_class_descr(), which returns
ObjectPropertyType.class_descr, which is described as "for internal
error messages" in objectaddress.c.

As a result, the resulting message in Japanese becomes rather
unnatural.

> 参照先の foreign-data wrapper は並行して削除されました

The attached patch marks the class_descr strings for translation, so
that the message can be translated. I'm not entirely sure whether this
is the right direction, but since class_descr is already used in
messages intended to be read by humans, even if they are not
necessarily user-facing, it seems reasonable to me.

With that change, the message above becomes:

> 参照先の外部データラッパは並行して削除されました

One concern I have is that this may be somewhat easy to overlook,
since it requires remembering to wrap the return value in _() rather
than translating a string literal. That said, I don't expect this
pattern to be used very often, so I don't think it is a significant
problem.

By the way, I also noticed that we have two spellings, "foreign-data
wrapper" and "foreign data wrapper". I looked through the
documentation for the canonical spelling, but found both spellings
used on the same page, so I couldn't determine which one is preferred.

Regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


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]
  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