News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Syntax highlighting fail with Internationlization - who will apply it?

Started by nanyu, July 24, 2009, 11:19:56 AM

Previous topic - Next topic

nanyu

I changed the Syntax highlighting for editor. it work fine.
But after I setted the Internationlization to Chinese, the highlighting was jumbled.

(windows xp , code::blocks svn5696)

help me!

[attachment deleted by admin]

blueshake

I guess that "default" should not be translated in color setting,just a guess. :)
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

nanyu

#2
Quote from: blueshake on July 24, 2009, 12:00:58 PM
I guess that "default" should not be translated in color setting,just a guess. :)

What a great GUESS it is..:)

I found the BUG now:
===============================
svn: 5702
file: codeblocks\src\plugins\contrib\codesnippets\editor\seditorcolourset.cpp
line: 450
    // first load the default colours to all styles (ignoring some built-in styles)
    SOptionColour* defaults = GetOptionByName(lang, _("Default"));
=========== I think the "Default" needn't translate to Chinese(or other language)...so..pls :
    SOptionColour* defaults = GetOptionByName(lang, _wxT("Default"));

Whic developer can apply it ?  I can test it after modifed. thanks!

blueshake

Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

killerbot

I could apply it.
Question : do you build CB yourself ? If so, you can already change it in your source tree. If not, I assume you will want a next nightly build ?

nanyu

Quote from: killerbot on July 25, 2009, 10:30:38 AM
I could apply it.
Question : do you build CB yourself ? If so, you can already change it in your source tree. If not, I assume you will want a next nightly build ?

Thank you! I build CB myself, but I will wait the next nightly build. I teach my students study C++ with CB. It's too difficult  to update their CB to the my owner verson.

by the way:  I'll write a book about C::B and publish it. could I do it ?

--------

killerbot

since you build CB yourself, could you try the suggestion out to see if it works correctly ?
I prefer to have the feedback in advance of committing it ;-)

thomas

Please don't apply that patch, whatever it is. Terribly bad luck is upon you.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

killerbot


thomas

Translating "default" to Chinese will cause Chinese characters being used as XML tag names which at least some versions of TinyXML don't like at all. Therefore, translating "default" means terribly bad luck.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

blueshake

@nanyu
I guess the translation can leave the "default" alone.Afterall it is a simple English word. :)
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

nanyu

Quote from: thomas on July 26, 2009, 03:15:49 AM
Translating "default" to Chinese will cause Chinese characters being used as XML tag names which at least some versions of TinyXML don't like at all. Therefore, translating "default" means terribly bad luck.

OH NO! what I will do is "not translating" "default" from English to Chinese or other language!

current code is :

SOptionColour* defaults = GetOptionByName(lang, _("Default")); //  _() make  "Default" been translated.

and now, I hope it be modify to :

SOptionColour* defaults = GetOptionByName(lang, _wxT("Default")); //  _wxT() didn''t do any translating work.

killerbot

Quote from: nanyu on July 26, 2009, 08:10:00 AM
Quote from: thomas on July 26, 2009, 03:15:49 AM
Translating "default" to Chinese will cause Chinese characters being used as XML tag names which at least some versions of TinyXML don't like at all. Therefore, translating "default" means terribly bad luck.

OH NO! what I will do is "not translating" "default" from English to Chinese or other language!

current code is :

SOptionColour* defaults = GetOptionByName(lang, _("Default")); //  _() make  "Default" been translated.

and now, I hope it be modify to :

SOptionColour* defaults = GetOptionByName(lang, _wxT("Default")); //  _wxT() didn''t do any translating work.


That's also what I thought it did. The bug was it used to be translated (_()) and now it no longer will be.
Although I think there might be an error (I don't think it should be _wxT("Default") :
I think it should be either :
_T("Default")
or
wxT("Default")

Any further objections Thomas ?

thomas

Ah, my bad... those stupid macros all look the same, I thought wxT was the one wxTranslating... sure, go ahead then.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

killerbot