This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] caret diagnostics
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: Chris Lattner <clattner at apple dot com>, Robert Dewar <dewar at adacore dot com>, Manuel López-Ibáñez <lopezibanez at gmail dot com>, Tom Tromey <tromey at redhat dot com>, Aldy Hernandez <aldyh at redhat dot com>, dberlin at dberlin dot org, jakub at redhat dot com, gcc at gcc dot gnu dot org, gdr at integrable-solutions dot net, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 16 Aug 2008 16:23:52 +0000 (UTC)
- Subject: Re: [PATCH] caret diagnostics
- References: <6c33472e0808140340o2a56b9f4n149025bfa8426331@mail.gmail.com> <Pine.LNX.4.64.0808141209170.24903@digraph.polyomino.org.uk> <6c33472e0808140527i158255d9hdbc677bd0870cbc1@mail.gmail.com> <Pine.LNX.4.64.0808141234450.24903@digraph.polyomino.org.uk> <6c33472e0808140556y1f8975boaf41babaeec39f98@mail.gmail.com> <Pine.LNX.4.64.0808141338160.25519@digraph.polyomino.org.uk> <6c33472e0808140741hb83b278jad9b1a5b15e8ab02@mail.gmail.com> <48A4468B.3050605@adacore.com> <6c33472e0808140822n3006c740ke28463a18951677b@mail.gmail.com> <48A44F37.4040106@adacore.com> <Pine.LNX.4.64.0808141543560.26025@digraph.polyomino.org.uk> <4DBA62D5-9ABC-433A-A34E-B0295E2C658F@apple.com> <48A6C0BB.20300@gnu.org>
On Sat, 16 Aug 2008, Paolo Bonzini wrote:
> Chris Lattner wrote:
> > Please don't forget C++.
>
> C++ is a completely lost battle. I had a patch to handle all the %s in the
> source base, but my approach (which basically implied adding translatable
> strings for "a class", "to a class", "with a class", "in a class", etc. to
> account for languages with cases) was considered bad.
>
> See http://gcc.gnu.org/ml/gcc-patches/2002-06/msg01620.html for my patch. I
> cannot find the answer.
I don't know why it was considered bad (and had thought it was simply
never reviewed), but I am happy to review such patches as i18n maintainer
(including in Stage 3 - they are clearly bug fixes) if the front-end
maintainers don't reject them. However, I think they would need splitting
up for review. For example:
* Local changes that simply use two or more sentences in a particular
place should be separate from more complicated changes like the cp-i18n.c
there (but many such local changes could be grouped together).
* If passing around an enumeration rather than a sentence fragment, such
changes should be split up according to the function whose interface they
change.
* Where there are relevant bug reports (e.g. 29017 29897 29917 31665
34836) please make sure to include them in the ChangeLog message.
* I am not a C++ expert, so if the patch depends on C++ details for which
combinations of cases can actually occur and so need messages included
then it may still need a C++ maintainer review.
I'm not convinced by the cp-i18n.c approach, however, although there may
be cases where it's necessary. My preference would be to use full
sentences if at all possible (see the WARN_FOR_ASSIGNMENT macro in the C
front end and other diagnostics in convert_for_assignment, for example, or
readonly_error for another such case). In some cases where this isn't
feasible in the source (c_parse_error, format checking - I think all other
C cases are fixed) it might be possible for the exgettext script to create
all combinations and for full sentences still to be passed for translation
--
Joseph S. Myers
joseph@codesourcery.com