summaryrefslogtreecommitdiff
path: root/src/leap/gui/firstrun/providerselect.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/gui/firstrun/providerselect.py')
-rw-r--r--src/leap/gui/firstrun/providerselect.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/leap/gui/firstrun/providerselect.py b/src/leap/gui/firstrun/providerselect.py
index fd48f7f9..917b16fd 100644
--- a/src/leap/gui/firstrun/providerselect.py
+++ b/src/leap/gui/firstrun/providerselect.py
@@ -32,7 +32,7 @@ class SelectProviderPage(InlineValidationPage):
self.setTitle(self.tr("Enter Provider"))
self.setSubTitle(self.tr(
"Please enter the domain of the provider you want "
- "to use for your connection.")
+ "to use for your connection")
)
self.setPixmap(
QtGui.QWizard.LogoPixmap,
@@ -64,7 +64,7 @@ class SelectProviderPage(InlineValidationPage):
providerNameLabel.setBuddy(providerNameEdit)
# add regex validator
- providerDomainRe = QtCore.QRegExp(r"^[a-z\d_-.]+$")
+ providerDomainRe = QtCore.QRegExp(r"^[a-z1-9_\-\.]+$")
providerNameEdit.setValidator(
QtGui.QRegExpValidator(providerDomainRe, self))
self.providerNameEdit = providerNameEdit
@@ -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)
@@ -219,7 +219,7 @@ class SelectProviderPage(InlineValidationPage):
return True
logger.debug('checking name resolution')
- yield((self.tr("checking domain name"), 20), namecheck)
+ yield((self.tr("Checking if it is a valid provider"), 20), namecheck)
#########################
# 2) try https connection
@@ -273,7 +273,7 @@ class SelectProviderPage(InlineValidationPage):
return True
logger.debug('checking https connection')
- yield((self.tr("checking https connection"), 40), httpscheck)
+ yield((self.tr("Checking for a secure connection"), 40), httpscheck)
##################################
# 3) try download provider info...
@@ -287,8 +287,6 @@ class SelectProviderPage(InlineValidationPage):
wizard.set_providerconfig(
eipconfigchecker.defaultprovider.config)
except requests.exceptions.SSLError:
- # XXX we should have catched this before.
- # but cert checking is broken.
return self.fail(self.tr(
"Could not get info from provider."))
except requests.exceptions.ConnectionError:
@@ -302,7 +300,7 @@ class SelectProviderPage(InlineValidationPage):
else:
return True
- yield((self.tr("fetching provider info"), 80), fetchinfo)
+ yield((self.tr("Getting info from the provider"), 80), fetchinfo)
# done!
@@ -344,9 +342,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()