Refactor how non-macOS/frozen initialLanguage is fixed

This commit is contained in:
et0h 2021-11-01 19:51:57 +00:00
parent 39be0a13a7
commit b7f27f013b

View File

@ -28,10 +28,6 @@ no_osd_message_list = [
"revert-notification",
]
def isMacOS():
import sys
return sys.platform.startswith(constants.OS_MACOS)
def getLanguages():
langList = {}
for lang in messages:
@ -68,7 +64,7 @@ def getInitialLanguage():
try:
import sys
frozen = getattr(sys, 'frozen', '')
if isMacOS() and frozen in 'macosx_app':
if frozen and frozen in 'macosx_app':
from PySide2.QtCore import QLocale
initialLanguage = QLocale.system().uiLanguages()[0].split('-')[0]
else: