Merge pull request #353 from amnezia-vpn/feature/added_i18n_for_v4
added i18n for v4
This commit is contained in:
commit
5c121ea48d
24 changed files with 3896 additions and 2024 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue