This is the mail archive of the
mailing list for the GCC project.
Re: RFA [PR objc/29200][diagnostic] Make diagnostics translation friendly
On Sat, 4 Apr 2009, David Ayers wrote:
> Thank you Philipp,
> after building the required version of gettext, translating and moving
> the builddir/po/de.pox info gcc/po/de.po and installing the messages
> were successfully translated.
> I'm rerunning the regression tests on i686-pc-linux-gnu.
> Here is the updated patch, which include intl.h and renames the message
> parameter to msgid for gettext (thanks again Andreas).
> OK for the trunk for the i18n POV?
There is still a problem that you are translating the single word "using"
or "found" and requiring it to go in a particular position in the
"%J%s %<%c%s%>" format.
Some languages might want the translated word or phrase to go after the
%<%c%s%> instead of before; although the "%J%s %<%c%s%>" string is
translated, it hardly provides enough context for translators to know they
should move the %s to the end. Some languages might want translated text
on both sides of the %<%c%s%>, or want the choice of ordering to differ in
the "using" and "found" cases. Think diagnostics of the form "the method
%<%c%s%> is being used", if that is an idiomatic style for some languages.
I think there are two reasonable approaches: either translate the
"%Jusing <%c%s%>" and "%Jfound <%c%s%>" strings separately through
passing the full string as an argument to warn_with_method, or probably
better define an enum that says whether "using" or "found" is to be used,
use that enum as the first parameter of warn_with_method, and select
between two calls to warning with different format strings within that
As a separate issue, it looks like this diagnostic is an informative
message that should use "inform" not "warning".
Joseph S. Myers