User forums > Using Code::Blocks
Keyboard shortcut and C::B translation problem
gd_on:
I have identified the problem. It's at line 195 in cbkeybinder.cpp.
The test : if (label == wxT("Keyboard shortcuts") ) is in default because the label title was created in cbKeyConfigPanel.h at line 30 with wxString GetTitle() const { return _("Keyboard shortcuts"); }.
So, if C::B is configurated in English, no problem, but in French, as the translated string exists, the comparison fails.
It works by simply changing the test by : if (label == _("Keyboard shortcuts") ).
I have also made a patch by changing several wxT() by _(). Not sure that all are useful or needed (especially those used for debugging tests).
Nevertheless, if I compare with previous version, and even in English version, it seems that items at the top of the window are missing (items concerning key profiles). May be normal when conversion to new format not done, but I'm not sure.
gd_on
Pecan:
Thank you gd_on. I'll test and search for other _T() and _() misfits.
Keybinder 1.0 was written before the /p (/personality) feature were added.
That feature makes the multiple profiles within Keybinder obsolete.
To implement multiple keybinding profiles, the user only needs to use a different /personality and create a different set of key bindings.
Keybinder honors personalities by stowing the kebindings in ~Home or %appdata%\CodeBlocks in "<personality>.cbKeybinder02.conf" files.
gd_on:
OK.
There is probably the same kind of error at line 592/593 in clKeyboardManager.cpp : the chain "Configure editor" is translated and the test certainly fails.
Nevertheless I tried to change the "_T(" by "_(" on thoses lines, but it's not sufficient apparently :'(. Need further tests...
gd_on
Pecan:
Fixed as far as I can determine. Head rev 11716
I did not allow translation of the "LOGIT" debugging messages since I need to read English while debugging in French.
gd_on:
OK. I was effectively not sure that strings used only for debugging need to be translated.
Nevertheless, there is probably still something somewhere which is not correct : when starting C::B in English, as mentioned previously, I obtain a message telling that there are 2 keyboards conflicts : OK, why not. But when I start C::B in French, even when the conflict has not been solved, I have no such messages. As told in my last message, I thought this could come from line 592/593 in clKeyboardManager.cpp (not included in my patch, sorry). And this test at line 592 is a little bit strange : is it really correct ? Could it be correct (or return true) when C::B is in English and not if C::B is in French (so return false) ?
gd_on
PS : It's now OK in French. The dialog was disabled (by a Don't annoy me again ...). It was not disabled in English... certainly because comparison is made directly on the strings and not on the ID of the dialog.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version