Merge pull request #353 from amnezia-vpn/feature/added_i18n_for_v4

added i18n for v4
This commit is contained in:
Nethius 2023-10-06 11:49:17 +03:00 committed by GitHub
commit 5c121ea48d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 3896 additions and 2024 deletions

View file

@ -19,6 +19,8 @@ ConnectionController::ConnectionController(const QSharedPointer<ServersModel> &s
Qt::QueuedConnection);
connect(this, &ConnectionController::disconnectFromVpn, m_vpnConnection.get(), &VpnConnection::disconnectFromVpn,
Qt::QueuedConnection);
m_state = Vpn::ConnectionState::Disconnected;
}
void ConnectionController::openConnection()
@ -53,6 +55,8 @@ QString ConnectionController::getLastConnectionError()
void ConnectionController::onConnectionStateChanged(Vpn::ConnectionState state)
{
m_state = state;
m_isConnected = false;
m_connectionStateText = tr("Connection...");
switch (state) {
@ -109,6 +113,17 @@ void ConnectionController::onCurrentContainerUpdated()
}
}
void ConnectionController::onTranslationsUpdated()
{
// get translated text of current state
onConnectionStateChanged(getCurrentConnectionState());
}
Vpn::ConnectionState ConnectionController::getCurrentConnectionState()
{
return m_state;
}
QString ConnectionController::connectionStateText() const
{
return m_connectionStateText;