Hello,
I need to prevent wxSmith from auto overwriting all string format manually changed to wxS("") back to _("") each time?
I need it to stay like wxS("").
TIA.
Quote from: tomay3000 on June 03, 2021, 11:24:12 PM
Hello,
I need to prevent wxSmith from auto overwriting all string format manually changed to wxS("") back to _("") each time?
I need it to stay like wxS("").
TIA.
Do the change outside of the wxSmith comment block.
Edit: If that is not possible post where it happens and maybe someone can fix the wxSmith code.
Tim S.
In wxSmith's properties you can deactivate usage of i18n strings, but then it will use the format specified for non-i18n strings (wxS is not in the list)
Quote from: Miguel Gimenez on June 04, 2021, 08:17:08 AM
In wxSmith's properties you can deactivate usage of i18n strings, but then it will use the format specified for non-i18n strings (wxS is not in the list)
That helped, thank you ;)
I think
wxS should be added to the list too in future development.
Quote from: tomay3000 on June 04, 2021, 06:31:32 PM
Quote from: Miguel Gimenez on June 04, 2021, 08:17:08 AM
In wxSmith's properties you can deactivate usage of i18n strings, but then it will use the format specified for non-i18n strings (wxS is not in the list)
That helped, thank you ;)
I think wxS should be added to the list too in future development.
Do you know how to build Code::Blocks from source?
And, do you know how to use wxSmith?
If yes to both, I am trying to create a patch that adds wxS to list.
But, I have little knowledge of how to use wxSmith and really can not test it.
Tim S.
Possible patch that needs tested by someone who uses wxSmith and checked by someone who knows how to patch wxSmith.
Edit: Patch is too simple to give me credit; just use sf.net to add feature request and add this as a possible patch.
Tim S.
It looks good and works OK here.
Quote from: stahta01 on June 05, 2021, 04:41:47 AM
Possible patch that needs tested by someone who uses wxSmith and checked by someone who knows how to patch wxSmith.
Edit: Patch is too simple to give me credit; just use sf.net to add feature request and add this as a possible patch.
Tim S.
Can you create the ticket? I will try to apply it as soon as i am at home, but in case i forget it... (we should add this... wxT() is deprecated according to the docs)
Credit to the creator!
Quote from: BlueHazzard on June 05, 2021, 04:22:33 PM
Quote from: stahta01 on June 05, 2021, 04:41:47 AM
Possible patch that needs tested by someone who uses wxSmith and checked by someone who knows how to patch wxSmith.
Edit: Patch is too simple to give me credit; just use sf.net to add feature request and add this as a possible patch.
Tim S.
Can you create the ticket? I will try to apply it as soon as i am at home, but in case i forget it... (we should add this... wxT() is deprecated according to the docs)
Credit to the creator!
Replacing wxT() with wxT_2() would be better than removing it.
Tim S.
Quote from: stahta01 on June 05, 2021, 06:41:44 PM
Replacing wxT() with wxT_2() would be better than removing it.
Why? wx people have removed wxT from their code base.
https://docs.wxwidgets.org/trunk/group__group__funcmacro__string.html#ga2e7c1f911a731a4b98a85fa44f1d9fbc (https://docs.wxwidgets.org/trunk/group__group__funcmacro__string.html#ga2e7c1f911a731a4b98a85fa44f1d9fbc)
QuoteCompatibility macro which expands to wxT() in wxWidgets 2 only.
This macro can be used in code which needs to compile with both wxWidgets 2 and 3 versions, in places where the wx2 API requires a Unicode string (in Unicode build) but the wx3 API only accepts a standard narrow string, as in e.g. wxCmdLineEntryDesc structure objects initializers.
Tim S.
wx2.x compatibility is not required for wxSmith.
For me a goal for wxSmith is to be able to generate correct and readable wx3.x code.
If it works in wx2.x fine, but it shouldn't be our goal.
In wxssettings.cpp, line 259, you use the macro _() to set the string wxS(""). As far as I understand, this string does not need to be translated (and more, must not...). So a macro as _T() or wxT() or may be wxT_2() should be preferable. And it's probably also the case for some other strings in the same cpp file.
Or just "wxS()", _T() and wxT() are not needed anymore.
QuoteNote that since wxWidgets 2.9.0 you shouldn't use wxT() anymore in your program sources