From ae017d66e07f7fb5fa7c771861e91a292512d201 Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Sat, 13 Dec 2025 21:45:21 +0800 Subject: [PATCH] Fix "ADMINISTRATOR_NAME" is not retranslated Signed-off-by: Loren Eteval --- Furious/Widget/SystemTrayIcon.py | 3 +-- Furious/Window/AppMainWindow.py | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Furious/Widget/SystemTrayIcon.py b/Furious/Widget/SystemTrayIcon.py index 80e6caf..5b1308b 100644 --- a/Furious/Widget/SystemTrayIcon.py +++ b/Furious/Widget/SystemTrayIcon.py @@ -213,5 +213,4 @@ class SystemTrayIcon( self.setDisconnectedIcon() def retranslate(self): - # Nothing to do - pass + self.setCustomToolTip() diff --git a/Furious/Window/AppMainWindow.py b/Furious/Window/AppMainWindow.py index 4eb6c28..1379f4f 100644 --- a/Furious/Window/AppMainWindow.py +++ b/Furious/Window/AppMainWindow.py @@ -111,6 +111,7 @@ class AppMainWindow(AppQMainWindow): self.setWindowTitle(f'{_(APPLICATION_NAME)} ({_(ADMINISTRATOR_NAME)})') else: self.setWindowTitle(f'{_(APPLICATION_NAME)}') + # TODO: Need this? # self.setAttribute(QtCore.Qt.WidgetAttribute.WA_ShowWithoutActivating) @@ -579,6 +580,12 @@ class AppMainWindow(AppQMainWindow): f'{size.toTuple()}' ) + def retranslate(self): + if SystemRuntime.isAdmin(): + self.setWindowTitle(f'{_(APPLICATION_NAME)} ({_(ADMINISTRATOR_NAME)})') + else: + self.setWindowTitle(f'{_(APPLICATION_NAME)}') + def cleanup(self): AppSettings.set('AppMainWindowGeometry', self.saveGeometry()) AppSettings.set('AppMainWindowState', self.saveState())