From 8d3db9f897fc531e387d122dcf0288f161d6ca4c Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Mon, 9 May 2016 23:09:07 +0300 Subject: [PATCH] menu ui fixes and translations update --- src/mainscreen.py | 5 +- src/menu.py | 26 ++++--- src/profile.py | 5 ++ src/translations/en_GB.qm | Bin 5318 -> 5733 bytes src/translations/en_GB.ts | 149 +++++++++++++++++++++----------------- src/translations/fr_FR.ts | 145 +++++++++++++++++++++---------------- src/translations/ru_RU.qm | Bin 7605 -> 7948 bytes src/translations/ru_RU.ts | 148 ++++++++++++++++++++----------------- 8 files changed, 273 insertions(+), 205 deletions(-) diff --git a/src/mainscreen.py b/src/mainscreen.py index 1df35b5..f3d3095 100644 --- a/src/mainscreen.py +++ b/src/mainscreen.py @@ -168,7 +168,7 @@ class MainWindow(QtGui.QMainWindow): self.online_contacts.setObjectName("online_contacts") self.online_contacts.clicked.connect(self.filtering) self.contact_name = QtGui.QLineEdit(Form) - self.contact_name.setGeometry(QtCore.QRect(0, 24, 270, 25)) + self.contact_name.setGeometry(QtCore.QRect(0, 23, 270, 26)) self.contact_name.setObjectName("contact_name") self.contact_name.textChanged.connect(self.filtering) QtCore.QMetaObject.connectSlotsByName(Form) @@ -340,7 +340,8 @@ class MainWindow(QtGui.QMainWindow): import util msgBox = QtGui.QMessageBox() msgBox.setWindowTitle(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8)) - msgBox.setText(QtGui.QApplication.translate("MainWindow", 'Toxygen is Tox client written on Python 2.7. Version: ', None, QtGui.QApplication.UnicodeUTF8) + util.program_version) + text = (QtGui.QApplication.translate("MainWindow", 'Toxygen is Tox client written on Python.\nVersion: ', None, QtGui.QApplication.UnicodeUTF8)) + msgBox.setText(text + util.program_version + '\nGitHub: github.com/xveduk/toxygen') msgBox.exec_() def network_settings(self): diff --git a/src/menu.py b/src/menu.py index 2140bf0..02c6c16 100644 --- a/src/menu.py +++ b/src/menu.py @@ -38,12 +38,17 @@ class AddContact(CenteredWidget): self.message_edit = QtGui.QTextEdit(self) self.message_edit.setGeometry(QtCore.QRect(50, 110, 471, 151)) self.message_edit.setObjectName("textEdit") - self.label_2 = QtGui.QLabel(self) - self.label_2.setGeometry(QtCore.QRect(60, 70, 101, 31)) - self.label_2.setFont(font) - self.label_2.setObjectName("label_2") + self.message = QtGui.QLabel(self) + self.message.setGeometry(QtCore.QRect(60, 70, 101, 31)) + self.message.setFont(font) + self.message.setObjectName("label_2") self.retranslateUi() self.message_edit.setText('Hello! Add me to your contact list please') + font = QtGui.QFont() + font.setPointSize(12) + font.setBold(True) + self.label.setFont(font) + self.message.setFont(font) QtCore.QMetaObject.connectSlotsByName(self) def add_friend(self): @@ -59,7 +64,7 @@ class AddContact(CenteredWidget): self.setWindowTitle(QtGui.QApplication.translate('AddContact', "Add contact", None, QtGui.QApplication.UnicodeUTF8)) self.sendRequestButton.setText(QtGui.QApplication.translate("Form", "Send request", None, QtGui.QApplication.UnicodeUTF8)) self.label.setText(QtGui.QApplication.translate('AddContact', "TOX ID:", None, QtGui.QApplication.UnicodeUTF8)) - self.label_2.setText(QtGui.QApplication.translate('AddContact', "Message:", None, QtGui.QApplication.UnicodeUTF8)) + self.message.setText(QtGui.QApplication.translate('AddContact', "Message:", None, QtGui.QApplication.UnicodeUTF8)) class ProfileSettings(CenteredWidget): @@ -82,7 +87,7 @@ class ProfileSettings(CenteredWidget): self.status.setObjectName("status") self.status.setText(profile.status_message) self.label = QtGui.QLabel(self) - self.label.setGeometry(QtCore.QRect(40, 30, 91, 21)) + self.label.setGeometry(QtCore.QRect(40, 30, 91, 25)) font = QtGui.QFont() font.setPointSize(18) font.setWeight(75) @@ -90,11 +95,11 @@ class ProfileSettings(CenteredWidget): self.label.setFont(font) self.label.setObjectName("label") self.label_2 = QtGui.QLabel(self) - self.label_2.setGeometry(QtCore.QRect(40, 100, 100, 21)) + self.label_2.setGeometry(QtCore.QRect(40, 100, 100, 25)) self.label_2.setFont(font) self.label_2.setObjectName("label_2") self.label_3 = QtGui.QLabel(self) - self.label_3.setGeometry(QtCore.QRect(40, 180, 100, 21)) + self.label_3.setGeometry(QtCore.QRect(40, 180, 100, 25)) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.tox_id = QtGui.QLabel(self) @@ -139,6 +144,10 @@ class ProfileSettings(CenteredWidget): clipboard = QtGui.QApplication.clipboard() profile = Profile.get_instance() clipboard.setText(profile.tox_id) + pixmap = QtGui.QPixmap(curr_directory() + '/images/accept.png') + icon = QtGui.QIcon(pixmap) + self.copyId.setIcon(icon) + self.copyId.setIconSize(QtCore.QSize(10, 10)) def new_no_spam(self): self.tox_id.setText(Profile.get_instance().new_nospam()) @@ -148,7 +157,6 @@ class ProfileSettings(CenteredWidget): def set_avatar(self): name = QtGui.QFileDialog.getOpenFileName(self, 'Open file', None, 'Image Files (*.png)') - print name if name[0]: with open(name[0], 'rb') as f: data = f.read() diff --git a/src/profile.py b/src/profile.py index 2283c56..f9a0290 100644 --- a/src/profile.py +++ b/src/profile.py @@ -805,6 +805,11 @@ class Profile(Contact, Singleton): raise Exception('TOX DNS lookup failed') if len(tox_id) == TOX_PUBLIC_KEY_SIZE * 2: # public key self.add_friend(tox_id) + msgBox = QtGui.QMessageBox() + msgBox.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Friend added", None, QtGui.QApplication.UnicodeUTF8)) + text = (QtGui.QApplication.translate("MainWindow", 'Friend added without sending friend request', None, QtGui.QApplication.UnicodeUTF8)) + msgBox.setText(text) + msgBox.exec_() else: result = self._tox.friend_add(tox_id, message.encode('utf-8')) tox_id = tox_id[:TOX_PUBLIC_KEY_SIZE * 2] diff --git a/src/translations/en_GB.qm b/src/translations/en_GB.qm index 66a5e1069a7dc8af40ece24c1a516789c56f9f8a..f671d8851f66589c513db7a18f34341fcbf37391 100644 GIT binary patch delta 1084 zcmZ{hdu&r>7{;H|o=eZy)0MGBaUtvgCWMU)B%)X#GZ-ck)?ik;KosqE+U_LML)MNC zZ&l}r#Xnp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EP`F|7J;H<0x zOaihB%GqxhvOGVCC(xB%0tEd+AV~+bVnOgt11`NtD1OxnSO$cLS`H%J8?ljN03We*z3yCAt=oC9q6(#5Lh z#8#>K?iJRZQsBcVAls$SD>TM}yg2?ITrfn-37%OdCglyeYXHMG`DP~_m}BMcuQg&x;unI?27iCJT*pH6dXhWsmhi_12>hY_4H63qx>tbQA>FnB2I*U*ZIrSVAP?H@gT;)48&D%>sx7GBF z7@pwJe>DA6``fEIAWnUneTELBwIu>iK&k&w+^Ox3kZGVvJD=>QuyU=r-9e#!+LMMZ z4mO$#X9l>r4s%^x9u?Wf^u*9hOw7?YCj{8|vffnarXaU|?Jyf)y?$RPp|eQ6w<3vS z!u9cabSyh9_L^I~X`974{ftgqERFdiG~~9<_i|%$pEc(69U9u?J|!-+>EpJU{4b AddContact - + Add contact Add contact - + TOX ID: TOX ID: - + Message: Message: @@ -22,32 +22,32 @@ Form - + Send request Send request - + IPv6 IPv6 - + UDP UDP - + Proxy Proxy - + IP: IP: - + Port: Port: @@ -57,7 +57,7 @@ Online contacts - + HTTP HTTP @@ -75,7 +75,7 @@ - + About @@ -110,58 +110,53 @@ - + User {} wants to add you to contact list. Message: {} - + Friend request - - Toxygen is Tox client written on Python 2.7. Version: - - - - + Choose file Choose file - + Disallow auto accept - + Allow auto accept - + Set alias - + Clear history - + Copy public key - + 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: @@ -175,16 +170,33 @@ Find contact 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 + NetworkSettings - + Network settings Network settings - + Restart TOX core Restart Tox core @@ -192,60 +204,65 @@ ProfileSettingsForm - + Export profile - + Profile settings - + Name: - + Status: - + TOX ID: - + Copy TOX ID - + New avatar - + Reset avatar + + + New NoSpam + New NoSpam + audioSettingsForm - + Audio settings Audio settings - + Input device: Input device: - + Output device: Output device: @@ -253,12 +270,12 @@ incoming_call - + Incoming video call Incoming video call - + Incoming audio call Incoming audio call @@ -266,17 +283,17 @@ interfaceForm - + Interface settings - + Theme: - + Language: @@ -324,7 +341,7 @@ - + Looks like other instance of Toxygen uses this profile! Continue? @@ -332,22 +349,22 @@ notificationsForm - + Notification settings - + Enable notifications - + Enable call's sound - + Enable sound notifications @@ -355,77 +372,77 @@ privacySettings - + Privacy settings - + Save chat history - + Allow file auto accept - + Send typing notifications - + Auto accept default path: - + Change - + Allow inlines - + Chat history - + History will be cleaned! Continue? - + Blocked users: Blocked users: - + Unblock Unblock - + Block user Block user - + Add to friend list Add to friend list - + Do you want to add this user to friend list? Do you want to add this user to friend list? - + Block by TOX ID: Block by TOX ID: @@ -433,12 +450,12 @@ tray - + Open Toxygen - + Exit diff --git a/src/translations/fr_FR.ts b/src/translations/fr_FR.ts index ead4d23..20f3798 100644 --- a/src/translations/fr_FR.ts +++ b/src/translations/fr_FR.ts @@ -3,17 +3,17 @@ AddContact - + Add contact Rajouter un contact - + TOX ID: ID TOX : - + Message: Message : @@ -21,32 +21,32 @@ Form - + Send request Envoyer une demande - + IPv6 IPv6 - + UDP UDP - + Proxy Proxy - + IP: IP : - + Port: Port : @@ -56,7 +56,7 @@ Contacts connectés - + HTTP @@ -74,7 +74,7 @@ Paramêtres - + About À Propos @@ -109,58 +109,58 @@ À 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 Toxygen is Tox client written on Python 2.7. Version: - Toxygen est un client Tox écris en Python 2.7. Version : + 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 - + Copy public key Copier la clé publique - + Remove friend Retirer un ami - + Enter new alias for friend {} or leave empty to use friend's name: @@ -174,16 +174,32 @@ Find contact + + + Friend added + + + + + Toxygen is Tox client written on Python. +Version: + + + + + Friend added without sending friend request + + NetworkSettings - + Network settings Paramêtres réseaux - + Restart TOX core @@ -191,60 +207,65 @@ ProfileSettingsForm - + Export profile Exporter le profile - + Profile settings Paramêtres du profil - + Name: Nom : - + Status: Status : - + TOX ID: ID TOX : - + Copy TOX ID Copier l'ID TOX - + New avatar Nouvel avatar - + Reset avatar Réinitialiser l'avatar + + + New NoSpam + + audioSettingsForm - + Audio settings - + Input device: - + Output device: @@ -252,12 +273,12 @@ incoming_call - + Incoming video call - + Incoming audio call @@ -265,17 +286,17 @@ interfaceForm - + Interface settings Paramêtres de l'interface - + Theme: Thème : - + Language: Langue : @@ -323,7 +344,7 @@ toxygen - + Looks like other instance of Toxygen uses this profile! Continue? Il semble qu'une autre instance de Toxygen utilise ce profil ! Continuer ? @@ -331,22 +352,22 @@ notificationsForm - + Notification settings Paramêtres de notification - + Enable notifications Activer les notifications - + Enable call's sound Activer les sons d'appel - + Enable sound notifications Activer les sons de notifications @@ -354,77 +375,77 @@ privacySettings - + Privacy settings Paramêtres de confidentialité - + Save chat history Sauvegarder l'historique du chat - + Allow file auto accept Autoriser les fichier automatiquement - + Send typing notifications Notifier la frappe - + Auto accept default path: Chemin d'accès des fichiers acceptés automatiquement : - + Change Modifier - + Allow inlines - + Chat history - + History will be cleaned! Continue? - + Blocked users: - + Unblock - + Block user - + Add to friend list - + Do you want to add this user to friend list? - + Block by TOX ID: @@ -432,12 +453,12 @@ tray - + Open Toxygen Ouvrir Toxygen - + Exit Quitter diff --git a/src/translations/ru_RU.qm b/src/translations/ru_RU.qm index 1328ccec2c9dd8edc4025cda399266cb36a444ac..2e9dd4063da711a400743776ffe4a627425f93a6 100644 GIT binary patch delta 930 zcmZ`%Ye-aS7=F%~@660Ob7sbLx@bmIZUhG2%Cxbx40la!*s?9^hh~ja)5U4MbS0*+ zBBe+=YF3nX1Em`=1)JR#+%70>!B*QAi50Za7C{zEhSg(1^rs((_xs-4_gv1oj2)SE zu22i$^#JGw=GOtT3~@^U!|y@-!#mDH{M!gffI5Xe!}}4JFq3^nnDBvpmWBAK@ekgA zKyLd-z_bE$s%rtg9rFU~Ikz118s9M*xSCf1#7sliWF3f5Bq`hngrbV2^806j!Dpn) zS{z`nmYZ@oI5c0rGWQK&E|!09{{$V9)p0NLssZ*~9q7I6{ zmAC9G6ss>C0JN>bxVH}&W)}yy++|!RT7Nsn`WVsm>>*&4#D9qzLWsDmj7m9Ax~ZlYqErD(xoDlo=U?WzQZ47Joxg`L*D z8Bt_bW^I1m!^J05Q&9sS@~c^%90J^@<~DT#ic`&-8Bc4reu<71>dlKal(t#@Yr$?R zcU&7S(GqI#Im#_sakN6_ZQ8bp1a3a6?ayi_!1r3~#gK=GMD50&tMu}^E!h7jrR=uV zClTSWu$~^(OhuOIGg7^bY{|c9>`>hX(GvpRMSR|`*yc` zO`vjVu&UBs!RG>HOWb}VUmX=z)B;)BZp^k-8Mkb)Qi}1yHdap1!qIxY?1mRX6k-)h bu<|Qn&0D(0?F|;LDp_fG9V5amj=|1PlHKKQ delta 704 zcmXAmTS!z<6o&tEn=|LQ&m0{mO*5Oa3mAzi&2teb zasrqGj(7o{hxkGS;=3Wfryipazxn_UPF5bG3&9^L}<1u?wv5s)E%OHrx!Nb6Ha;ejwGrTJEXC_&m=u?rBBrTddapbtx- z>_w_c(%fVf5ha+8wvqw!X47dW-CLqe?IA0jFUjgJ(rLBwx~NFHzatl92t*o|%StPW ze3RT}YbL;1+541|kdMnGg zlCI AddContact - + Add contact Добавить контакт - + TOX ID: TOX ID: - + Message: Сообщение: @@ -22,32 +22,32 @@ Form - + Send request Отправить запрос - + IPv6 IPv6 - + UDP UDP - + Proxy Прокси - + IP: IP: - + Port: Порт: @@ -57,7 +57,7 @@ Контакты в сети - + HTTP HTTP @@ -75,7 +75,7 @@ Настройки - + About О программе @@ -110,59 +110,54 @@ О программе - + User {} wants to add you to contact list. Message: {} Пользователь {} хочет добавить Вас в список контактов. Сообщение: {} - + Friend request Запрос на добавление в друзья - - Toxygen is Tox client written on Python 2.7. Version: - Toxygen - клиент для мессенджера Tox, написанный на Python 2.7. Версия: - - - + Choose file Выберите файл - + Disallow auto accept Запретить автоматическое получение файлов - + Allow auto accept Разрешить автоматическое получение файлов - + Set alias Изменить псевдоним - + Clear history Очистить историю - + Copy public key Копировать публичный ключ - + Remove friend Удалить друга - + Enter new alias for friend {} or leave empty to use friend's name: Введите новый псевдоним для друга {} или оставьте пустым для использования его имени: @@ -176,16 +171,32 @@ Find contact Найти контакт + + + Friend added + Друг добавлен + + + + Toxygen is Tox client written on Python. +Version: + Toxygen - клиент для мессенджера Tox, написанный на Python. Версия: + + + + Friend added without sending friend request + Друг добавлен без отправки запроса на добавление в друзья + NetworkSettings - + Network settings Настройки сети - + Restart TOX core Перезапустить ядро TOX @@ -193,32 +204,32 @@ ProfileSettingsForm - + Export profile Экспорт профиля - + Profile settings Настройки профиля - + Name: Имя: - + Status: Статус: - + TOX ID: TOX ID: - + Copy TOX ID Копировать TOX ID @@ -228,30 +239,35 @@ Язык: - + New avatar Новый аватар - + Reset avatar Сбросить аватар + + + New NoSpam + Новый NoSpam + audioSettingsForm - + Audio settings Настройки аудио - + Input device: Устройство ввода: - + Output device: Устройство вывода: @@ -259,12 +275,12 @@ incoming_call - + Incoming video call Входящий видеозвонок - + Incoming audio call Входящий аудиозвонок @@ -272,17 +288,17 @@ interfaceForm - + Interface settings Настройки интерфейса - + Theme: Тема: - + Language: Язык: @@ -330,7 +346,7 @@ toxygen - + Looks like other instance of Toxygen uses this profile! Continue? Похоже, что этот профиль используется другим экземпляром Toxygen! Продолжить? @@ -338,22 +354,22 @@ notificationsForm - + Notification settings Настройки уведомлений - + Enable notifications Включить уведомления - + Enable call's sound Включить звук звонка - + Enable sound notifications Включить звуковые уведомления @@ -362,77 +378,77 @@ privacySettings - + Privacy settings Настройки приватности - + Save chat history Сохранять историю переписки - + Allow file auto accept Разрешить автополучение файлов - + Send typing notifications Посылать уведомления о наборе текста - + Auto accept default path: Путь автоприема файлов: - + Change Изменить - + Allow inlines Разрешать инлайны - + Chat history История чата - + History will be cleaned! Continue? История переписки будет очищена! Продолжить? - + Blocked users: Заблокированные пользователи: - + Unblock Разблокировать - + Block user Заблокировать пользователя - + Add to friend list Добавить в список друзей - + Do you want to add this user to friend list? Добавить этого пользователя в список друзей? - + Block by TOX ID: Блокировать по TOX ID: @@ -440,12 +456,12 @@ tray - + Open Toxygen Открыть Toxygen - + Exit Выход