From d81d4a0f68852082403971d874cf64c96fe7550e Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Sun, 19 May 2019 11:23:21 -0400
Subject: [PATCH] yuzu/configuration/configure_input: Mark controller type
 names as translateable

These are user-facing strings, so they should be localizable.
---
 src/yuzu/configuration/configure_input.cpp | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp
index f39d57998a..87e4597140 100644
--- a/src/yuzu/configuration/configure_input.cpp
+++ b/src/yuzu/configuration/configure_input.cpp
@@ -75,8 +75,8 @@ ConfigureInput::ConfigureInput(QWidget* parent)
     };
 
     for (auto* controller_box : players_controller) {
-        controller_box->addItems({"None", "Pro Controller", "Dual Joycons", "Single Right Joycon",
-                                  "Single Left Joycon"});
+        controller_box->addItems({tr("None"), tr("Pro Controller"), tr("Dual Joycons"),
+                                  tr("Single Right Joycon"), tr("Single Left Joycon")});
     }
 
     this->loadConfiguration();
@@ -85,9 +85,10 @@ ConfigureInput::ConfigureInput(QWidget* parent)
     connect(ui->restore_defaults_button, &QPushButton::pressed, this,
             &ConfigureInput::restoreDefaults);
 
-    for (auto* enabled : players_controller)
+    for (auto* enabled : players_controller) {
         connect(enabled, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
                 &ConfigureInput::updateUIEnabled);
+    }
     connect(ui->use_docked_mode, &QCheckBox::stateChanged, this, &ConfigureInput::updateUIEnabled);
     connect(ui->handheld_connected, &QCheckBox::stateChanged, this,
             &ConfigureInput::updateUIEnabled);
@@ -147,10 +148,12 @@ void ConfigureInput::updateUIEnabled() {
     bool hit_disabled = false;
     for (auto* player : players_controller) {
         player->setDisabled(hit_disabled);
-        if (hit_disabled)
+        if (hit_disabled) {
             player->setCurrentIndex(0);
-        if (!hit_disabled && player->currentIndex() == 0)
+        }
+        if (!hit_disabled && player->currentIndex() == 0) {
             hit_disabled = true;
+        }
     }
 
     for (std::size_t i = 0; i < players_controller.size(); ++i) {
-- 
GitLab