--- a/E5Network/E5SslCertificatesDialog.py Sun Mar 30 22:00:14 2014 +0200 +++ b/E5Network/E5SslCertificatesDialog.py Thu Apr 03 23:05:31 2014 +0200 @@ -96,9 +96,9 @@ commonName = Utilities.decodeString( cert.subjectInfo(QSslCertificate.CommonName)) if organisation is None or organisation == "": - organisation = self.trUtf8("(Unknown)") + organisation = self.tr("(Unknown)") if commonName is None or commonName == "": - commonName = self.trUtf8("(Unknown common name)") + commonName = self.tr("(Unknown common name)") expiryDate = cert.expiryDate().toString("yyyy-MM-dd") # step 2: create the entry @@ -152,13 +152,13 @@ itm = self.serversCertificatesTree.currentItem() res = E5MessageBox.yesNo( self, - self.trUtf8("Delete Server Certificate"), - self.trUtf8("""<p>Shall the server certificate really be""" - """ deleted?</p><p>{0}</p>""" - """<p>If the server certificate is deleted, the""" - """ normal security checks will be reinstantiated""" - """ and the server has to present a valid""" - """ certificate.</p>""") + self.tr("Delete Server Certificate"), + self.tr("""<p>Shall the server certificate really be""" + """ deleted?</p><p>{0}</p>""" + """<p>If the server certificate is deleted, the""" + """ normal security checks will be reinstantiated""" + """ and the server has to present a valid""" + """ certificate.</p>""") .format(itm.text(0))) if res: server = itm.text(1) @@ -220,8 +220,8 @@ QSslCertificate.CommonName) E5MessageBox.warning( self, - self.trUtf8("Import Certificate"), - self.trUtf8( + self.tr("Import Certificate"), + self.tr( """<p>The certificate <b>{0}</b> already exists.""" """ Skipping.</p>""") .format(Utilities.decodeString(commonStr))) @@ -307,9 +307,9 @@ commonName = Utilities.decodeString( cert.subjectInfo(QSslCertificate.CommonName)) if organisation is None or organisation == "": - organisation = self.trUtf8("(Unknown)") + organisation = self.tr("(Unknown)") if commonName is None or commonName == "": - commonName = self.trUtf8("(Unknown common name)") + commonName = self.tr("(Unknown common name)") expiryDate = cert.expiryDate().toString("yyyy-MM-dd") # step 2: create the entry @@ -361,8 +361,8 @@ itm = self.caCertificatesTree.currentItem() res = E5MessageBox.yesNo( self, - self.trUtf8("Delete CA Certificate"), - self.trUtf8( + self.tr("Delete CA Certificate"), + self.tr( """<p>Shall the CA certificate really be deleted?</p>""" """<p>{0}</p>""" """<p>If the CA certificate is deleted, the browser""" @@ -410,8 +410,8 @@ QSslCertificate.CommonName) E5MessageBox.warning( self, - self.trUtf8("Import Certificate"), - self.trUtf8( + self.tr("Import Certificate"), + self.tr( """<p>The certificate <b>{0}</b> already exists.""" """ Skipping.</p>""") .format(Utilities.decodeString(commonStr))) @@ -449,10 +449,10 @@ if cert is not None: fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Export Certificate"), + self.tr("Export Certificate"), name, - self.trUtf8("Certificate File (PEM) (*.pem);;" - "Certificate File (DER) (*.der)"), + self.tr("Certificate File (PEM) (*.pem);;" + "Certificate File (DER) (*.der)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -465,9 +465,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Export Certificate"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Export Certificate"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -476,8 +476,8 @@ if not f.open(QIODevice.WriteOnly): E5MessageBox.critical( self, - self.trUtf8("Export Certificate"), - self.trUtf8( + self.tr("Export Certificate"), + self.tr( """<p>The certificate could not be written""" """ to file <b>{0}</b></p><p>Error: {1}</p>""") .format(fname, f.errorString())) @@ -498,18 +498,18 @@ """ fname = E5FileDialog.getOpenFileName( self, - self.trUtf8("Import Certificate"), + self.tr("Import Certificate"), "", - self.trUtf8("Certificate Files (*.pem *.crt *.der *.cer *.ca);;" - "All Files (*)")) + self.tr("Certificate Files (*.pem *.crt *.der *.cer *.ca);;" + "All Files (*)")) if fname: f = QFile(fname) if not f.open(QIODevice.ReadOnly): E5MessageBox.critical( self, - self.trUtf8("Export Certificate"), - self.trUtf8( + self.tr("Export Certificate"), + self.tr( """<p>The certificate could not be read from file""" """ <b>{0}</b></p><p>Error: {1}</p>""") .format(fname, f.errorString()))