From a5b4b7020daebbcb25c016cf1821818b71a2e457 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 9 Jan 2013 06:23:45 +0900 Subject: more missed strings to be translated plus initial translation. --- data/leap_client.pro | 4 + data/translations/de.ts | 218 ++++++++++++++++++++++++++++++++++++++++++++ data/ts/en_US.ts | 138 +++++++++++++++++++++++++++- src/leap/baseapp/eip.py | 4 +- src/leap/baseapp/log.py | 4 +- src/leap/baseapp/systray.py | 56 +++++++----- src/leap/eip/exceptions.py | 55 +++++++---- 7 files changed, 432 insertions(+), 47 deletions(-) create mode 100644 data/translations/de.ts 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 @@ + + + IntroPage + + + First run wizard. + Assistent für erstmaligen Start + + + + Now we will guide you through some configuration that is needed before you can connect for the first time.<br><br>If you ever need to modify these options again, you can find the wizard in the '<i>Settings</i>' menu from the main window.<br><br>Do you want to <b>sign up</b> for a new account, or <b>log in</b> with an already existing username?<br> + Wir werden dich nun durch einige Konfigurationen führen, die du für den ersten Start benötigst.<br><br>Wenn du diese Konfigurationen jemals ändern musst, findest du den Assistenten im '<i>Einstellungen</i>'-Menü des Haupfensters.<br><br>Möchtest du dich für einen neuen Account <b>anmelden</b> oder mit einem bestehenden Usernamen <b>einloggen</b>? + + + + Sign up for a new account. + Für einen neuen Account anmelden. + + + + Log In with my credentials. + Mit bestehenden Daten einloggen. + + + + LogInPage + + + Username must be in the username@provider form. + Der Username muss in der Form username@provider sein. + + + + Resolving domain name + Auflösen des Domain-Namens + + + + Authentication error: %s + Authentifizierungsfehler: %s + + + + Credentials validated. + Anmeldedaten korrekt. + + + + ProviderInfoPage + + + Provider Info + Provider-info + + + + This is what provider says. + Das ist, was der Provider sagt. + + + + ProviderSetupValidationPage + + + Provider setup + Provider-Setup + + + + Doing autoconfig. + Führe autoconfig durch. + + + + Fetching CA certificate + Hole CA-Zertifikat + + + + Checking CA fingerprint + Überprüfe CA-Fingerprint + + + + Validating api certificate + Überprüfe API-Zertifikat + + + + RegisterUserPage + + + Sign Up + Anmelden + + + + Registration succeeded! + Registrierung erfolgreich! + + + + Password does not match.. + Passwort stimmt nicht überien. + + + + Password too short. + Passwort zu kurz + + + + Password too obvious. + Passwort zu simpel. + + + + Error connecting to provider (timeout) + Verbindungsfehler zu Provider (timeout) + + + + Error Connecting to provider (connerr). + Verbindungsfehler zu Provider (connerr) + + + + Error during registration (%s) + Fehler während der Registrierung (%s) + + + + Could not register (bad response) + Konnte nicht registrieren (bad response) + + + + Username not available. + Username nicht verfügbar. + + + + Register a new user with provider %s. + Registriere einen neuen User bei Provider %s + + + + RegisterUserValidationPage + + + Fetching provider config... + Hole Provider-Konfiguration... + + + + Authentication error: %s + Authentifizierungsfehler: %s + + + + Fetching eip certificate + Hole EIP-Zertifikat + + + + SelectProviderPage + + + Enter Provider + Gib Provider ein + + + + Please enter the domain of the provider you want to use for your connection. + Bitte gib die Domain des Providers an, den du für deine Verbindung nutzen möchtest. + + + + chec&k! + + + + + Server certificate could not be verified. + Server-Zertifikat konnte nicht bestätigt werden. + + + + Certificate validation + Zertifikatsüberprüfung + + + + checking domain name + Prüfe Domain-Name + + + + checking https connection + Prüfe HTTPS-Verbindung + + + + Could not get info from provider. + Konnte keine Information vom Provider bekommen. + + + + Could not download provider info (refused conn.). + Konnte Provider-Info nicht herunterladen (refused conn.). + + + + fetching provider info + Hole Provider-Info + + + \ No newline at end of file diff --git a/data/ts/en_US.ts b/data/ts/en_US.ts index a7e13dec..3fdb38da 100644 --- a/data/ts/en_US.ts +++ b/data/ts/en_US.ts @@ -1,5 +1,66 @@ + + EIPConductorAppMixin + + + &Disconnect + + + + + &Connect + + + + + 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. + + + + + 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>) + + + + + No suitable openvpn command found. <br/>(Might be a permissions problem) + + + + + there is a problem with provider certificate + + + + + an error occurred during configuratio of leap services + + + + + Another OpenVPN Process has been detected.Please close it before starting leap-client + + + + + Server does not allow secure connections + + + + + Server certificate could not be verified + + + + + We could not find your eip certs in the expected path + + + Errors @@ -29,7 +90,7 @@ - The Encrypted Connection was lost. Shutting down... + The Encrypted Connection was lost. @@ -122,15 +183,28 @@ + + LogPaneMixin + + + &Connect + + + + + Disconnected + + + ProviderInfoPage - + Provider Info - + This is what provider says. @@ -337,4 +411,62 @@ + + StatusAwareTrayIconMixin + + + EIP Connection Status + + + + + <b>disconnected</b> + + + + + Encryption ON turn &off + + + + + &Details... + + + + + &About + + + + + About Q&t + + + + + &Quit + + + + + Encryption ON turn o&ff + + + + + Encryption OFF turn &on + + + + + connecting... + + + + + About + + + 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("disconnected") + self.leapConnStatus = QtGui.QLabel( + self.tr("disconnected")) 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
" - "(version %s)
" % VERSION) + content = self.tr( + ("LEAP client
" + "(version %s)
" % VERSION)) if flavor: content = content + ('
Flavor: %s
' % flavor) content = content + ( "
" "https://leap.se") - 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.
" - "Make sure you have " - "polkit-gnome-authentication-agent-1 " - "running and try again.") + usermessage = translate( + "EIPErrors", + "We could not find any authentication " + "agent in your system.
" + "Make sure you have " + "polkit-gnome-authentication-agent-1 " + "running and try again.") class EIPNoPkexecAvailable(Warning): message = "No pkexec binary found" - usermessage = ("We could not find pkexec in your " - "system.
Do you want to try " - "setuid workaround? " - "(DOES NOTHING YET)") + usermessage = translate( + "EIPErrors", + "We could not find pkexec in your " + "system.
Do you want to try " + "setuid workaround? " + "(DOES NOTHING YET)") failfirst = True class EIPNoCommandError(EIPClientError): message = "no suitable openvpn command found" - usermessage = ("No suitable openvpn command found. " - "
(Might be a permissions problem)") + usermessage = translate( + "EIPErrors", + "No suitable openvpn command found. " + "
(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): -- cgit v1.2.3