diff --git a/toxygen/mainscreen.py b/toxygen/mainscreen.py index c9bee9a..92733fd 100644 --- a/toxygen/mainscreen.py +++ b/toxygen/mainscreen.py @@ -596,6 +596,7 @@ class MainWindow(QtGui.QMainWindow, Singleton): auto_accept_item = self.listMenu.addAction(auto) remove_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Remove friend', None, QtGui.QApplication.UnicodeUTF8)) + block_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Block friend', None, QtGui.QApplication.UnicodeUTF8)) notes_item = self.listMenu.addAction(QtGui.QApplication.translate("MainWindow", 'Notes', None, QtGui.QApplication.UnicodeUTF8)) submenu = plugin_support.PluginLoader.get_instance().get_menu(self.listMenu, num) @@ -604,6 +605,7 @@ class MainWindow(QtGui.QMainWindow, Singleton): plug.addActions(submenu) self.connect(set_alias_item, QtCore.SIGNAL("triggered()"), lambda: self.set_alias(num)) self.connect(remove_item, QtCore.SIGNAL("triggered()"), lambda: self.remove_friend(num)) + self.connect(block_item, QtCore.SIGNAL("triggered()"), lambda: self.block_friend(num)) self.connect(copy_key_item, QtCore.SIGNAL("triggered()"), lambda: self.copy_friend_key(num)) self.connect(clear_history_item, QtCore.SIGNAL("triggered()"), lambda: self.clear_history(num)) self.connect(auto_accept_item, QtCore.SIGNAL("triggered()"), lambda: self.auto_accept(num, not allowed)) @@ -652,6 +654,10 @@ class MainWindow(QtGui.QMainWindow, Singleton): def remove_friend(self, num): self.profile.delete_friend(num) + def block_friend(self, num): + friend = self.profile.get_friend(num) + self.profile.block_user(friend.tox_id) + def copy_friend_key(self, num): tox_id = self.profile.friend_public_key(num) clipboard = QtGui.QApplication.clipboard() diff --git a/toxygen/mainscreen_widgets.py b/toxygen/mainscreen_widgets.py index 50cc0a1..967cd4a 100644 --- a/toxygen/mainscreen_widgets.py +++ b/toxygen/mainscreen_widgets.py @@ -516,10 +516,12 @@ class SearchScreen(QtGui.QWidget): @staticmethod def not_found(text): mbox = QtGui.QMessageBox() - mbox.setText(QtGui.QApplication.translate("MainWindow", - 'Text "{}" was not found'.format(text), - None, - QtGui.QApplication.UnicodeUTF8)) + mbox_text = QtGui.QApplication.translate("MainWindow", + 'Text "{}" was not found', + None, + QtGui.QApplication.UnicodeUTF8) + + mbox.setText(mbox_text.format(text)) mbox.setWindowTitle(QtGui.QApplication.translate("MainWindow", 'Not found', None, diff --git a/toxygen/translations/en_GB.ts b/toxygen/translations/en_GB.ts index 1d39618..6036f81 100644 --- a/toxygen/translations/en_GB.ts +++ b/toxygen/translations/en_GB.ts @@ -84,98 +84,98 @@ can produce IP leak MainWindow - + Profile - + Settings - + About - + Add contact - + Privacy - + Interface - + Notifications - + Network - + About program - + User {} wants to add you to contact list. Message: {} - + Friend request - + Choose file Choose file - + Disallow auto accept - + Allow auto accept - + Set alias - + Clear history - + Remove friend - + Enter new alias for friend {} or leave empty to use friend's name: Enter new alias for friend {} or leave empty to use friend's name: - + Audio Audio @@ -185,24 +185,24 @@ can produce IP leak Find contact - + Friend added Friend added - + Toxygen is Tox client written on Python. Version: Toxygen is Tox client written on Python. Version: - + Friend added without sending friend request Friend added without sending friend request - + Choose folder Choose folder @@ -217,47 +217,47 @@ Version: Send file - + Send message Send message - + Start audio call with friend Start audio call with friend - + Plugins - + List of plugins - + Search - + All - + Online - + Notes - + Notes about user @@ -307,42 +307,42 @@ Version: - + User {} is now known as {} - + Delete message - + Lock - + Cannot lock app - + Error. Profile password is not set. - + Name - + Status message - + Public key @@ -367,65 +367,80 @@ Version: - + Import plugin - + Choose folder with plugin - + Restart Toxygen - + Plugin will be loaded after restart - + Quote selected text - + Chat history - + Export as text - + Export as HTML - + Updates - + Online first - + Online and by name - + Online first and by name + + + Block friend + + + + + Not found + + + + + Text "{}" was not found + + MenuWindow @@ -758,30 +773,25 @@ Version: - + Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later. - + Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam. - + Delete single message in chat: make right click on spinner or message time and choose "Delete" in menu - + Use right click on inline image to save it - - - New in Toxygen v0.2.6:<br>Updater<br>Better contact sorting<br>Plugins improvements - - audioSettingsForm @@ -804,32 +814,32 @@ Version: incoming_call - + Incoming video call Incoming video call - + Incoming audio call Incoming audio call - + Outgoing video call - + Outgoing audio call - + Call declined - + Call finished @@ -985,7 +995,7 @@ Version: - + Update for Toxygen was found. Download and install it? @@ -1122,32 +1132,32 @@ Version: tray - + Open Toxygen - + Exit - + Set status - + Online - + Away - + Busy diff --git a/toxygen/translations/fr_FR.ts b/toxygen/translations/fr_FR.ts index 5037b92..0e87b51 100644 --- a/toxygen/translations/fr_FR.ts +++ b/toxygen/translations/fr_FR.ts @@ -84,58 +84,58 @@ can produce IP leak MainWindow - + Profile Profile - + Settings Paramêtres - + About À Propos - + Add contact Rajouter un contact - + Privacy Confidentialité - + Interface Interface - + Notifications Notifications - + Network Réseau - + About program À propos du programme - + User {} wants to add you to contact list. Message: {} L'Utilisateur {} veut vout rajouter à sa liste de contacts. Message : {} - + Friend request Demande d'amis @@ -145,27 +145,27 @@ can produce IP leak Toxygen est un client Tox écris en Python 2.7. Version : - + Choose file Choisir un fichier - + Disallow auto accept Désactiver l'auto-réception - + Allow auto accept Activer l'auto-réception - + Set alias Définir un alias - + Clear history Vider l'historique @@ -175,17 +175,17 @@ can produce IP leak Copier la clé publique - + Remove friend Retirer un ami - + Enter new alias for friend {} or leave empty to use friend's name: Entrez un nouvel alias pour l'ami {} ou laissez vide pour garder son nom de base : - + Audio Audio @@ -195,24 +195,24 @@ can produce IP leak Trouver le contact - + Friend added Ami rajouté - + Toxygen is Tox client written on Python. Version: Toxygen est un client Tox écrit en Python. Version : - + Friend added without sending friend request Ami rajouté sans avoir envoyé de demande - + Choose folder Choisir le dossier @@ -227,47 +227,47 @@ Version : Envoyer le fichier - + Send message Envoyer le message - + Start audio call with friend Lancer un appel audio avec un ami - + Plugins - + List of plugins - + Search - + All - + Online - + Notes - + Notes about user @@ -317,42 +317,42 @@ Version : - + User {} is now known as {} - + Delete message - + Lock - + Cannot lock app - + Error. Profile password is not set. - + Name - + Status message - + Public key @@ -377,65 +377,80 @@ Version : - + Import plugin - + Choose folder with plugin - + Restart Toxygen - + Plugin will be loaded after restart - + Quote selected text - + Chat history Historique de chat - + Export as text - + Export as HTML - + Updates - + Online first - + Online and by name - + Online first and by name + + + Block friend + + + + + Not found + + + + + Text "{}" was not found + + MenuWindow @@ -768,30 +783,25 @@ Version : - + Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later. - + Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam. - + Delete single message in chat: make right click on spinner or message time and choose "Delete" in menu - + Use right click on inline image to save it - - - New in Toxygen v0.2.6:<br>Updater<br>Better contact sorting<br>Plugins improvements - - audioSettingsForm @@ -814,32 +824,32 @@ Version : incoming_call - + Incoming video call Appel vidéo entrant - + Incoming audio call Appel audio entrant - + Outgoing video call - + Outgoing audio call - + Call declined - + Call finished @@ -1000,7 +1010,7 @@ Version : - + Update for Toxygen was found. Download and install it? @@ -1137,32 +1147,32 @@ Version : tray - + Open Toxygen Ouvrir Toxygen - + Exit Quitter - + Set status - + Online - + Away - + Busy diff --git a/toxygen/translations/ru_RU.qm b/toxygen/translations/ru_RU.qm index 55cbd4d..ae4bf08 100644 Binary files a/toxygen/translations/ru_RU.qm and b/toxygen/translations/ru_RU.qm differ diff --git a/toxygen/translations/ru_RU.ts b/toxygen/translations/ru_RU.ts index 2c2f895..edb79d5 100644 --- a/toxygen/translations/ru_RU.ts +++ b/toxygen/translations/ru_RU.ts @@ -87,84 +87,84 @@ can produce IP leak MainWindow - + Profile Профиль - + Settings Настройки - + About О программе - + Add contact Добавить контакт - + Privacy Приватность - + Interface Интерфейс - + Notifications Уведомления - + Network Сеть - + About program О программе - + User {} wants to add you to contact list. Message: {} Пользователь {} хочет добавить Вас в список контактов. Сообщение: {} - + Friend request Запрос на добавление в друзья - + Choose file Выберите файл - + Disallow auto accept Запретить автоматическое получение файлов - + Allow auto accept Разрешить автоматическое получение файлов - + Set alias Изменить псевдоним - + Clear history Очистить историю @@ -174,17 +174,17 @@ can produce IP leak Копировать публичный ключ - + Remove friend Удалить друга - + Enter new alias for friend {} or leave empty to use friend's name: Введите новый псевдоним для друга {} или оставьте пустым для использования его имени: - + Audio Аудио @@ -194,23 +194,23 @@ can produce IP leak Найти контакт - + Friend added Друг добавлен - + Toxygen is Tox client written on Python. Version: Toxygen - клиент для мессенджера Tox, написанный на Python. Версия: - + Friend added without sending friend request Друг добавлен без отправки запроса на добавление в друзья - + Choose folder Выбрать папку @@ -225,47 +225,47 @@ Version: Отправить файл - + Send message Отправить сообщение - + Start audio call with friend Начать аудиозвонок с другом - + Plugins Плагины - + List of plugins Список плагинов - + Search Поиск - + All Все - + Online Онлайн - + Notes Заметки - + Notes about user Заметки о пользователе @@ -315,42 +315,42 @@ Version: Сохранить - + User {} is now known as {} Пользователь {} сейчас известен как {} - + Delete message Удалить сообщение - + Lock Заблокировать - + Cannot lock app Невозможно заблокировать приложение - + Error. Profile password is not set. Ошибка. Пароль профиля не установлен. - + Name Имя - + Status message Статус - + Public key Публичный ключ @@ -375,65 +375,80 @@ Version: Выберите папку с паком смайлов - + Import plugin Импортировать плагин - + Choose folder with plugin Выберите папку с плагином - + Restart Toxygen Перезапустите Toxygen - + Plugin will be loaded after restart Плагин будет загружен после перезапуска - + Quote selected text Цитировать выбранный текст - + Chat history История чата - + Export as text Экспортировать как текст - + Export as HTML Экспортировать как HTML - + Updates Обновления - + Online first Сначала онлайн - + Online and by name Онлайн и по имени - + Online first and by name Сначала онлайн и по имени + + + Block friend + Заблокировать друга + + + + Not found + Не найдено + + + + Text "{}" was not found + Текст "{}" не был найден + MenuWindow @@ -796,12 +811,12 @@ Version: Используйте Настройки -> Интерфейс для настройки интерфейса. - + Toxygen supports faux offline messages and file transfers. Send message or file to offline friend and he will get it later. Toxygen поддерживает псевдооффлайн сообщения и файл трансферы. - + Set new NoSpam to avoid spam friend requests: Profile -> Settings -> Set new NoSpam. Установите новый NoSpam, чтобы избежать спам запросов в друзья: Профиль->Настройки->Новый NoSpam. @@ -811,12 +826,12 @@ Version: Новое в Toxygen 0.2.3:<br>Соответствие TCS<br>Импорт плагинов, смайлов и стикеров<br>Исправления ошибок - + Delete single message in chat: make right click on spinner or message time and choose "Delete" in menu Чтобы удалить отдельное сообщение в чате сделайте правый клик на спиннер или время сообщения и выберите "Удалить" в меню - + Use right click on inline image to save it Правый клик на инлайн изображении позволит сохранить его @@ -828,7 +843,7 @@ Version: New in Toxygen v0.2.6:<br>Updater<br>Better contact sorting<br>Plugins improvements - Новое в Toxygen v0.2.6:<br>Поддержка обновлений<br>Улучшенная сортировка контактов<br>Улучшения в работе плагинов + Новое в Toxygen v0.2.6:<br>Поддержка обновлений<br>Улучшенная сортировка контактов<br>Улучшения в работе плагинов @@ -852,32 +867,32 @@ Version: incoming_call - + Incoming video call Входящий видеозвонок - + Incoming audio call Входящий аудиозвонок - + Outgoing video call Исходящий видеозвонок - + Outgoing audio call Исходящий аудиозвонок - + Call declined Звонок отменен - + Call finished Звонок завершен @@ -1038,7 +1053,7 @@ Version: Ошибка сохранения профиля! Toxygen имеет разрешение на запись в данную папку? - + Update for Toxygen was found. Download and install it? Обновление для Toxygen было найдено. Загрузить и установить его? @@ -1077,7 +1092,7 @@ Version: Password: - Пароль + Пароль: @@ -1176,32 +1191,32 @@ Version: tray - + Open Toxygen Открыть Toxygen - + Exit Выход - + Set status Изменить статус - + Online Онлайн - + Away Нет на месте - + Busy Занят