Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: David Perfors on May 25, 2007, 11:28:53 am

Title: Localization of scripts
Post by: David Perfors on May 25, 2007, 11:28:53 am
I came a cross this (http://developer.berlios.de/bugs/?func=detailbug&bug_id=10297&group_id=5358) bug. I think it could be useful to bind the _() method. Is there a reason why this is never done?
Title: Re: Localization of scripts
Post by: MortenMacFly on May 25, 2007, 11:32:41 am
I came a cross this (http://developer.berlios.de/bugs/?func=detailbug&bug_id=10297&group_id=5358) 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.
Title: Re: Localization of scripts
Post by: David Perfors 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]
Title: Re: Localization of scripts
Post by: MortenMacFly 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.
Title: Re: Localization of scripts
Post by: David Perfors 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.
Title: Re: Localization of scripts
Post by: David Perfors on May 25, 2007, 08:17:13 pm
This doesn't fix the bug :( strange...
Title: Re: Localization of scripts
Post by: David Perfors 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 (https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2020&group_id=5358))