summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-01-09 06:24:52 +0900
committerkali <kali@leap.se>2013-01-09 06:24:52 +0900
commit6fe187c4ea2a32105c712d34167058707f8f82f8 (patch)
tree134225514144924027d9eee3ee8ef19d2878c6af
parent289722fe0eda46c8f5fbbecb84c8a0fbbe36a15f (diff)
parenta5b4b7020daebbcb25c016cf1821818b71a2e457 (diff)
Merge branch 'feature/translation-fixes' into develop
-rw-r--r--data/leap_client.pro4
-rw-r--r--data/translations/de.ts218
-rw-r--r--data/ts/en_US.ts228
-rw-r--r--src/leap/baseapp/eip.py4
-rw-r--r--src/leap/baseapp/log.py4
-rw-r--r--src/leap/baseapp/systray.py56
-rw-r--r--src/leap/eip/exceptions.py55
-rw-r--r--src/leap/gui/firstrun/last.py8
-rw-r--r--src/leap/gui/firstrun/login.py10
-rw-r--r--src/leap/gui/firstrun/providerselect.py7
-rw-r--r--src/leap/gui/firstrun/register.py8
-rw-r--r--src/leap/gui/firstrun/regvalidation.py4
12 files changed, 537 insertions, 69 deletions
diff --git a/data/leap_client.pro b/data/leap_client.pro
index 3f76d6af..a9a9a932 100644
--- a/data/leap_client.pro
+++ b/data/leap_client.pro
@@ -3,6 +3,10 @@
# is not there a f*** way of expanding this? other to template with python I mean...
SOURCES += ../src/leap/base/exceptions.py
+SOURCES += ../src/leap/eip/exceptions.py
+SOURCES += ../src/leap/baseapp/eip.py
+SOURCES += ../src/leap/baseapp/log.py
+SOURCES += ../src/leap/baseapp/systray.py
SOURCES += ../src/leap/gui/firstrun/intro.py
SOURCES += ../src/leap/gui/firstrun/last.py
SOURCES += ../src/leap/gui/firstrun/login.py
diff --git a/data/translations/de.ts b/data/translations/de.ts
new file mode 100644
index 00000000..f2ab6fa4
--- /dev/null
+++ b/data/translations/de.ts
@@ -0,0 +1,218 @@
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0">
+<context>
+ <name>IntroPage</name>
+ <message>
+ <location filename="../src/leap/gui/firstrun/intro.py" line="14"/>
+ <source>First run wizard.</source>
+ <translation>Assistent für erstmaligen Start</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/intro.py" line="24"/>
+ <source>Now we will guide you through some configuration that is needed before you can connect for the first time.&lt;br&gt;&lt;br&gt;If you ever need to modify these options again, you can find the wizard in the &apos;&lt;i&gt;Settings&lt;/i&gt;&apos; menu from the main window.&lt;br&gt;&lt;br&gt;Do you want to &lt;b&gt;sign up&lt;/b&gt; for a new account, or &lt;b&gt;log in&lt;/b&gt; with an already existing username?&lt;br&gt;</source>
+ <translation>Wir werden dich nun durch einige Konfigurationen führen, die du für den ersten Start benötigst.&lt;br&gt;&lt;br&gt;Wenn du diese Konfigurationen jemals ändern musst, findest du den Assistenten im &apos;&lt;i&gt;Einstellungen&lt;/i&gt;&apos;-Menü des Haupfensters.&lt;br&gt;&lt;br&gt;Möchtest du dich für einen neuen Account &lt;b&gt;anmelden&lt;/b&gt; oder mit einem bestehenden Usernamen &lt;b&gt;einloggen&lt;/b&gt;?</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/intro.py" line="37"/>
+ <source>Sign up for a new account.</source>
+ <translation>Für einen neuen Account anmelden.</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/intro.py" line="40"/>
+ <source>Log In with my credentials.</source>
+ <translation>Mit bestehenden Daten einloggen.</translation>
+ </message>
+</context>
+<context>
+ <name>LogInPage</name>
+ <message>
+ <location filename="../src/leap/gui/firstrun/login.py" line="96"/>
+ <source>Username must be in the username@provider form.</source>
+ <translation>Der Username muss in der Form username@provider sein.</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/login.py" line="140"/>
+ <source>Resolving domain name</source>
+ <translation>Auflösen des Domain-Namens</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/login.py" line="163"/>
+ <source>Authentication error: %s</source>
+ <translation>Authentifizierungsfehler: %s</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/login.py" line="179"/>
+ <source>Credentials validated.</source>
+ <translation>Anmeldedaten korrekt.</translation>
+ </message>
+</context>
+<context>
+ <name>ProviderInfoPage</name>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerinfo.py" line="18"/>
+ <source>Provider Info</source>
+ <translation>Provider-info</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerinfo.py" line="19"/>
+ <source>This is what provider says.</source>
+ <translation>Das ist, was der Provider sagt.</translation>
+ </message>
+</context>
+<context>
+ <name>ProviderSetupValidationPage</name>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providersetup.py" line="26"/>
+ <source>Provider setup</source>
+ <translation>Provider-Setup</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providersetup.py" line="27"/>
+ <source>Doing autoconfig.</source>
+ <translation>Führe autoconfig durch.</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providersetup.py" line="83"/>
+ <source>Fetching CA certificate</source>
+ <translation>Hole CA-Zertifikat</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providersetup.py" line="105"/>
+ <source>Checking CA fingerprint</source>
+ <translation>Überprüfe CA-Fingerprint</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providersetup.py" line="134"/>
+ <source>Validating api certificate</source>
+ <translation>Überprüfe API-Zertifikat</translation>
+ </message>
+</context>
+<context>
+ <name>RegisterUserPage</name>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="31"/>
+ <source>Sign Up</source>
+ <translation>Anmelden</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="208"/>
+ <source>Registration succeeded!</source>
+ <translation>Registrierung erfolgreich!</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="238"/>
+ <source>Password does not match..</source>
+ <translation>Passwort stimmt nicht überien.</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="242"/>
+ <source>Password too short.</source>
+ <translation>Passwort zu kurz</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="247"/>
+ <source>Password too obvious.</source>
+ <translation>Passwort zu simpel.</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="279"/>
+ <source>Error connecting to provider (timeout)</source>
+ <translation>Verbindungsfehler zu Provider (timeout)</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="284"/>
+ <source>Error Connecting to provider (connerr).</source>
+ <translation>Verbindungsfehler zu Provider (connerr)</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="292"/>
+ <source>Error during registration (%s)</source>
+ <translation>Fehler während der Registrierung (%s)</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="302"/>
+ <source>Could not register (bad response)</source>
+ <translation>Konnte nicht registrieren (bad response)</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="309"/>
+ <source>Username not available.</source>
+ <translation>Username nicht verfügbar.</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="375"/>
+ <source>Register a new user with provider %s.</source>
+ <translation>Registriere einen neuen User bei Provider %s</translation>
+ </message>
+</context>
+<context>
+ <name>RegisterUserValidationPage</name>
+ <message>
+ <location filename="../src/leap/gui/firstrun/regvalidation.py" line="95"/>
+ <source>Fetching provider config...</source>
+ <translation>Hole Provider-Konfiguration...</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/regvalidation.py" line="112"/>
+ <source>Authentication error: %s</source>
+ <translation>Authentifizierungsfehler: %s</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/regvalidation.py" line="117"/>
+ <source>Fetching eip certificate</source>
+ <translation>Hole EIP-Zertifikat</translation>
+ </message>
+</context>
+<context>
+ <name>SelectProviderPage</name>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="32"/>
+ <source>Enter Provider</source>
+ <translation>Gib Provider ein</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="33"/>
+ <source>Please enter the domain of the provider you want to use for your connection.</source>
+ <translation>Bitte gib die Domain des Providers an, den du für deine Verbindung nutzen möchtest.</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="87"/>
+ <source>chec&amp;k!</source>
+ <translation type="unfinished"/>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="97"/>
+ <source>Server certificate could not be verified.</source>
+ <translation>Server-Zertifikat konnte nicht bestätigt werden.</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="136"/>
+ <source>Certificate validation</source>
+ <translation>Zertifikatsüberprüfung</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="222"/>
+ <source>checking domain name</source>
+ <translation>Prüfe Domain-Name</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="276"/>
+ <source>checking https connection</source>
+ <translation>Prüfe HTTPS-Verbindung</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="292"/>
+ <source>Could not get info from provider.</source>
+ <translation>Konnte keine Information vom Provider bekommen.</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="295"/>
+ <source>Could not download provider info (refused conn.).</source>
+ <translation>Konnte Provider-Info nicht herunterladen (refused conn.).</translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="305"/>
+ <source>fetching provider info</source>
+ <translation>Hole Provider-Info</translation>
+ </message>
+</context>
+</TS> \ No newline at end of file
diff --git a/data/ts/en_US.ts b/data/ts/en_US.ts
index a802dd75..3fdb38da 100644
--- a/data/ts/en_US.ts
+++ b/data/ts/en_US.ts
@@ -1,6 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="2.0">
<context>
+ <name>EIPConductorAppMixin</name>
+ <message>
+ <location filename="../src/leap/baseapp/eip.py" line="198"/>
+ <source>&amp;Disconnect</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/eip.py" line="212"/>
+ <source>&amp;Connect</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>EIPErrors</name>
+ <message>
+ <location filename="../src/leap/eip/exceptions.py" line="66"/>
+ <source>We could not find any authentication agent in your system.&lt;br/&gt;Make sure you have &lt;b&gt;polkit-gnome-authentication-agent-1&lt;/b&gt; running and try again.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/eip/exceptions.py" line="77"/>
+ <source>We could not find &lt;b&gt;pkexec&lt;/b&gt; in your system.&lt;br/&gt; Do you want to try &lt;b&gt;setuid workaround&lt;/b&gt;? (&lt;i&gt;DOES NOTHING YET&lt;/i&gt;)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/eip/exceptions.py" line="88"/>
+ <source>No suitable openvpn command found. &lt;br/&gt;(Might be a permissions problem)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/eip/exceptions.py" line="97"/>
+ <source>there is a problem with provider certificate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/eip/exceptions.py" line="104"/>
+ <source>an error occurred during configuratio of leap services</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/eip/exceptions.py" line="111"/>
+ <source>Another OpenVPN Process has been detected.Please close it before starting leap-client</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/eip/exceptions.py" line="119"/>
+ <source>Server does not allow secure connections</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/eip/exceptions.py" line="126"/>
+ <source>Server certificate could not be verified</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/eip/exceptions.py" line="137"/>
+ <source>We could not find your eip certs in the expected path</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>Errors</name>
<message>
<location filename="../src/leap/base/exceptions.py" line="57"/>
@@ -29,7 +90,7 @@
</message>
<message>
<location filename="../src/leap/base/exceptions.py" line="95"/>
- <source>The Encrypted Connection was lost. Shutting down...</source>
+ <source>The Encrypted Connection was lost.</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -57,6 +118,24 @@
</message>
</context>
<context>
+ <name>LastPage</name>
+ <message>
+ <location filename="../src/leap/gui/firstrun/last.py" line="18"/>
+ <source>Connecting to Encrypted Internet Proxy service...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/last.py" line="54"/>
+ <source>You are now using an encrypted connection!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/last.py" line="58"/>
+ <source>Click &apos;&lt;i&gt;%s&lt;/i&gt;&apos; to end the wizard and save your settings.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>LogInPage</name>
<message>
<location filename="../src/leap/gui/firstrun/login.py" line="96"/>
@@ -78,16 +157,54 @@
<source>Credentials validated.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/login.py" line="24"/>
+ <source>Log In</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/login.py" line="25"/>
+ <source>Log in with your credentials.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/login.py" line="38"/>
+ <source>User &amp;name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/login.py" line="53"/>
+ <source>&amp;Password:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/login.py" line="80"/>
+ <source>Log in</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>LogPaneMixin</name>
+ <message>
+ <location filename="../src/leap/baseapp/log.py" line="24"/>
+ <source>&amp;Connect</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/log.py" line="37"/>
+ <source>Disconnected</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ProviderInfoPage</name>
<message>
- <location filename="../src/leap/gui/firstrun/providerinfo.py" line="18"/>
+ <location filename="../src/leap/gui/firstrun/providerinfo.py" line="19"/>
<source>Provider Info</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../src/leap/gui/firstrun/providerinfo.py" line="19"/>
+ <location filename="../src/leap/gui/firstrun/providerinfo.py" line="20"/>
<source>This is what provider says.</source>
<translation type="unfinished"></translation>
</message>
@@ -177,6 +294,26 @@
<source>Register a new user with provider %s.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="48"/>
+ <source>User &amp;name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="60"/>
+ <source>&amp;Password:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="66"/>
+ <source>Password (again):</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/register.py" line="72"/>
+ <source>&amp;Remember username and password.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>RegisterUserValidationPage</name>
@@ -195,6 +332,16 @@
<source>Fetching eip certificate</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/regvalidation.py" line="34"/>
+ <source>Connecting...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/regvalidation.py" line="36"/>
+ <source>Checking connection with provider.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>SelectProviderPage</name>
@@ -248,11 +395,78 @@
<source>fetching provider info</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="103"/>
+ <source>&amp;Trust this provider certificate.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="346"/>
+ <source>Do you want to &lt;b&gt;trust this provider certificate?&lt;/b&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/gui/firstrun/providerselect.py" line="349"/>
+ <source>SHA-256 fingerprint: &lt;i&gt;%s&lt;/i&gt;&lt;br&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
- <name>TestyClass</name>
-</context>
-<context>
- <name>this is a cat</name>
+ <name>StatusAwareTrayIconMixin</name>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="78"/>
+ <source>EIP Connection Status</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="87"/>
+ <source>&lt;b&gt;disconnected&lt;/b&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="126"/>
+ <source>Encryption ON turn &amp;off</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="131"/>
+ <source>&amp;Details...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="135"/>
+ <source>&amp;About</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="138"/>
+ <source>About Q&amp;t</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="141"/>
+ <source>&amp;Quit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="152"/>
+ <source>Encryption ON turn o&amp;ff</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="157"/>
+ <source>Encryption OFF turn &amp;on</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="162"/>
+ <source>connecting...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/leap/baseapp/systray.py" line="185"/>
+ <source>About</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
</TS>
diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py
index 55ecfa79..41f4c541 100644
--- a/src/leap/baseapp/eip.py
+++ b/src/leap/baseapp/eip.py
@@ -195,7 +195,7 @@ class EIPConductorAppMixin(object):
else:
# no errors, so go on.
if self.debugmode:
- self.startStopButton.setText('&Disconnect')
+ self.startStopButton.setText(self.tr('&Disconnect'))
self.eip_service_started = True
self.toggleEIPAct()
@@ -209,7 +209,7 @@ class EIPConductorAppMixin(object):
self.network_checker.stop()
self.conductor.disconnect()
if self.debugmode:
- self.startStopButton.setText('&Connect')
+ self.startStopButton.setText(self.tr('&Connect'))
self.eip_service_started = False
self.toggleEIPAct()
self.timer.stop()
diff --git a/src/leap/baseapp/log.py b/src/leap/baseapp/log.py
index 8a7f81c3..95cfc918 100644
--- a/src/leap/baseapp/log.py
+++ b/src/leap/baseapp/log.py
@@ -21,7 +21,7 @@ class LogPaneMixin(object):
logging_layout = QtGui.QVBoxLayout()
self.logbrowser = QtGui.QTextBrowser()
- startStopButton = QtGui.QPushButton("&Connect")
+ startStopButton = QtGui.QPushButton(self.tr("&Connect"))
self.startStopButton = startStopButton
logging_layout.addWidget(self.logbrowser)
@@ -34,7 +34,7 @@ class LogPaneMixin(object):
grid = QtGui.QGridLayout()
self.updateTS = QtGui.QLabel('')
- self.status_label = QtGui.QLabel('Disconnected')
+ self.status_label = QtGui.QLabel(self.tr('Disconnected'))
self.ip_label = QtGui.QLabel('')
self.remote_label = QtGui.QLabel('')
diff --git a/src/leap/baseapp/systray.py b/src/leap/baseapp/systray.py
index 93fab716..77eb3fe9 100644
--- a/src/leap/baseapp/systray.py
+++ b/src/leap/baseapp/systray.py
@@ -75,7 +75,8 @@ class StatusAwareTrayIconMixin(object):
self.iconpath['connected'])),
self.ConnectionWidgets = con_widgets
- self.statusIconBox = QtGui.QGroupBox("EIP Connection Status")
+ self.statusIconBox = QtGui.QGroupBox(
+ self.tr("EIP Connection Status"))
statusIconLayout = QtGui.QHBoxLayout()
statusIconLayout.addWidget(self.ConnectionWidgets['disconnected'])
statusIconLayout.addWidget(self.ConnectionWidgets['connecting'])
@@ -83,7 +84,8 @@ class StatusAwareTrayIconMixin(object):
statusIconLayout.itemAt(1).widget().hide()
statusIconLayout.itemAt(2).widget().hide()
- self.leapConnStatus = QtGui.QLabel("<b>disconnected</b>")
+ self.leapConnStatus = QtGui.QLabel(
+ self.tr("<b>disconnected</b>"))
statusIconLayout.addWidget(self.leapConnStatus)
self.statusIconBox.setLayout(statusIconLayout)
@@ -113,26 +115,32 @@ class StatusAwareTrayIconMixin(object):
#self.trayIconMenu.customContextMenuRequested.connect(
#self.on_context_menu)
- def bad(self):
- logger.error('this should not be called')
+ #def bad(self):
+ #logger.error('this should not be called')
def createActions(self):
"""
creates actions to be binded to tray icon
"""
# XXX change action name on (dis)connect
- self.connAct = QtGui.QAction("Encryption ON turn &off", self,
- triggered=lambda: self.start_or_stopVPN())
-
- self.detailsAct = QtGui.QAction("&Details...",
- self,
- triggered=self.detailsWin)
- self.aboutAct = QtGui.QAction("&About", self,
- triggered=self.about)
- self.aboutQtAct = QtGui.QAction("About Q&t", self,
- triggered=QtGui.qApp.aboutQt)
- self.quitAction = QtGui.QAction("&Quit", self,
- triggered=self.cleanupAndQuit)
+ self.connAct = QtGui.QAction(
+ self.tr("Encryption ON turn &off"),
+ self,
+ triggered=lambda: self.start_or_stopVPN())
+
+ self.detailsAct = QtGui.QAction(
+ self.tr("&Details..."),
+ self,
+ triggered=self.detailsWin)
+ self.aboutAct = QtGui.QAction(
+ self.tr("&About"), self,
+ triggered=self.about)
+ self.aboutQtAct = QtGui.QAction(
+ self.tr("About Q&t"), self,
+ triggered=QtGui.qApp.aboutQt)
+ self.quitAction = QtGui.QAction(
+ self.tr("&Quit"), self,
+ triggered=self.cleanupAndQuit)
def toggleEIPAct(self):
# this is too simple by now.
@@ -141,15 +149,17 @@ class StatusAwareTrayIconMixin(object):
icon_status = self.conductor.get_icon_name()
if icon_status == "connected":
self.connAct.setEnabled(True)
- self.connAct.setText('Encryption ON turn o&ff')
+ self.connAct.setText(
+ self.tr('Encryption ON turn o&ff'))
return
if icon_status == "disconnected":
self.connAct.setEnabled(True)
- self.connAct.setText('Encryption OFF turn &on')
+ self.connAct.setText(
+ self.tr('Encryption OFF turn &on'))
return
if icon_status == "connecting":
self.connAct.setDisabled(True)
- self.connAct.setText('connecting...')
+ self.connAct.setText(self.tr('connecting...'))
return
def detailsWin(self):
@@ -164,14 +174,15 @@ class StatusAwareTrayIconMixin(object):
def about(self):
# move to widget
flavor = BRANDING.get('short_name', None)
- content = ("LEAP client<br>"
- "(version <b>%s</b>)<br>" % VERSION)
+ content = self.tr(
+ ("LEAP client<br>"
+ "(version <b>%s</b>)<br>" % VERSION))
if flavor:
content = content + ('<br>Flavor: <i>%s</i><br>' % flavor)
content = content + (
"<br><a href='https://leap.se/'>"
"https://leap.se</a>")
- QtGui.QMessageBox.about(self, "About", content)
+ QtGui.QMessageBox.about(self, self.tr("About"), content)
def setConnWidget(self, icon_name):
oldlayout = self.statusIconBox.layout()
@@ -209,6 +220,7 @@ class StatusAwareTrayIconMixin(object):
# is failing in a way beyond my understanding.
# (not working the first time it's clicked).
# this works however.
+ # XXX in osx it shows some glitches.
context_menu.exec_(self.trayIcon.geometry().center())
@QtCore.pyqtSlot()
diff --git a/src/leap/eip/exceptions.py b/src/leap/eip/exceptions.py
index 41eed77a..c127a58f 100644
--- a/src/leap/eip/exceptions.py
+++ b/src/leap/eip/exceptions.py
@@ -33,6 +33,7 @@ TODO:
"""
from leap.base.exceptions import LeapException
+from leap.util.translations import translate
# This should inherit from LeapException
@@ -62,53 +63,69 @@ class Warning(EIPClientError):
class EIPNoPolkitAuthAgentAvailable(CriticalError):
message = "No polkit authentication agent could be found"
- usermessage = ("We could not find any authentication "
- "agent in your system.<br/>"
- "Make sure you have "
- "<b>polkit-gnome-authentication-agent-1</b> "
- "running and try again.")
+ usermessage = translate(
+ "EIPErrors",
+ "We could not find any authentication "
+ "agent in your system.<br/>"
+ "Make sure you have "
+ "<b>polkit-gnome-authentication-agent-1</b> "
+ "running and try again.")
class EIPNoPkexecAvailable(Warning):
message = "No pkexec binary found"
- usermessage = ("We could not find <b>pkexec</b> in your "
- "system.<br/> Do you want to try "
- "<b>setuid workaround</b>? "
- "(<i>DOES NOTHING YET</i>)")
+ usermessage = translate(
+ "EIPErrors",
+ "We could not find <b>pkexec</b> in your "
+ "system.<br/> Do you want to try "
+ "<b>setuid workaround</b>? "
+ "(<i>DOES NOTHING YET</i>)")
failfirst = True
class EIPNoCommandError(EIPClientError):
message = "no suitable openvpn command found"
- usermessage = ("No suitable openvpn command found. "
- "<br/>(Might be a permissions problem)")
+ usermessage = translate(
+ "EIPErrors",
+ "No suitable openvpn command found. "
+ "<br/>(Might be a permissions problem)")
class EIPBadCertError(Warning):
# XXX this should be critical and fail close
message = "cert verification failed"
- usermessage = "there is a problem with provider certificate"
+ usermessage = translate(
+ "EIPErrors",
+ "there is a problem with provider certificate")
class LeapBadConfigFetchedError(Warning):
message = "provider sent a malformed json file"
- usermessage = "an error occurred during configuratio of leap services"
+ usermessage = translate(
+ "EIPErrors",
+ "an error occurred during configuratio of leap services")
class OpenVPNAlreadyRunning(EIPClientError):
message = "Another OpenVPN Process is already running."
- usermessage = ("Another OpenVPN Process has been detected."
- "Please close it before starting leap-client")
+ usermessage = translate(
+ "EIPErrors",
+ "Another OpenVPN Process has been detected."
+ "Please close it before starting leap-client")
class HttpsNotSupported(LeapException):
message = "connection refused while accessing via https"
- usermessage = "Server does not allow secure connections."
+ usermessage = translate(
+ "EIPErrors",
+ "Server does not allow secure connections")
class HttpsBadCertError(LeapException):
message = "verification error on cert"
- usermessage = "Server certificate could not be verified."
+ usermessage = translate(
+ "EIPErrors",
+ "Server certificate could not be verified")
#
# errors still needing some love
@@ -117,7 +134,9 @@ class HttpsBadCertError(LeapException):
class EIPInitNoKeyFileError(CriticalError):
message = "No vpn keys found in the expected path"
- usermessage = "We could not find your eip certs in the expected path"
+ usermessage = translate(
+ "EIPErrors",
+ "We could not find your eip certs in the expected path")
class EIPInitBadKeyFilePermError(Warning):
diff --git a/src/leap/gui/firstrun/last.py b/src/leap/gui/firstrun/last.py
index 1d8caca4..e097b2ae 100644
--- a/src/leap/gui/firstrun/last.py
+++ b/src/leap/gui/firstrun/last.py
@@ -15,7 +15,7 @@ class LastPage(QtGui.QWizardPage):
def __init__(self, parent=None):
super(LastPage, self).__init__(parent)
- self.setTitle("Connecting to Encrypted Internet Proxy service...")
+ self.setTitle(self.tr("Connecting to Encrypted Internet Proxy service..."))
self.setPixmap(
QtGui.QWizard.LogoPixmap,
@@ -51,13 +51,13 @@ class LastPage(QtGui.QWizardPage):
statusline.setText(status)
def set_finished_status(self):
- self.setTitle('You are now using an encrypted connection!')
+ self.setTitle(self.tr('You are now using an encrypted connection!'))
finishText = self.wizard().buttonText(
QtGui.QWizard.FinishButton)
finishText = finishText.replace('&', '')
- self.label.setText(
+ self.label.setText(self.tr(
"Click '<i>%s</i>' to end the wizard and "
- "save your settings." % finishText)
+ "save your settings." % finishText))
# XXX init network checker
# trigger signal
diff --git a/src/leap/gui/firstrun/login.py b/src/leap/gui/firstrun/login.py
index 6bf0605d..e39eecc0 100644
--- a/src/leap/gui/firstrun/login.py
+++ b/src/leap/gui/firstrun/login.py
@@ -21,8 +21,8 @@ class LogInPage(InlineValidationPage, UserFormMixIn): # InlineValidationPage
super(LogInPage, self).__init__(parent)
self.current_page = "login"
- self.setTitle("Log In")
- self.setSubTitle("Log in with your credentials.")
+ self.setTitle(self.tr("Log In"))
+ self.setSubTitle(self.tr("Log in with your credentials."))
self.current_page = "login"
self.setPixmap(
@@ -35,7 +35,7 @@ class LogInPage(InlineValidationPage, UserFormMixIn): # InlineValidationPage
self.do_confirm_next = False
def setupUI(self):
- userNameLabel = QtGui.QLabel("User &name:")
+ userNameLabel = QtGui.QLabel(self.tr("User &name:"))
userNameLineEdit = QtGui.QLineEdit()
userNameLineEdit.cursorPositionChanged.connect(
self.reset_validation_status)
@@ -50,7 +50,7 @@ class LogInPage(InlineValidationPage, UserFormMixIn): # InlineValidationPage
#'username@provider.example.org')
self.userNameLineEdit = userNameLineEdit
- userPasswordLabel = QtGui.QLabel("&Password:")
+ userPasswordLabel = QtGui.QLabel(self.tr("&Password:"))
self.userPasswordLineEdit = QtGui.QLineEdit()
self.userPasswordLineEdit.setEchoMode(
QtGui.QLineEdit.Password)
@@ -77,7 +77,7 @@ class LogInPage(InlineValidationPage, UserFormMixIn): # InlineValidationPage
layout.addWidget(self.valFrame, 4, 2, 4, 2)
self.valFrame.hide()
- self.nextText("Log in")
+ self.nextText(self.tr("Log in"))
self.setLayout(layout)
#self.registerField('is_login_wizard')
diff --git a/src/leap/gui/firstrun/providerselect.py b/src/leap/gui/firstrun/providerselect.py
index 62742181..28fb829c 100644
--- a/src/leap/gui/firstrun/providerselect.py
+++ b/src/leap/gui/firstrun/providerselect.py
@@ -101,7 +101,7 @@ class SelectProviderPage(InlineValidationPage):
self.certInfo.setWordWrap(True)
self.certWarning = QtGui.QLabel("")
self.trustProviderCertCheckBox = QtGui.QCheckBox(
- "&Trust this provider certificate.")
+ self.tr("&Trust this provider certificate."))
self.trustProviderCertCheckBox.stateChanged.connect(
self.onTrustCheckChanged)
@@ -344,9 +344,10 @@ class SelectProviderPage(InlineValidationPage):
def add_cert_info(self, certinfo): # pragma: no cover XXX
self.certWarning.setText(
- "Do you want to <b>trust this provider certificate?</b>")
+ self.tr("Do you want to <b>trust this provider certificate?</b>"))
+ # XXX Check if this needs to abstracted to remove certinfo
self.certInfo.setText(
- 'SHA-256 fingerprint: <i>%s</i><br>' % certinfo)
+ self.tr('SHA-256 fingerprint: <i>%s</i><br>' % certinfo))
self.certInfo.setWordWrap(True)
self.certinfoGroup.show()
diff --git a/src/leap/gui/firstrun/register.py b/src/leap/gui/firstrun/register.py
index 4c811093..b04638e0 100644
--- a/src/leap/gui/firstrun/register.py
+++ b/src/leap/gui/firstrun/register.py
@@ -45,7 +45,7 @@ class RegisterUserPage(InlineValidationPage, UserFormMixIn):
self.focused_field = False
def setupUI(self):
- userNameLabel = QtGui.QLabel("User &name:")
+ userNameLabel = QtGui.QLabel(self.tr("User &name:"))
userNameLineEdit = QtGui.QLineEdit()
userNameLineEdit.cursorPositionChanged.connect(
self.reset_validation_status)
@@ -57,20 +57,20 @@ class RegisterUserPage(InlineValidationPage, UserFormMixIn):
QtGui.QRegExpValidator(usernameRe, self))
self.userNameLineEdit = userNameLineEdit
- userPasswordLabel = QtGui.QLabel("&Password:")
+ userPasswordLabel = QtGui.QLabel(self.tr("&Password:"))
self.userPasswordLineEdit = QtGui.QLineEdit()
self.userPasswordLineEdit.setEchoMode(
QtGui.QLineEdit.Password)
userPasswordLabel.setBuddy(self.userPasswordLineEdit)
- userPassword2Label = QtGui.QLabel("Password (again):")
+ userPassword2Label = QtGui.QLabel(self.tr("Password (again):"))
self.userPassword2LineEdit = QtGui.QLineEdit()
self.userPassword2LineEdit.setEchoMode(
QtGui.QLineEdit.Password)
userPassword2Label.setBuddy(self.userPassword2LineEdit)
rememberPasswordCheckBox = QtGui.QCheckBox(
- "&Remember username and password.")
+ self.tr("&Remember username and password."))
rememberPasswordCheckBox.setChecked(True)
self.registerField('userName*', self.userNameLineEdit)
diff --git a/src/leap/gui/firstrun/regvalidation.py b/src/leap/gui/firstrun/regvalidation.py
index b86583e0..6135a290 100644
--- a/src/leap/gui/firstrun/regvalidation.py
+++ b/src/leap/gui/firstrun/regvalidation.py
@@ -31,9 +31,9 @@ class RegisterUserValidationPage(ValidationPage):
super(RegisterUserValidationPage, self).__init__(parent)
self.current_page = "signupvalidation"
- title = "Connecting..."
+ title = self.tr("Connecting...")
# XXX uh... really?
- subtitle = "Checking connection with provider."
+ subtitle = self.tr("Checking connection with provider.")
self.setTitle(title)
self.setSubTitle(subtitle)