Author Topic: Cannot change the menu while compiling C::B from its source (Windows)  (Read 5553 times)

rhino

  • Guest
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).
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
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

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.

rhino

  • Guest
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...

Offline gd_on

  • Lives here!
  • ****
  • Posts: 824
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
Windows 11 64 bits (24H2), svn C::B (last version or almost!), wxWidgets 3.2.8 (tests with 3.3), Msys2 Compilers 15.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

rhino

  • Guest
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?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
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.

rhino

  • Guest
[...] 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.

Offline infinigon

  • Multiple posting newcomer
  • *
  • Posts: 10
[...] 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.

rhino

  • Guest
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.