mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
server: refactor connect/disconnect popup messages localization
This commit is contained in:
parent
3ecb9702ef
commit
952f3a586a
28
WSServer.cpp
28
WSServer.cpp
@ -101,13 +101,15 @@ void WSServer::onNewConnection() {
|
|||||||
blog(LOG_INFO, "new client connection from %s:%d",
|
blog(LOG_INFO, "new client connection from %s:%d",
|
||||||
clientIp.toUtf8().constData(), pSocket->peerPort());
|
clientIp.toUtf8().constData(), pSocket->peerPort());
|
||||||
|
|
||||||
QString msg = QString(obs_module_text("OBSWebsocket.ConnectNotify.ClientIP"))
|
obs_frontend_push_ui_translation(obs_module_get_string);
|
||||||
+ QString(" ")
|
|
||||||
+ Utils::FormatIPAddress(clientAddr);
|
|
||||||
|
|
||||||
Utils::SysTrayNotify(msg,
|
QString title = tr("OBSWebsocket.NotifyConnect.Title");
|
||||||
QSystemTrayIcon::Information,
|
QString msg = tr("OBSWebsocket.NotifyConnect.Message")
|
||||||
QString(obs_module_text("OBSWebsocket.ConnectNotify.Connected")));
|
.arg(Utils::FormatIPAddress(clientAddr));
|
||||||
|
|
||||||
|
Utils::SysTrayNotify(msg, QSystemTrayIcon::Information, title);
|
||||||
|
|
||||||
|
obs_frontend_pop_ui_translation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,12 +138,14 @@ void WSServer::onSocketDisconnected() {
|
|||||||
blog(LOG_INFO, "client %s:%d disconnected",
|
blog(LOG_INFO, "client %s:%d disconnected",
|
||||||
clientIp.toUtf8().constData(), pSocket->peerPort());
|
clientIp.toUtf8().constData(), pSocket->peerPort());
|
||||||
|
|
||||||
QString msg = QString(obs_module_text("OBSWebsocket.ConnectNotify.ClientIP"))
|
obs_frontend_push_ui_translation(obs_module_get_string);
|
||||||
+ QString(" ")
|
|
||||||
+ Utils::FormatIPAddress(clientAddr);
|
|
||||||
|
|
||||||
Utils::SysTrayNotify(msg,
|
QString title = tr("OBSWebsocket.NotifyDisconnect.Title");
|
||||||
QSystemTrayIcon::Information,
|
QString msg = tr("OBSWebsocket.NotifyDisconnect.Message")
|
||||||
QString(obs_module_text("OBSWebsocket.ConnectNotify.Disconnected")));
|
.arg(Utils::FormatIPAddress(clientAddr));
|
||||||
|
|
||||||
|
Utils::SysTrayNotify(msg, QSystemTrayIcon::Information, title);
|
||||||
|
|
||||||
|
obs_frontend_pop_ui_translation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ OBSWebsocket.Settings.AuthRequired="Enable authentication"
|
|||||||
OBSWebsocket.Settings.Password="Password"
|
OBSWebsocket.Settings.Password="Password"
|
||||||
OBSWebsocket.Settings.DebugEnable="Enable debug logging"
|
OBSWebsocket.Settings.DebugEnable="Enable debug logging"
|
||||||
OBSWebsocket.Settings.AlertsEnable="Enable System Tray Alerts"
|
OBSWebsocket.Settings.AlertsEnable="Enable System Tray Alerts"
|
||||||
OBSWebsocket.ConnectNotify.Connected="New WebSocket connection"
|
OBSWebsocket.NotifyConnect.Title="New WebSocket connection"
|
||||||
OBSWebsocket.ConnectNotify.Disconnected="WebSocket client disconnected"
|
OBSWebsocket.NotifyConnect.Message="Client %1 connected"
|
||||||
OBSWebsocket.ConnectNotify.ClientIP="Client Address:"
|
OBSWebsocket.NotifyDisconnect.Title="WebSocket client disconnected"
|
||||||
|
OBSWebsocket.NotifyDisconnect.Message="Client %1 disconnected"
|
@ -6,6 +6,7 @@ OBSWebsocket.Settings.AuthRequired="Activer l'authentification"
|
|||||||
OBSWebsocket.Settings.Password="Mot de passe"
|
OBSWebsocket.Settings.Password="Mot de passe"
|
||||||
OBSWebsocket.Settings.DebugEnable="Débogage dans le fichier journal"
|
OBSWebsocket.Settings.DebugEnable="Débogage dans le fichier journal"
|
||||||
OBSWebsocket.Settings.AlertsEnable="Notifications de connexion/déconnexion"
|
OBSWebsocket.Settings.AlertsEnable="Notifications de connexion/déconnexion"
|
||||||
OBSWebsocket.ConnectNotify.Connected="Nouvelle connexion WebSocket"
|
OBSWebsocket.NotifyConnect.Title="Nouvelle connexion WebSocket"
|
||||||
OBSWebsocket.ConnectNotify.Disconnected="Déconnexion WebSocket"
|
OBSWebsocket.NotifyConnect.Message="Le client %1 s'est connecté"
|
||||||
OBSWebsocket.ConnectNotify.ClientIP="Adresse du client :"
|
OBSWebsocket.NotifyDisconnect.Title="Déconnexion WebSocket"
|
||||||
|
OBSWebsocket.NotifyDisconnect.Message="Le client %1 s'est déconnecté"
|
Loading…
x
Reference in New Issue
Block a user