Code::Blocks Forums

User forums => Help => Topic started by: heromyth on January 29, 2007, 04:54:03 pm

Title: How can I translate the strings in *.script
Post by: heromyth on January 29, 2007, 04:54:03 pm
All the strings in *.script files are treated as strings of _T type. So the gettext tools can't get these strings. I have tried to change "_T" into "_" in order that the gettext tools can get the strings. However, the script parser can't parse the "_" strings. It's so hard for me to fix the script parser.

Of course, I can directly translate these strings in scripts and use them in CB. But this is good just for some special occasions.

Is there another choice? Thanks for any help!
Title: Re: How can I translate the strings in *.script
Post by: mandrav on January 29, 2007, 08:52:21 pm
Please do not confuse the _T() preprocessor macro with the _T() function in scripts. They may look the same but they are not.
In scripts, _T() is exactly the same as wxString().
Title: Re: How can I translate the strings in *.script
Post by: heromyth on February 01, 2007, 05:26:09 am
Thanks! I see.

Maybe we can implement a tool like wxrc.exe in wxWidgets to take the can-be-translated strings. In this case, the *.script is just like *.xrc.

Of course, we can also add some features into script handler so that it can transform these information strings into those which can be handled by gettext tools.

Any idea?