mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Add translations
This commit is contained in:
parent
999460f95e
commit
90ed32738f
@ -13,6 +13,7 @@ from app.classes.shared.server import ServerInstance
|
||||
from app.classes.shared.console import Console
|
||||
from app.classes.shared.helpers import Helpers
|
||||
from app.classes.shared.main_models import DatabaseShortcuts
|
||||
from app.classes.shared.translation import Translation
|
||||
|
||||
from app.classes.minecraft.stats import Stats
|
||||
|
||||
@ -39,6 +40,7 @@ class ServersController(metaclass=Singleton):
|
||||
self.stats = Stats(self.helper, self)
|
||||
self.ws = WebSocketManager()
|
||||
self.server_subpage = {}
|
||||
self.translation = Translation(self.helper)
|
||||
|
||||
# **********************************************************************************
|
||||
# Generic Servers Methods
|
||||
@ -172,10 +174,13 @@ class ServersController(metaclass=Singleton):
|
||||
def init_all_servers(self):
|
||||
servers = self.get_all_defined_servers()
|
||||
self.failed_servers = []
|
||||
|
||||
init_trans = self.translation.translate(
|
||||
"startup", "server", self.helper.get_setting("language")
|
||||
)
|
||||
for server in servers:
|
||||
self.ws.broadcast_to_admins(
|
||||
"update", {"message": f"Initializing {server['server_name']}."}
|
||||
"update",
|
||||
{"message": f"{init_trans}{server['server_name']}."},
|
||||
)
|
||||
server_id = server.get("server_id")
|
||||
|
||||
|
@ -590,6 +590,14 @@
|
||||
"newServer": "Create New Server",
|
||||
"servers": "Servers"
|
||||
},
|
||||
"startup": {
|
||||
"serverInit": "Initializing Servers",
|
||||
"server": "Initializing ",
|
||||
"internet": "Checking for internet connection",
|
||||
"tasks": "Starting Tasks Scheduler",
|
||||
"internals": "Configuring and starting Crafty's internal componenets",
|
||||
"almost": "Finishing up. Hang on tight..."
|
||||
},
|
||||
"userConfig": {
|
||||
"apiKey": "API Keys",
|
||||
"auth": "Authorized? ",
|
||||
|
Loading…
x
Reference in New Issue
Block a user