This is the mail archive of the
mailing list for the GCC project.
Re: Translation breaks IDE
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Frédéric Marchal <fmarchal at perso dot be>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Fri, 17 Mar 2017 12:20:49 +0100
- Subject: Re: Translation breaks IDE
- Authentication-results: sourceware.org; auth=none
- References: <8012377.DiHZInmtXg@port-fma>
On Fri, Mar 17, 2017 at 9:48 AM, Frédéric Marchal <firstname.lastname@example.org> wrote:
> I gave my partial French translation a field trial this week and it didn't went
> well. QtCreator can't see error messages any more if they are translated.
> QtCreator identifies errors and warnings by parsing gcc output:
> file.c:24:5: error: …
> file.c:25:3: warning: …
> But if "error" and "warning" are translated it becomes impossible to sort out
> the messages.
> What can be done to help IDEs with translated messages?
> Is it possible to add some --ide-mode flag or some environment variable that
> would prefix every message with untranslated hard coded tags that could be used
> by IDEs? I'm thinking about something along the line:
> (E):file.c:24:5: <same message as now for errors, with translation>
> (W): for warnings
> These two could be put to use immediately because QtCreator already do
> something similar with MSVC. It just lacks something as the above mechanism to
> do it with gcc.
> And it might be possibly to add other categories that could be used later such
> (F): for fatal errors
> (N): for notifications and informations
> (I): included by
> (C): candidates for overloaded functions
> (H): "called from here" or "in this context"
> (!): internal error
> This list certainly needs more thinking and IDE folks could give more insight
> but you see were I'm heading.
I think a IDE mode ("machine interface") would be fine. We already have
-fdiagnostics-parseable-fixits for example, generalizing this to sth like
-fdiagnostics-mi would be nice.