Code::Blocks Forums

User forums => Help => Topic started by: rhino on June 04, 2010, 06:49:40 pm

Title: Cannot change the menu while compiling C::B from its source (Windows)
Post by: rhino on June 04, 2010, 06:49:40 pm
Hello,
I am new here so please be understanding for me.
I hope it's the right place for a topic like this... :)
That's my first topic here - I registered on the forum only because of the problem.
OK, here we go:
I downloaded Code::Blocks few days ago and I like it really much. The only thing which I'd like to change is the language. I know English well, but using it in my own language would be much more comfortable.
I didn't find any language files so I decided to compile the program myself and change its content to my language (Polish, if you're curious :)).
I have downloaded the source from the official download site (I mean this one: http://www.codeblocks.org/downloads/source (http://www.codeblocks.org/downloads/source)).
Then I proceeded according to the source compilation tutorial on the Codeblocks Wiki.
Everything was OK - I compiled the source successfully, I even managed to translate few things.
And it worked well.
But when I tried to edit the menu file (src/resources/main_menu.xrc) and compiled it, the program failed to work.
Actually it looked like this:
I started the program, I saw the splashscreen, it was being shown for a few seconds and then...
the application just crashed! I tried to run it few more times, but the result was the same.
Then, when I changed the main_menu.xrc file back to the original one and compiled it, it worked well again.
The problem occurs when I change even one small thing in the file! For example, I tried to change the "File" label to "Fabc" (just a test string) and it stopped working; but when I changed it back to "File", it worked again.
Please help me - I actually have no idea why is it happening and how to solve it.
P.S.If you need this information... I am using Windows 7 32-bit and Code::Blocks 10.05.
Title: Re: Cannot change the menu while compiling C::B from its source (Windows)
Post by: Jenna on June 04, 2010, 07:06:10 pm
Internationalization directly in the source-code is not a good idea, unless you know exactly what you do.
Please read this wiki-article: http://wiki.codeblocks.org/index.php?title=Internationalization (http://wiki.codeblocks.org/index.php?title=Internationalization)

I don't know whether the files at launchpad are actual or outdated, but there is at least a polish-file someone worked on in may 2010 : https://translations.launchpad.net/codeblocks/trunk/+pots/codeblocks (https://translations.launchpad.net/codeblocks/trunk/+pots/codeblocks).
Title: Re: Cannot change the menu while compiling C::B from its source (Windows)
Post by: rhino on June 04, 2010, 07:44:56 pm
Thank you for your help, but I still have a problem.
I've downloaded the Polish .mo file and then proceeded according to the tutorial:
I created a 'locale' directory in CodeBlocks/share, then I created another one - 'pl_PL' and I placed the codeblocks.mo file there.
Now I have no idea what to do with it. :D C::B doesn't self-recognize it and I don't know how to set the language file to be used.
Please help me...
Title: Re: Cannot change the menu while compiling C::B from its source (Windows)
Post by: gd_on on June 04, 2010, 07:57:35 pm
Have a look here : http://forums.codeblocks.org/index.php/topic,1022.msg83410.html#msg83410.
You'll find many other informations in all this thread.

gd_on
Title: Re: Cannot change the menu while compiling C::B from its source (Windows)
Post by: rhino on June 04, 2010, 08:02:40 pm
Thank you, this setting works.
Unfortunately the Polish translation is done bad in my opinion, I'll try to make my own one.
Thank you all for your help. :)
P.S.I am still curious... why did the app crash afer editing main_menu.xrc?
Title: Re: Cannot change the menu while compiling C::B from its source (Windows)
Post by: Jenna on June 04, 2010, 09:07:12 pm
Thank you, this setting works.
Unfortunately the Polish translation is done bad in my opinion, I'll try to make my own one.
Thank you all for your help. :)
P.S.I am still curious... why did the app crash afer editing main_menu.xrc?
Impossible to answer, without the xrc-file, that leads to the crash.
Title: Re: Cannot change the menu while compiling C::B from its source (Windows)
Post by: rhino on June 06, 2010, 12:59:34 pm
[...] without the xrc-file [...]
Not possible - I didn't rename, move neither deleted the file, I just changed its content a bit.
But it still was in the right directory.
Title: Re: Cannot change the menu while compiling C::B from its source (Windows)
Post by: infinigon on June 06, 2010, 04:52:07 pm
[...] without the xrc-file [...]
Not possible - I didn't rename, move neither deleted the file, I just changed its content a bit.
But it still was in the right directory.

jens means that it is impossible to tell why C::B crashed unless you provide exact details of which file you changed and how.
Title: Re: Cannot change the menu while compiling C::B from its source (Windows)
Post by: rhino on June 06, 2010, 05:48:22 pm
jens means that it is impossible to tell why C::B crashed unless you provide exact details of which file you changed and how.
I've already told that in the first post of this topic.