Author Topic: How can I translate the strings in *.script  (Read 3903 times)

Offline heromyth

  • Multiple posting newcomer
  • *
  • Posts: 98
    • http://
How can I translate the strings in *.script
« 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!

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: How can I translate the strings in *.script
« Reply #1 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().
Be patient!
This bug will be fixed soon...

Offline heromyth

  • Multiple posting newcomer
  • *
  • Posts: 98
    • http://
Re: How can I translate the strings in *.script
« Reply #2 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?