From 4792ffa783d70785c301968348a464890cbb7018 Mon Sep 17 00:00:00 2001 From: Fs00 Date: Sat, 3 Sep 2022 15:08:04 +0200 Subject: [PATCH] Fix placeholder not being recognized as translatable --- src/gui/input/InputSettings2.cpp | 7 ++----- src/gui/input/InputSettings2.h | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/input/InputSettings2.cpp b/src/gui/input/InputSettings2.cpp index 62a7045a..5793cbd2 100644 --- a/src/gui/input/InputSettings2.cpp +++ b/src/gui/input/InputSettings2.cpp @@ -35,9 +35,6 @@ bool g_inputConfigWindowHasFocus = false; -// _("") -const wxString kDefaultProfileName = ""; - using wxTypeData = wxCustomData; using wxControllerData = wxCustomData; @@ -149,7 +146,7 @@ wxWindow* InputSettings2::initialize_page(size_t index) { // profile sizer->Add(new wxStaticText(page, wxID_ANY, _("Profile"), wxDefaultPosition, wxDefaultSize, 0), wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5); - auto* profiles = new wxComboBox(page, wxID_ANY, _(kDefaultProfileName)); + auto* profiles = new wxComboBox(page, wxID_ANY, kDefaultProfileName); sizer->Add(profiles, wxGBPosition(0, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL | wxEXPAND, 5); if (emulated_controller && emulated_controller->has_profile_name()) @@ -678,7 +675,7 @@ void InputSettings2::on_profile_delete(wxCommandEvent& event) const fs::path path = ActiveSettings::GetPath(fmt::format("controllerProfiles/{}.xml", selection)); fs::remove(path); - profile_names->ChangeValue(_(kDefaultProfileName)); + profile_names->ChangeValue(kDefaultProfileName); text->SetLabelText(_("profile deleted")); text->SetForegroundColour(wxTheColourDatabase->Find("SUCCESS")); diff --git a/src/gui/input/InputSettings2.h b/src/gui/input/InputSettings2.h index f6305ff4..01313653 100644 --- a/src/gui/input/InputSettings2.h +++ b/src/gui/input/InputSettings2.h @@ -18,6 +18,8 @@ public: ~InputSettings2(); private: + const wxString kDefaultProfileName = _(""); + wxNotebook* m_notebook; wxTimer* m_timer;