Use system loanguage for servers
This commit is contained in:
parent
98b0d89981
commit
2a6098d2c4
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user