[Qt-creator] Gcc and internationalization
Frédéric Marchal
frederic.marchal at wowtechnology.com
Fri Mar 24 09:19:39 CET 2017
On Thursday 23 March 2017 14:48:50 Artur Shepilko wrote:
> On Thu, 2017-03-16 at 08:52 +0100, Frédéric Marchal wrote:
> > Hi,
> >
> > I'm using Qt Creator 4.2.1 Based on Qt 5.8.0 (GCC 5.3.1 20160406 (Red Hat
> > 5.3.1-6), 64 bit) Built on Jan 20 2017 01:20:15 From revision 7071b61e02.
> >
> > Two features of QtCreator are broken if gcc messages are translated.
>
> There was a similar issue related to GCC locale reported with
> CodeBlocks IDE sometimes ago:
>
> http://stackoverflow.com/questions/31593536/how-to-force-gcc-to-ignore-local
> isation
>
> Basically, the suggested solution was to force the LC_ALL=C either on
> calling gcc or on loading the IDE:
>
> LC_ALL=C qtcreator
>
> Not sure if this may also be set in the QtCreator Kit settings for GCC/G++
Forcing the C locale disables translation entirely. Asking users to choose
between translation and proper error reporting is a short term stopgap.
GCC 8 will provide a command line switch to disable the translation of the
"error: " and "warning: " tags alone. This feature will allow proper errors
and warnings parsing by QtCreator along with translated messages.
It was also proposed to disable the translation of those two tags with an
environment variable that can be set by QtCreator before invoking the
compiler. That idea is compatible with previous gcc versions and it will start
working when gcc 8 is released.
In the meantime, I disabled the translation of those two keywords in the
French translation. I'm currently working on the translation for gcc 7 but I
intent to update older versions too.
This feature is tracked by gcc bug #79423:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79423
The gcc 8 feature won't solve the second problem I reported here. QtCreator
can't find system include files if gcc is translated.
Frederic
More information about the Qt-creator
mailing list