Skip to content
Permalink
Browse files

hopefully fix kbd control translation issues

Add missing gettext calls for the game controls code.

Seems to work correctly in the Russian locale with special keys.

Also add CLion files to `.gitignore`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
  • Loading branch information
rkitover committed Jul 1, 2019
1 parent 90b3f35 commit 30b927241205161728d7030b58d48a2f624b1e8b
Showing with 6 additions and 4 deletions.
  1. +2 −0 .gitignore
  2. +4 −4 src/wx/widgets/keyedit.cpp
@@ -7,9 +7,11 @@ src/wx/wxvbam.xrs
build/*
build32/*
vsbuild/*
cmake-build*
dependencies/*
vcpkg/*
.vs/*
.idea
*.o
*.so
*.dll
@@ -124,8 +124,8 @@ wxString wxKeyTextCtrl::ToString(int mod, int key)

#endif

if (s.empty() || (key != wxT('-') && s[s.size() - 1] == wxT('-') && s != wxT("Num -"))
|| (key != wxT('+') && s[s.size() - 1] == wxT('+') && s != wxT("Num +")))
if (s.empty() || (key != wxT('-') && s[s.size() - 1] == wxT('-') && s != _("Num") + wxT(" -"))
|| (key != wxT('+') && s[s.size() - 1] == wxT('+') && s != _("Num") + wxT(" +")))
{
// bad key combo; probably also generates an assertion in wx
return wxEmptyString;
@@ -138,8 +138,8 @@ wxString wxKeyTextCtrl::ToString(int mod, int key)
int keys_el_size = sizeof(keys_with_display_names)/sizeof(keys_with_display_names[0]);

for (int i = 0; i < keys_el_size; i++) {
wxString name(keys_with_display_names[i].name);
wxString display_name(keys_with_display_names[i].display_name);
wxString name(_(keys_with_display_names[i].name));
wxString display_name(_(keys_with_display_names[i].display_name));
name.MakeUpper();
display_name.MakeUpper();

0 comments on commit 30b9272

Please sign in to comment.
You can’t perform that action at this time.