diff --git a/syncplay/messages.py b/syncplay/messages.py index 23ed80a..ef9d934 100755 --- a/syncplay/messages.py +++ b/syncplay/messages.py @@ -28,6 +28,10 @@ no_osd_message_list = [ "revert-notification", ] +def isMacOS(): + import sys + return sys.platform.startswith(constants.OS_MACOS) + def getLanguages(): langList = {} for lang in messages: @@ -64,7 +68,7 @@ def getInitialLanguage(): try: import sys frozen = getattr(sys, 'frozen', '') - if frozen in 'macosx_app': + if isMacOS() and frozen in 'macosx_app': from PySide2.QtCore import QLocale initialLanguage = QLocale.system().uiLanguages()[0].split('-')[0] else: diff --git a/syncplay/server.py b/syncplay/server.py index 15a0c66..d0ae443 100755 --- a/syncplay/server.py +++ b/syncplay/server.py @@ -29,6 +29,7 @@ class SyncFactory(Factory): disableReady=False, disableChat=False, maxChatMessageLength=constants.MAX_CHAT_MESSAGE_LENGTH, maxUsernameLength=constants.MAX_USERNAME_LENGTH, statsDbFile=None, tlsCertPath=None): self.isolateRooms = isolateRooms + syncplay.messages.setLanguage(syncplay.messages.getInitialLanguage()) print(getMessage("welcome-server-notification").format(syncplay.version)) self.port = port if password: