Author Topic: How to get rid of mixed english-german compiler messages?  (Read 4942 times)

Offline CuteAlien

  • Multiple posting newcomer
  • *
  • Posts: 57
How to get rid of mixed english-german compiler messages?
« on: May 11, 2008, 04:06:28 am »
I get currently errors like that one when compiling my applications:

error: calling fdopen: Ungültiger Dateideskriptor

Part english, part german. The reason is probably that I've set german as my system language. But I prefer programming in 100% english environments, as I'm used to that a lot more. I could get rid of the those menus which had been translated by starting with:
LANG=en_US '/opt/codeblocks-8.02/bin/codeblocks'

But I still get those half-german errors and I didn't find out how to stop that.

I'm running codeblocks 8.02 and it's running on a debian sid clone (kanotix).
My compiler is g++ (and it usually is giving me english errors).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: How to get rid of mixed english-german compiler messages?
« Reply #1 on: May 11, 2008, 09:02:44 am »
But I still get those half-german errors and I didn't find out how to stop that.
I believe the compiler have their localised language files somewhere under /share/... under Linux. You just need to remove the language file and all is English only. But I don't know exactly where the file is I am not using Linux anymore. But that's how I did it back in the days.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: How to get rid of mixed english-german compiler messages?
« Reply #2 on: May 11, 2008, 11:14:42 am »
Unless I'm very mistaken, this is not something the compiler has built in or cares about.

The code probably looks somewhat similar to this:
Code
#define CHECK(x) if(x!= 0) fprintf(sterr, "error: %s : %s", #x, strerror(errno));
...
CHECK(fdopen(fd, "wb"))
It's what makes most sense (actually the only thing that makes sense), because the compiler cannot possibly know the 276,000 reasons why each of the 500 library calls it uses might fail on the 25 platforms it runs on. It is easiest and safest to ask the OS for a human readable string.
Thus, the only thing that will likely help is set the system language accordingly. No worries though, this shold work just fine with Martin's EnvVar plugin (though I'm just guessing, haven't tried).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How to get rid of mixed english-german compiler messages?
« Reply #3 on: May 11, 2008, 11:38:08 am »
You can try to set "LC_ALL" in "Settings -> Environment.. ->  Environment variables".
Just click "Add" and take "LC_ALL" as key and your language settings as value. I use "en_US.UTF8" and everything is in english instead of german.

Offline CuteAlien

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: How to get rid of mixed english-german compiler messages?
« Reply #4 on: May 11, 2008, 06:56:55 pm »
Thanks for the help, I could solve it now. The error message came from usr/share/locale/de/LC_MESSAGES/libc.mo and deleting it (well, renaming for now) did the trick. It's now "bad file descriptor" which was a lot easier to find in google ;-)

I also tried the other stuff, but I failed with that.

Not sure where I could set LC_ALL within c::b, I could not find an environment variables settings in Environment. Setting it manually before start did translate the c::b menus, but not that error message.

Changing system language did for some reason also not do the trick. I've got an English KDE that way, but that error did stay German. Though I only did change the language - not the locale (I didn't want to change stuff like currencies, etc), so that might have worked.

Not sure about that EnvVar plugin, is that something newer than 8.02? I didn't find it.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How to get rid of mixed english-german compiler messages?
« Reply #5 on: May 11, 2008, 07:26:40 pm »
Not sure about that EnvVar plugin, is that something newer than 8.02? I didn't find it.

Did you install the "codeblocks-contrib"-package ?

Or if self-compiled: did you run "./contrib --with-contrib-plugins=all" before running "make" ?

Offline CuteAlien

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: How to get rid of mixed english-german compiler messages?
« Reply #6 on: May 11, 2008, 08:53:52 pm »
Not sure about that EnvVar plugin, is that something newer than 8.02? I didn't find it.

Did you install the "codeblocks-contrib"-package ?

Or if self-compiled: did you run "./contrib --with-contrib-plugins=all" before running "make" ?

Probably I would need to install that. I installed from codeblocks-8.02-src.tar.bz2 and I guess it's not part of that. But as it works now I'm already happy anyway ;-)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How to get rid of mixed english-german compiler messages?
« Reply #7 on: May 11, 2008, 09:04:38 pm »
Probably I would need to install that. I installed from codeblocks-8.02-src.tar.bz2 and I guess it's not part of that. But as it works now I'm already happy anyway ;-)

That means you self-compiled C::B.

add "--with-contrib-plugins=all" to your "./configure"-commandline and all the contrib-plugins get compiled when running "make".

If you have compiled C::B with C::B using the project file you also have to build the "ContribPlugins-unix.workspace" too.

Offline CuteAlien

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: How to get rid of mixed english-german compiler messages?
« Reply #8 on: May 12, 2008, 05:21:36 pm »
Thanks, I'll try that next time I compile it.