summaryrefslogtreecommitdiff
path: root/src/leap/eip/exceptions.py
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 /src/leap/eip/exceptions.py
parent289722fe0eda46c8f5fbbecb84c8a0fbbe36a15f (diff)
parenta5b4b7020daebbcb25c016cf1821818b71a2e457 (diff)
Merge branch 'feature/translation-fixes' into develop
Diffstat (limited to 'src/leap/eip/exceptions.py')
-rw-r--r--src/leap/eip/exceptions.py55
1 files changed, 37 insertions, 18 deletions
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):