From 8a502b4082644564f510d8f426c85f17039bd7ae Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Wed, 8 Mar 2017 13:37:19 +0300 Subject: [PATCH] block user option in friend menu and translations update --- toxygen/mainscreen.py | 6 ++ toxygen/mainscreen_widgets.py | 10 ++- toxygen/translations/en_GB.ts | 158 ++++++++++++++++++---------------- toxygen/translations/fr_FR.ts | 158 ++++++++++++++++++---------------- toxygen/translations/ru_RU.qm | Bin 24578 -> 24496 bytes toxygen/translations/ru_RU.ts | 157 ++++++++++++++++++--------------- 6 files changed, 266 insertions(+), 223 deletions(-) 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 55cbd4def9e7ff6b3fa708b2d561b337a9a823b9..ae4bf08a44a0c6c54bb3d8be60441a42d7212aa7 100644 GIT binary pat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+u?H8B3R;SX{CoED*mlPhlXyf2Mej$R7A%~*MF z2WgpMtZMdfNPb~_yM~ynGj=ZB%O*y)@iSE&EqUJ9^CBxw-DvC&9$@cmHQujhkIbnx zY2S-rz+zK`a-2?k)nsetw4FKDC3IcpAmr9sOaIfWBJT=$d zw>+%4!|~KqNgB?2UJM)Ru^A$}D&;=W)nXi?be#{_EO-4av~{Tal6YD;MI8SQSVbJH zC`1jGVi^{p9MxPmzz!SY_)kDGQc;RpIK^;A#PjD6=^{ZS3p=BoVysAea#{-Cr-?+7 z^uPV#B1L3~X(IEG<{3tZ*3j~^$MyZB@+tEqM^ zD05lsYHD4T)r%f~$^T{jqRQ$zYvtl4wKWapi_5EBb)I*efnAHo7l)XPEZ6=d!xWL* Jb*kWk;lC^MCf)!5 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 Занят