_() vs wxT() macro for controls labels

Post here wxCrafter related issues / features / bugs
Michal
CodeLite Curious
Posts: 5
Joined: Sat Jan 25, 2014 5:41 pm
Genuine User: Yes
IDE Question: c++
Contact:

_() vs wxT() macro for controls labels

Post by Michal »

Hi,

I have a problem with polish specific characters (i.e. ąęćłóźżńś). It change into something terrible after compilation. It's due to _() macro wrapping for literal string in controls' labels. I have to manualy replace all _() to wxT() in generated code in order to fix the problem. It's the same story as in wxDevC++ and wxSmith :(

wxWidgets documentation reasoning is that _() should not be used for unicode literal strings. Is there a way to change wxCrafter behavior in order to use wxT() instead of _() ?

Regards
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: _() vs wxT() macro for controls labels

Post by eranif »

Its because you are not working according to the standard.
You should specify your labels in ASCII English and then provide a <myapp>.mo/po file which contains the translation to your app
Hardcding the lables with Polish is not the way to do it.

You can use a tool like PoEdit to collect all the _() statements in your code and build a translation file to polish

Eran
Make sure you have read the HOW TO POST thread
Michal
CodeLite Curious
Posts: 5
Joined: Sat Jan 25, 2014 5:41 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: _() vs wxT() macro for controls labels

Post by Michal »

My application target is limited to Polish users only and after effort estimation related to standard process, that is writing all application messages and controls' labels in English and translating to Polish, I decided there's no power to force me to take that effort. To big effort and no value added. As usual I will just replace all _() with wxT() in released code as it yields proper character formatting both on Win and Linux due to UTF8 encoding of source files.

Personally and don't belive that non-English coders would take that effort especially when their application target and functionality is very limited but contains a lot of native text. I'll stick to my statement that wxCrafter setting for standard violation would be a nice feature :)

Regards
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: _() vs wxT() macro for controls labels

Post by eranif »

Michal wrote:I'll stick to my statement that wxCrafter setting for standard violation would be a nice feature
I will add that to my TODO list ;)

Eran
Make sure you have read the HOW TO POST thread
Post Reply