소스 검색

ui: retranslate the network tab

Looks like it was just missed when it was added, as currently the Network Tab only has one item
RetranslateUI is used more commonly throughout the project
Kyle K 4 년 전
부모
커밋
4be00def5c
2개의 변경된 파일11개의 추가작업 그리고 2개의 파일을 삭제
  1. 9 1
      src/yuzu/configuration/configure_network.cpp
  2. 2 1
      src/yuzu/configuration/configure_network.h

+ 9 - 1
src/yuzu/configuration/configure_network.cpp

@@ -26,7 +26,15 @@ void ConfigureNetwork::ApplyConfiguration() {
     Settings::values.network_interface = ui->network_interface->currentText().toStdString();
 }
 
-void ConfigureNetwork::RetranslateUi() {
+void ConfigureNetwork::changeEvent(QEvent* event) {
+    if (event->type() == QEvent::LanguageChange) {
+        RetranslateUI();
+    }
+
+    QWidget::changeEvent(event);
+}
+
+void ConfigureNetwork::RetranslateUI() {
     ui->retranslateUi(this);
 }
 

+ 2 - 1
src/yuzu/configuration/configure_network.h

@@ -18,9 +18,10 @@ public:
     ~ConfigureNetwork() override;
 
     void ApplyConfiguration();
-    void RetranslateUi();
 
 private:
+    void changeEvent(QEvent*) override;
+    void RetranslateUI();
     void SetConfiguration();
 
     std::unique_ptr<Ui::ConfigureNetwork> ui;