Skip to content

Commit

Permalink
Fix critical error with non-supported languages
Browse files Browse the repository at this point in the history
  • Loading branch information
isatsam committed Oct 3, 2024
1 parent d17ba49 commit b183d1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vfs_explorer/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ def start(path_to_archive=None):
if settings.value("user_language"):
# If user previously selected a language
translator.load(f'{settings.value("user_language")}.qm', Global.languages)
elif os.path.isfile(os.path.join(LANG_PATH,
elif os.path.isfile(os.path.join(Global.languages,
f'{QLocale.system().language().name}.qm')):
# If a translation corresponding to user's locale is included
translator.load(f'{QLocale.system().language().name}.qm', os.getcwd())
else:
# Fall back to default language
translator.load('English.qm', LANG_PATH)
translator.load('English.qm', Global.languages)
# Additionally, if en.qm is missing, it will just show "non-translated"
# strings, which are kind of in English anyways.

Expand All @@ -72,4 +72,4 @@ def start(path_to_archive=None):
updater = Updater(None, app.mainWindow)
updater.checkForUpdates()

sys.exit(app.exec())
app.exec()

0 comments on commit b183d1e

Please sign in to comment.