Skip to content

Commit

Permalink
fix crash on language change
Browse files Browse the repository at this point in the history
  • Loading branch information
minutogit committed Jun 18, 2024
1 parent ab560ba commit e90d002
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
6 changes: 1 addition & 5 deletions src/gui/qt/qt_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1504,12 +1504,8 @@ def change_language(self, lang_code, checked=True):
with open(dest_qm_file, 'wb') as dst_file:
dst_file.write(src_file.read())

# Restart the application
self.restart_application()
show_message_box(self.tr("Notice"), self.tr("Please restart the application to apply the new language settings."))

def restart_application(self):
QCoreApplication.quit()
os.execl(sys.executable, sys.executable, *sys.argv)

def closeEvent(self, event):
# Close all windows on close of main win
Expand Down
Binary file modified src/gui/qt/translation/de_DE.qm
Binary file not shown.
16 changes: 13 additions & 3 deletions src/gui/qt/translation/de_DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1549,17 +1549,27 @@ p, li { white-space: pre-wrap; }
<translation type="vanished">eMinuto - Profil: %s - ID: %s</translation>
</message>
<message>
<location filename="../qt_main.py" line="1543"/>
<location filename="../qt_main.py" line="1507"/>
<source>Notice</source>
<translation>Hinweis</translation>
</message>
<message>
<location filename="../qt_main.py" line="1507"/>
<source>Please restart the application to apply the new language settings.</source>
<translation>Bitte starten Sie die Anwendung neu, damit die neuen Spracheinstellungen übernommen werden.</translation>
</message>
<message>
<location filename="../qt_main.py" line="1539"/>
<source>eMinuto v%s - Profile: %s - ID: %s</source>
<translation>eMinuto v%s - Profil: %s - ID: %s</translation>
</message>
<message>
<location filename="../qt_main.py" line="1552"/>
<location filename="../qt_main.py" line="1548"/>
<source>Successfully logged in.</source>
<translation>Erfolgreich eingeloggt.</translation>
</message>
<message>
<location filename="../qt_main.py" line="1558"/>
<location filename="../qt_main.py" line="1554"/>
<source>Successfully logged out.</source>
<translation>Erfolgreich ausgeloggt.</translation>
</message>
Expand Down

0 comments on commit e90d002

Please sign in to comment.