Author Topic: Localization of scripts  (Read 6435 times)

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Localization of scripts
« on: May 25, 2007, 11:28:53 am »
I came a cross this bug. I think it could be useful to bind the _() method. Is there a reason why this is never done?
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Localization of scripts
« Reply #1 on: May 25, 2007, 11:32:41 am »
I came a cross this bug. I think it could be useful to bind the _() method. Is there a reason why this is never done?
Not really. And to be honest: The plan is to add even more wxWidgets bindings (e.g. all basic GUI stuff and things). I'm on it for some time now but it's not as easy as I thought it would be. Anyway - this binding could easily be added I don't see any reason why it shouldn't. Will give it a try though...
With regards, Morten.
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 David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Localization of scripts
« Reply #2 on: May 25, 2007, 01:58:03 pm »
Morton, could you review the patch which is attached and commit it?I didn't had anything todo :P

[attachment deleted by admin]
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Localization of scripts
« Reply #3 on: May 25, 2007, 02:06:41 pm »
Morton, could you review the patch which is attached and commit it?I didn't had anything todo :P
Hehe... besides the fact that I have a different order (first "_", then "_T") it's exactly the same how I've done it... makes me kind of confident. I haven't tried yet because I currently don't know how to do (I'm not using localisation). Did you??? Does that fix the bug mentioned???
With regards, Morten.
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 David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Localization of scripts
« Reply #4 on: May 25, 2007, 02:17:36 pm »
No I didn't use localisation, but I tried to the code I mentioned in the bug reply and that works.
I can try the localized version tonight, but I have to find out how I have to install the language pack.
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Localization of scripts
« Reply #5 on: May 25, 2007, 08:17:13 pm »
This doesn't fix the bug :( strange...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Localization of scripts
« Reply #6 on: May 25, 2007, 11:29:22 pm »
Fixed. It will solve the problem partly. the startup script should contain the following (notice the &):
Code
GetScriptingManager().RegisterScriptMenu(_("&Settings") + _T("/-Edit startup script"), _T("edit_startup_script.script"), false);

(see patch 2020)
« Last Edit: May 25, 2007, 11:35:46 pm by mispunt »
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring