Page 1 of 1

_() vs wxT() macro for controls labels

Posted: Sun Jan 26, 2014 6:05 pm
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

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

Posted: Sun Jan 26, 2014 6:21 pm
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

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

Posted: Sun Jan 26, 2014 11:47 pm
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

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

Posted: Mon Jan 27, 2014 12:01 am
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