From 9156eb6bbe09e81b071c531a437dddf5b40e84ea Mon Sep 17 00:00:00 2001 From: qlrd Date: Wed, 23 Oct 2024 21:41:37 -0300 Subject: [PATCH] fixed translation update for download screens when locale is changed --- .pylint/src | 2 +- src/app/config_krux_installer.py | 37 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.pylint/src b/.pylint/src index 2810562..2a7fc88 100644 --- a/.pylint/src +++ b/.pylint/src @@ -300,7 +300,7 @@ max-bool-expr=5 max-branches=25 # Maximum number of locals for function / method body. -max-locals=20 +max-locals=24 # Maximum number of parents for a class (see R0901). max-parents=10 diff --git a/src/app/config_krux_installer.py b/src/app/config_krux_installer.py index 0a54e1e..177bbc1 100644 --- a/src/app/config_krux_installer.py +++ b/src/app/config_krux_installer.py @@ -232,6 +232,13 @@ def on_config_change(self, config, section, key, value): warn_stable = self.screen_manager.get_screen( "WarningAlreadyDownloadedScreen" ) + down_zip = self.screen_manager.get_screen("DownloadStableZipScreen") + down_sha_zip = self.screen_manager.get_screen( + "DownloadStableZipSha256Screen" + ) + down_sig_zip = self.screen_manager.get_screen("DownloadStableZipSigScreen") + down_pem = self.screen_manager.get_screen("DownloadSelfcustodyPemScreen") + down_beta = self.screen_manager.get_screen("DownloadBetaScreen") warn_beta = self.screen_manager.get_screen("WarningBetaScreen") verify = self.screen_manager.get_screen("VerifyStableZipScreen") unzip = self.screen_manager.get_screen("UnzipStableScreen") @@ -293,6 +300,36 @@ def on_config_change(self, config, section, key, value): key="locale", value=value, ), + partial( + down_zip.update, + name="ConfigKruxInstaller", + key="locale", + value=value, + ), + partial( + down_sha_zip.update, + name="ConfigKruxInstaller", + key="locale", + value=value, + ), + partial( + down_sig_zip.update, + name="ConfigKruxInstaller", + key="locale", + value=value, + ), + partial( + down_pem.update, + name="ConfigKruxInstaller", + key="locale", + value=value, + ), + partial( + down_beta.update, + name="ConfigKruxInstaller", + key="locale", + value=value, + ), partial( verify.update, name="ConfigKruxInstaller", key="locale", value=value ),