74 """ |
74 """ |
75 Private slot to test the entered service key. |
75 Private slot to test the entered service key. |
76 """ |
76 """ |
77 self.testResultLabel.setHidden(False) |
77 self.testResultLabel.setHidden(False) |
78 self.testResultLabel.setText( |
78 self.testResultLabel.setText( |
79 self.trUtf8("Checking validity of the service key...")) |
79 self.tr("Checking validity of the service key...")) |
80 if self.vtSecureCheckBox.isChecked(): |
80 if self.vtSecureCheckBox.isChecked(): |
81 protocol = "https" |
81 protocol = "https" |
82 else: |
82 else: |
83 protocol = "http" |
83 protocol = "http" |
84 self.__vt.checkServiceKeyValidity( |
84 self.__vt.checkServiceKeyValidity( |
92 @param result flag indicating a successful check (boolean) |
92 @param result flag indicating a successful check (boolean) |
93 @param msg network error message (str) |
93 @param msg network error message (str) |
94 """ |
94 """ |
95 if result: |
95 if result: |
96 self.testResultLabel.setText( |
96 self.testResultLabel.setText( |
97 self.trUtf8("The service key is valid.")) |
97 self.tr("The service key is valid.")) |
98 else: |
98 else: |
99 if msg == "": |
99 if msg == "": |
100 self.testResultLabel.setText(self.trUtf8( |
100 self.testResultLabel.setText(self.tr( |
101 '<font color="#FF0000">The service key is' |
101 '<font color="#FF0000">The service key is' |
102 ' not valid.</font>')) |
102 ' not valid.</font>')) |
103 else: |
103 else: |
104 self.testResultLabel.setText(self.trUtf8( |
104 self.testResultLabel.setText(self.tr( |
105 '<font color="#FF0000"><b>Error:</b> {0}</font>') |
105 '<font color="#FF0000"><b>Error:</b> {0}</font>') |
106 .format(msg)) |
106 .format(msg)) |
107 |
107 |
108 |
108 |
109 def create(dlg): |
109 def create(dlg): |