@@ -397,28 +397,28 @@ class AddAccountDialog(base_class, ui_class, metaclass=QSingleton):
...
@@ -397,28 +397,28 @@ class AddAccountDialog(base_class, ui_class, metaclass=QSingleton):
red='#cc0000'
red='#cc0000'
# validate the add panel
# validate the add panel
ifnotself.display_name_editor.text_valid:
ifnotself.display_name_editor.text_valid:
self.add_status_label.value=Status("Display name cannot be empty",color=red)
self.add_status_label.value=Status(translate('add_account_dialog',"Display name cannot be empty"),color=red)
elifnotself.sip_address_editor.text_correct:
elifnotself.sip_address_editor.text_correct:
self.add_status_label.value=Status("SIP address should be specified as user@domain",color=red)
self.add_status_label.value=Status(translate('add_account_dialog',"SIP address should be specified as user@domain"),color=red)
elifnotself.sip_address_editor.text_allowed:
elifnotself.sip_address_editor.text_allowed:
self.add_status_label.value=Status("An account with this SIP address was already added",color=red)
self.add_status_label.value=Status(translate('add_account_dialog',"An account with this SIP address was already added"),color=red)
elifnotself.password_editor.text_valid:
elifnotself.password_editor.text_valid:
self.add_status_label.value=Status("Password cannot be empty",color=red)
self.add_status_label.value=Status(translate('add_account_dialog',"Password cannot be empty"),color=red)
else:
else:
self.add_status_label.value=None
self.add_status_label.value=None
# validate the create panel
# validate the create panel
ifnotself.name_editor.text_valid:
ifnotself.name_editor.text_valid:
self.create_status_label.value=Status("Name cannot be empty",color=red)
self.create_status_label.value=Status(translate('add_account_dialog',"Name cannot be empty"),color=red)
elifnotself.username_editor.text_correct:
elifnotself.username_editor.text_correct:
self.create_status_label.value=Status("Username should have 5 to 32 characters, start with a letter or non-zero digit, contain only letters, digits or .-_ and end with a letter or digit",color=red)
self.create_status_label.value=Status(translate('add_account_dialog',"Username should have 5 to 32 characters, start with a letter or non-zero digit, contain only letters, digits or .-_ and end with a letter or digit"),color=red)
elifnotself.username_editor.text_allowed:
elifnotself.username_editor.text_allowed:
self.create_status_label.value=Status("The username you requested is already taken. Please choose another one and try again.",color=red)
self.create_status_label.value=Status(translate('add_account_dialog',"The username you requested is already taken. Please choose another one and try again."),color=red)
elifnotself.new_password_editor.text_valid:
elifnotself.new_password_editor.text_valid:
self.create_status_label.value=Status("Password should contain at least 8 characters",color=red)
self.create_status_label.value=Status(translate('add_account_dialog',"Password should contain at least 8 characters"),color=red)
elifnotself.verify_password_editor.text_valid:
elifnotself.verify_password_editor.text_valid:
self.create_status_label.value=Status("Passwords do not match",color=red)
self.create_status_label.value=Status(translate('add_account_dialog',"Passwords do not match"),color=red)
elifnotself.email_address_editor.text_valid:
elifnotself.email_address_editor.text_valid:
self.create_status_label.value=Status("E-mail address should be specified as user@domain",color=red)
self.create_status_label.value=Status(translate('add_account_dialog',"E-mail address should be specified as user@domain"),color=red)
else:
else:
self.create_status_label.value=None
self.create_status_label.value=None
# enable the accept button if everything is valid in the current panel
# enable the accept button if everything is valid in the current panel
...
@@ -488,9 +488,9 @@ class AddAccountDialog(base_class, ui_class, metaclass=QSingleton):
...
@@ -488,9 +488,9 @@ class AddAccountDialog(base_class, ui_class, metaclass=QSingleton):
self.add_message(ChatStatus('Error sending message: %s'%e))# decide what type to use here. -Dan
self.add_message(ChatStatus(translate('chat_window','Error sending message: %s')%e))# decide what type to use here. -Dan
else:
else:
ifmsg_idisnotNone:
ifmsg_idisnotNone:
id=msg_id
id=msg_id
...
@@ -996,7 +996,7 @@ class ChatWidget(base_class, ui_class):
...
@@ -996,7 +996,7 @@ class ChatWidget(base_class, ui_class):
def_SH_OTRTimerTimeout(self):
def_SH_OTRTimerTimeout(self):
self.otr_timer.stop()
self.otr_timer.stop()
self.add_message(ChatStatus('Timeout in enabling OTR, recipient did not answer to OTR encryption request'))# decide what type to use here. -Dan
self.add_message(ChatStatus(translate('chat_window','Timeout in enabling OTR, recipient did not answer to OTR encryption request')))# decide what type to use here. -Dan
self.audio_encryption_label.setToolTip('Media is encrypted using %s (%s)'%(audio_info.encryption,audio_info.encryption_cipher))
self.audio_encryption_label.setToolTip(translate('chat_window',"Media is encrypted using %s (%s)")%(audio_info.encryption,audio_info.encryption_cipher))
else:
else:
self.audio_encryption_label.setToolTip('Media is not encrypted')
self.audio_encryption_label.setToolTip(translate('chat_window',"Media is not encrypted"))
self.video_encryption_label.setToolTip('Media is encrypted using %s (%s)'%(video_info.encryption,video_info.encryption_cipher))
self.video_encryption_label.setToolTip(translate('chat_window',"Media is encrypted using %s (%s)")%(video_info.encryption,video_info.encryption_cipher))
else:
else:
self.video_encryption_label.setToolTip('Media is not encrypted')
self.video_encryption_label.setToolTip(translate('chat_window',"Media is not encrypted"))
self.chat_encryption_label.setToolTip('Media is encrypted using TLS and {0.encryption} ({0.encryption_cipher})'.format(chat_info))
self.chat_encryption_label.setToolTip(translate('chat_window',"Media is encrypted using TLS and {0.encryption} ({0.encryption_cipher})").format(chat_info))
elifchat_info.encryptionisnotNone:
elifchat_info.encryptionisnotNone:
self.chat_encryption_label.setToolTip('Media is encrypted using {0.encryption} ({0.encryption_cipher})'.format(chat_info))
self.chat_encryption_label.setToolTip(translate('chat_window',"Media is encrypted using {0.encryption} ({0.encryption_cipher})").format(chat_info))
elifchat_info.transport=='tls':
elifchat_info.transport=='tls':
self.chat_encryption_label.setToolTip('Media is encrypted using TLS')
self.chat_encryption_label.setToolTip(translate('chat_window',"Media is encrypted using TLS"))
else:
else:
self.chat_encryption_label.setToolTip('Media is not encrypted')
self.chat_encryption_label.setToolTip(translate('chat_window',"Media is not encrypted"))
ifmessages_info.encryptionisnotNone:
ifmessages_info.encryptionisnotNone:
ifmessages_info.encryption=='OpenPGP':
ifmessages_info.encryption=='OpenPGP':
self.chat_encryption_label.setToolTip('Media is encrypted using {0.encryption}'.format(messages_info))
self.chat_encryption_label.setToolTip(translate('chat_window',"Media is encrypted using {0.encryption}").format(messages_info))
else:
else:
self.chat_encryption_label.setToolTip('Media is encrypted using {0.encryption} ({0.encryption_cipher})'.format(messages_info))
self.chat_encryption_label.setToolTip(translate('chat_window',"Media is encrypted using {0.encryption} ({0.encryption_cipher})").format(messages_info))
self._update_chat_encryption_icon()
self._update_chat_encryption_icon()
...
@@ -2095,20 +2095,20 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -2095,20 +2095,20 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
self.screen_sharing_button.addAction(QAction('Share my screen',self.screen_sharing_button,triggered=self._AH_ShareMyScreenActionTriggered))
self.screen_sharing_button.addAction(QAction(translate('main_window','Share my screen'),self.screen_sharing_button,triggered=self._AH_ShareMyScreenActionTriggered))
# adjust search box height depending on theme as the value set in designer isn't suited for all themes
# adjust search box height depending on theme as the value set in designer isn't suited for all themes
search_box=self.search_box
search_box=self.search_box
...
@@ -270,7 +270,7 @@ class MainWindow(base_class, ui_class):
...
@@ -270,7 +270,7 @@ class MainWindow(base_class, ui_class):
self.active_sessions_label.setText('There is 1 active call'iflen(active_sessions)==1else'There are %d active calls'%len(active_sessions))
self.active_sessions_label.setText(translate('main_window','There is 1 active call')iflen(active_sessions)==1elsetranslate('main_window','There are %d active calls')%len(active_sessions))
self.audio_output_device_button.setItemData(1,Separator)# prevent the separator from being selected (must have different itemData than the None device)
self.audio_output_device_button.setItemData(1,Separator)# prevent the separator from being selected (must have different itemData than the None device)
@@ -1498,9 +1498,9 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
...
@@ -1498,9 +1498,9 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
X509Certificate(contents)
X509Certificate(contents)
X509PrivateKey(contents)
X509PrivateKey(contents)
except(OSError,IOError)ase:
except(OSError,IOError)ase:
QMessageBox.critical(self,"TLS Certificate Error","The certificate file could not be opened: %s"%e.strerror)
QMessageBox.critical(self,translate('preferences_window',"TLS Certificate Error"),translate('preferences_window',"The certificate file could not be opened: %s")%e.strerror)
exceptGNUTLSErrorase:
exceptGNUTLSErrorase:
QMessageBox.critical(self,"TLS Certificate Error","The certificate file is invalid: %s"%e)
QMessageBox.critical(self,translate('preferences_window',"TLS Certificate Error"),translate('preferences_window',"The certificate file is invalid: %s")%e)
else:
else:
self.tls_cert_file_editor.setText(cert_path)
self.tls_cert_file_editor.setText(cert_path)
settings.tls.certificate=cert_path
settings.tls.certificate=cert_path
...
@@ -1619,16 +1619,16 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
...
@@ -1619,16 +1619,16 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
@@ -1909,9 +1909,9 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
...
@@ -1909,9 +1909,9 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
try:
try:
X509Certificate(open(ca_path).read())
X509Certificate(open(ca_path).read())
except(OSError,IOError)ase:
except(OSError,IOError)ase:
QMessageBox.critical(self,"TLS Certificate Error","The certificate authority file could not be opened: %s"%e.strerror)
QMessageBox.critical(self,translate('preferences_window',"TLS Certificate Error"),translate('preferences_window',"The certificate authority file could not be opened: %s")%e.strerror)
exceptGNUTLSErrorase:
exceptGNUTLSErrorase:
QMessageBox.critical(self,"TLS Certificate Error","The certificate authority file is invalid: %s"%e)
QMessageBox.critical(self,translate('preferences_window',"TLS Certificate Error"),translate('preferences_window',"The certificate authority file is invalid: %s")%e)
else:
else:
self.tls_ca_file_editor.setText(ca_path)
self.tls_ca_file_editor.setText(ca_path)
settings.tls.ca_list=ca_path
settings.tls.ca_list=ca_path
...
@@ -1928,8 +1928,8 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
...
@@ -1928,8 +1928,8 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
question="The application language was changed. A restart is required to apply the change. Would you like to restart now?"
question=translate('preferences_window',"The application language was changed. A restart is required to apply the change. Would you like to restart now?")
self.dialog.transfer_label.setText('transfer requested by {}'.format(blink_session.contact.nameorblink_session.contact_uri.uri))
self.dialog.transfer_label.setText(translate('incoming_calltransfer_dialog','transfer requested by {}').format(blink_session.contact.nameorblink_session.contact_uri.uri))
@@ -259,8 +261,8 @@ class SwitchViewButton(QPushButton):
...
@@ -259,8 +261,8 @@ class SwitchViewButton(QPushButton):
viewChanged=pyqtSignal(int)
viewChanged=pyqtSignal(int)
button_text={ContactView:'Switch to Calls',SessionView:'Switch to Contacts'}
button_text={ContactView:QT_TRANSLATE_NOOP('switch_view_button','Switch to Calls'),SessionView:QT_TRANSLATE_NOOP('switch_view_button','Switch to Contacts')}
button_dnd_text={ContactView:'Drag here to add to a conference',SessionView:'Drag here to go back to contacts'}
button_dnd_text={ContactView:QT_TRANSLATE_NOOP('switch_view_button','Drag here to add to a conference'),SessionView:QT_TRANSLATE_NOOP('switch_view_button','Drag here to go back to contacts')}
dnd_style_sheet1="""
dnd_style_sheet1="""
QPushButton {
QPushButton {
...
@@ -307,7 +309,7 @@ class SwitchViewButton(QPushButton):
...
@@ -307,7 +309,7 @@ class SwitchViewButton(QPushButton):