From 3f13dbe0878523b65d158efddc3eff37d59ca3a2 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 30 Mar 2018 21:42:26 +0200 Subject: Translate certain button names but not all Some button names should be translated, for instance Up, Left and such. At the same time, some other button names shouldn't be translated, for reasons that might be less obvious. In 0146456af, I removed the _trans markers for button names that never need to be translated (such as A and B), but that isn't actually enough to ensure that DolphinWX won't try to translate them anyway. This commit adds a bool that explicitly tells the GUI whether a button name should be translated. Otherwise we'll have problems like the GUI treating the button name "B" (which isn't supposed to be translated) as matching the translatable string "B" (being an abbreviation of "bytes"), meaning that the button "B" will be labeled "o" when running Dolphin in French (after translations get pulled from Transifex the next time). By the way, while it turned out that DolphinWX translated all button names, it also turned out that DolphinQt2 translated *no* button names. Go figure. This commit makes them consistent with each other. --- Source/Core/InputCommon/ControllerEmu/Control/Control.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Core/InputCommon/ControllerEmu/Control/Control.cpp') diff --git a/Source/Core/InputCommon/ControllerEmu/Control/Control.cpp b/Source/Core/InputCommon/ControllerEmu/Control/Control.cpp index 3f5d00d822..7ea3ec27d5 100644 --- a/Source/Core/InputCommon/ControllerEmu/Control/Control.cpp +++ b/Source/Core/InputCommon/ControllerEmu/Control/Control.cpp @@ -9,14 +9,14 @@ namespace ControllerEmu { -Control::Control(std::unique_ptr ref, const std::string& name_, +Control::Control(std::unique_ptr ref, bool translate_, const std::string& name_, const std::string& ui_name_) - : control_ref(std::move(ref)), name(name_), ui_name(ui_name_) + : control_ref(std::move(ref)), translate(translate_), name(name_), ui_name(ui_name_) { } -Control::Control(std::unique_ptr ref, const std::string& name_) - : Control(std::move(ref), name_, name_) +Control::Control(std::unique_ptr ref, bool translate_, const std::string& name_) + : Control(std::move(ref), translate_, name_, name_) { } -- cgit v1.2.3