changeset 8a94c1a25462 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=8a94c1a25462
description: Update russian translation
diffstat:
po/ru.po | 798 ++++++++++++++++++++++++++++++++------------------------------
1 files changed, 407 insertions(+), 391 deletions(-)
diffs (truncated from 2113 to 300 lines):
diff -r c42677f32401 -r 8a94c1a25462 po/ru.po
--- a/po/ru.po Thu Nov 10 20:39:24 2011 +0100
+++ b/po/ru.po Thu Nov 10 23:19:39 2011 +0300
@@ -12,8 +12,8 @@
msgstr ""
"Project-Id-Version: ru\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-08 00:24+0400\n"
-"PO-Revision-Date: 2011-11-10 21:47+0300\n"
+"POT-Creation-Date: 2011-11-11 00:06+0400\n"
+"PO-Revision-Date: 2011-11-11 00:17+0300\n"
"Last-Translator: Fomin Denis <fominde(a)mail.ru>\n"
"Language-Team: Linux Support LLC\n"
"Language: ru\n"
@@ -126,15 +126,18 @@
#: ../data/gui/account_creation_wizard_window.ui.h:17
#: ../data/gui/accounts_window.ui.h:41
#: ../data/gui/change_mood_dialog.ui.h:3
-#: ../src/config.py:1301
-#: ../src/config.py:1404
-#: ../src/config.py:1715
-#: ../src/config.py:1720
-#: ../src/config.py:2296
-#: ../src/config.py:2375
-#: ../src/config.py:2388
-#: ../src/config.py:3667
-#: ../src/config.py:3742
+#: ../src/config.py:1264
+#: ../src/config.py:1278
+#: ../src/config.py:1283
+#: ../src/config.py:1331
+#: ../src/config.py:1434
+#: ../src/config.py:1745
+#: ../src/config.py:1750
+#: ../src/config.py:2326
+#: ../src/config.py:2405
+#: ../src/config.py:2418
+#: ../src/config.py:3697
+#: ../src/config.py:3772
#: ../src/dialogs.py:311
#: ../src/dialogs.py:313
#: ../src/dialogs.py:519
@@ -317,8 +320,8 @@
#. No configured account
#: ../data/gui/accounts_window.ui.h:26
#: ../data/gui/roster_window.ui.h:5
-#: ../src/common/helpers.py:1148
-#: ../src/common/helpers.py:1160
+#: ../src/common/helpers.py:1159
+#: ../src/common/helpers.py:1171
#: ../src/notify.py:314
#: ../src/notify.py:337
#: ../src/notify.py:387
@@ -374,7 +377,7 @@
#: ../data/gui/accounts_window.ui.h:37
#: ../data/gui/zeroconf_information_window.ui.h:4
-#: ../src/config.py:1838
+#: ../src/config.py:1868
#: ../src/dialogs.py:837
msgid "Jabber ID:"
msgstr "Jabber ID:"
@@ -389,8 +392,8 @@
msgstr "_Объединить учетные записи"
#: ../data/gui/accounts_window.ui.h:40
-#: ../src/config.py:1811
-#: ../src/config.py:2389
+#: ../src/config.py:1841
+#: ../src/config.py:2419
msgid "No key selected"
msgstr "Не выбран ключ"
@@ -481,6 +484,7 @@
msgstr "_Хост: "
#: ../data/gui/accounts_window.ui.h:64
+#: ../data/gui/preferences_window.ui.h:133
msgid "_Manage..."
msgstr "_Управление..."
@@ -510,7 +514,7 @@
msgstr "Добавить новый контакт"
#: ../data/gui/add_new_contact_window.ui.h:4
-#: ../src/common/helpers.py:1339
+#: ../src/common/helpers.py:1350
msgid "I would like to add you to my contact list."
msgstr "Вы не возражаете, если я добавлю Вас в контакт лист?"
@@ -1497,7 +1501,7 @@
msgstr "Комната:"
#: ../data/gui/join_groupchat_window.ui.h:9
-#: ../src/config.py:1828
+#: ../src/config.py:1858
msgid "Server:"
msgstr "Сервер:"
@@ -1847,7 +1851,7 @@
#: ../data/gui/preferences_window.ui.h:46
#: ../src/config.py:170
-#: ../src/config.py:680
+#: ../src/config.py:682
msgid "Disabled"
msgstr "Отключены"
@@ -1892,142 +1896,146 @@
msgstr "Gajim будет уведомлять вас об отсоединившемся контакте с помощью сообщения в правом нижнем углу экрана"
#: ../data/gui/preferences_window.ui.h:58
+msgid "Global proxy:"
+msgstr "Глобальный прокси:"
+
+#: ../data/gui/preferences_window.ui.h:59
msgid "Hide all buttons in chat windows"
msgstr "Не показывать кнопки в окнах чата"
-#: ../data/gui/preferences_window.ui.h:59
+#: ../data/gui/preferences_window.ui.h:60
msgid "If checked, Gajim will allow others to detect the operation system you are using"
msgstr "Если отмечено, то Gajim будет разрешать определять операционную систему, которую вы используете"
-#: ../data/gui/preferences_window.ui.h:60
+#: ../data/gui/preferences_window.ui.h:61
msgid "If checked, Gajim will allow others to detect the time on your system"
msgstr "Если отмечено, то Gajim будет разрешать определять время в системе, которую вы используете"
-#: ../data/gui/preferences_window.ui.h:61
+#: ../data/gui/preferences_window.ui.h:62
msgid "If checked, Gajim will also include information about the sender of the new emails"
msgstr "Если отмечено, то Gajim будет включать информацию об отправителе новых писем."
-#: ../data/gui/preferences_window.ui.h:62
+#: ../data/gui/preferences_window.ui.h:63
msgid "If checked, Gajim will change status to Away when the computer is unused."
msgstr "Если отмечено, то Gajim изменит статус на Away, если компьютер не используется."
-#: ../data/gui/preferences_window.ui.h:63
+#: ../data/gui/preferences_window.ui.h:64
msgid "If checked, Gajim will change status to Not Available when the computer has not been used even longer"
msgstr "Если отмечено, Gajim будет менять статус на Недоступен, если компьютер долго не используется"
-#: ../data/gui/preferences_window.ui.h:64
+#: ../data/gui/preferences_window.ui.h:65
msgid "If checked, Gajim will display avatars of contacts in roster window and in group chats"
msgstr "Если отмечено, то Gajim будет показывать аватары контактов в окне ростера и в окнах комнат"
-#: ../data/gui/preferences_window.ui.h:65
+#: ../data/gui/preferences_window.ui.h:66
msgid "If checked, Gajim will display status messages of contacts under the contact name in roster window and in group chats"
msgstr "Если отмечено, то Gajim будет отображать сообщение о статусе контакта под его именем в окне ростера и в окнах комнат"
-#: ../data/gui/preferences_window.ui.h:66
+#: ../data/gui/preferences_window.ui.h:67
msgid "If checked, Gajim will display the activity of contacts in the roster window"
msgstr "Если отмечено, то Gajim будет показывать занятия контактов в окне ростера"
-#: ../data/gui/preferences_window.ui.h:67
+#: ../data/gui/preferences_window.ui.h:68
msgid "If checked, Gajim will display the location of contacts in the roster window"
msgstr "Если отмечено, то Gajim будет показывать местоположение контактов в окне ростера"
-#: ../data/gui/preferences_window.ui.h:68
+#: ../data/gui/preferences_window.ui.h:69
msgid "If checked, Gajim will display the mood of contacts in the roster window"
msgstr "Если отмечено, то Gajim будет показывать настроения контактов в окне ростера"
-#: ../data/gui/preferences_window.ui.h:69
+#: ../data/gui/preferences_window.ui.h:70
msgid "If checked, Gajim will display the tunes of contacts in the roster window"
msgstr "Если отмечено, то Gajim будет показывать tunes контактов в окне ростера"
-#: ../data/gui/preferences_window.ui.h:70
+#: ../data/gui/preferences_window.ui.h:71
msgid "If checked, Gajim will highlight spelling errors in input fields of chat windows. If no language is explicitly set via right click on the input field, the default language will be used for this contact or group chat."
msgstr "Если отмечено, Gajim будет выделять орфографические ошибки в полях ввода окон чата. Если язык проверки явно не задан, будет использован язык по умолчанию для данного контакта или комнаты."
-#: ../data/gui/preferences_window.ui.h:71
+#: ../data/gui/preferences_window.ui.h:72
msgid "If checked, Gajim will ignore incoming events from unauthorized contacts. Use with caution, because it blocks all messages from any contact that is not in the roster"
msgstr "Отметьте эту опцию, только если кто-то не из вашего ростера спамит/достает вас. Используйте с осторожностью, потому что это заблокирует все сообщения от контактов не из вашего ростера."
-#: ../data/gui/preferences_window.ui.h:72
+#: ../data/gui/preferences_window.ui.h:73
msgid "If checked, Gajim will keep logs for encrypted messages. Please note that when using E2E encryption the remote party has to agree on logging, else the messages will not be logged."
msgstr "Если отмечено, Gajim будет сохранять историю зашифрованных сообщений. Помните, что при использовании E2E шифрования удаленная сторона должна дать согласие на ведение истории, иначе сообщения не будут сохраняться."
-#: ../data/gui/preferences_window.ui.h:73
+#: ../data/gui/preferences_window.ui.h:74
msgid "If checked, Gajim will show a notification when a new e-mail is received via GMail"
msgstr "Если отмечено, то Gajim будет сообщать о новых письмах, полученных в GMail"
-#: ../data/gui/preferences_window.ui.h:74
+#: ../data/gui/preferences_window.ui.h:75
msgid "If checked, Gajim will use protocol-specific status icons. (eg. A contact from MSN will have the equivalent msn icon for status online, away, busy, etc...)"
msgstr "Если отмечено, то Gajim будет использовать для каждого протокола свои иконки (например, контакты из MSN будут иметь соответствующие иконки msn для статусов «в сети», «ушёл», «занят» и т.д.)"
-#: ../data/gui/preferences_window.ui.h:75
+#: ../data/gui/preferences_window.ui.h:76
msgid "If enabled, Gajim will not ask for a status message. The specified default message will be used instead."
msgstr "Если включено, Gajim не будет запрашивать сообщение о статусе. Вместо него будет использовано соответствующее сообщение по умолчанию."
-#: ../data/gui/preferences_window.ui.h:76
+#: ../data/gui/preferences_window.ui.h:77
msgid "If not disabled, Gajim will replace ascii smilies like ':)' with equivalent animated or static graphical emoticons"
msgstr "Gajim заменяет текстовые смайлики, например ':)', их графическим или анимированным эквивалентом. Выберите «Отключены», чтобы этого не происходило."
-#: ../data/gui/preferences_window.ui.h:77
+#: ../data/gui/preferences_window.ui.h:78
msgid "Last state"
msgstr "Последнее состояние"
-#: ../data/gui/preferences_window.ui.h:78
+#: ../data/gui/preferences_window.ui.h:79
msgid "Log _encrypted chat session"
msgstr "Записывать в лог _шифрованные сообщения"
-#: ../data/gui/preferences_window.ui.h:79
+#: ../data/gui/preferences_window.ui.h:80
msgid "Ma_ke message windows compact"
msgstr "_Компактное окно сообщений"
-#: ../data/gui/preferences_window.ui.h:80
+#: ../data/gui/preferences_window.ui.h:81
msgid "Ma_nage..."
msgstr "_Управление..."
-#: ../data/gui/preferences_window.ui.h:81
+#: ../data/gui/preferences_window.ui.h:82
msgid "Never"
msgstr "Никогда"
-#: ../data/gui/preferences_window.ui.h:82
+#: ../data/gui/preferences_window.ui.h:83
msgid "Notifications"
msgstr "Уведомления"
-#: ../data/gui/preferences_window.ui.h:83
+#: ../data/gui/preferences_window.ui.h:84
msgid "Notify me about contacts that sign _in"
msgstr "Уведомлять о контактах, которые _вошли: "
-#: ../data/gui/preferences_window.ui.h:84
+#: ../data/gui/preferences_window.ui.h:85
msgid "Notify me about contacts that sign _out"
msgstr "Уведомлять о контактах, которые _вышли: "
-#: ../data/gui/preferences_window.ui.h:85
+#: ../data/gui/preferences_window.ui.h:86
msgid "Notify me about it"
msgstr "Уведомлять об этом"
-#: ../data/gui/preferences_window.ui.h:86
+#: ../data/gui/preferences_window.ui.h:87
msgid "Notify on new _GMail email"
msgstr "Сообщать о новых письмах в _Gmail"
-#: ../data/gui/preferences_window.ui.h:87
+#: ../data/gui/preferences_window.ui.h:88
msgid "Only when pending events"
msgstr "Только при пропущенных событиях"
-#: ../data/gui/preferences_window.ui.h:88
+#: ../data/gui/preferences_window.ui.h:89
msgid "Personal Events"
msgstr "Расширенные статусы"
-#: ../data/gui/preferences_window.ui.h:89
+#: ../data/gui/preferences_window.ui.h:90
msgid "Play _sounds"
msgstr "Проигрывать _звук"
-#: ../data/gui/preferences_window.ui.h:90
+#: ../data/gui/preferences_window.ui.h:91
msgid "Pop it up"
msgstr "Показать"
-#: ../data/gui/preferences_window.ui.h:91
+#: ../data/gui/preferences_window.ui.h:92
msgid "Preferences"
msgstr "Настройки"
-#: ../data/gui/preferences_window.ui.h:92
+#: ../data/gui/preferences_window.ui.h:93
msgid ""
"STUN server hostname. If none given, Gajim will try\n"
"to discover one from server."
@@ -2035,56 +2043,56 @@
"Адрес сервера STUN. Если не указано, Gajim попробует\n"
"получить адрес с сервера."
-#: ../data/gui/preferences_window.ui.h:94
+#: ../data/gui/preferences_window.ui.h:95
msgid "STUN server:"
msgstr "STUN сервер:"
-#: ../data/gui/preferences_window.ui.h:95
+#: ../data/gui/preferences_window.ui.h:96
changeset bfd5f94489d8 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=bfd5f94489d8
description: use prepared statements in all SQL queries that contains jids to prevent SQL injection. Fixes #7034
diffstat:
src/common/logger.py | 78 +++++++++++++++++++++++++++------------------------
1 files changed, 41 insertions(+), 37 deletions(-)
diffs (163 lines):
diff -r 0ec525152985 -r bfd5f94489d8 src/common/logger.py
--- a/src/common/logger.py Tue Nov 08 20:23:48 2011 +0100
+++ b/src/common/logger.py Tue Nov 08 22:00:52 2011 +0100
@@ -569,7 +569,7 @@
except exceptions.PysqliteOperationalError, e:
# Error trying to create a new jid_id. This means there is no log
return []
- where_sql = self._build_contact_where(account, jid)
+ where_sql, jid_tuple = self._build_contact_where(account, jid)
now = int(float(time.time()))
timed_out = now - (timeout * 60) # before that they are too old
@@ -577,14 +577,13 @@
# 3 - 8 (we avoid the last 2 lines but we still return 5 asked)
try:
self.cur.execute('''
- SELECT time, kind, message FROM logs
- WHERE (%s) AND kind IN (%d, %d, %d, %d, %d) AND time > %d
- ORDER BY time DESC LIMIT %d OFFSET %d
- ''' % (where_sql, constants.KIND_SINGLE_MSG_RECV,
- constants.KIND_CHAT_MSG_RECV, constants.KIND_SINGLE_MSG_SENT,
- constants.KIND_CHAT_MSG_SENT, constants.KIND_ERROR,
- timed_out, restore_how_many_rows, pending_how_many)
- )
+ SELECT time, kind, message FROM logs
+ WHERE (%s) AND kind IN (%d, %d, %d, %d, %d) AND time > %d
+ ORDER BY time DESC LIMIT %d OFFSET %d
+ ''' % (where_sql, constants.KIND_SINGLE_MSG_RECV,
+ constants.KIND_CHAT_MSG_RECV, constants.KIND_SINGLE_MSG_SENT,
+ constants.KIND_CHAT_MSG_SENT, constants.KIND_ERROR, timed_out,
+ restore_how_many_rows, pending_how_many), jid_tuple)
results = self.cur.fetchall()
except sqlite.DatabaseError:
@@ -614,18 +613,18 @@
except exceptions.PysqliteOperationalError, e:
# Error trying to create a new jid_id. This means there is no log
return []
- where_sql = self._build_contact_where(account, jid)
+ where_sql, jid_tuple = self._build_contact_where(account, jid)
start_of_day = self.get_unix_time_from_date(year, month, day)
seconds_in_a_day = 86400 # 60 * 60 * 24
last_second_of_day = start_of_day + seconds_in_a_day - 1
self.cur.execute('''
- SELECT contact_name, time, kind, show, message, subject FROM logs
- WHERE (%s)
- AND time BETWEEN %d AND %d
- ORDER BY time
- ''' % (where_sql, start_of_day, last_second_of_day))
+ SELECT contact_name, time, kind, show, message, subject FROM logs
+ WHERE (%s)
+ AND time BETWEEN %d AND %d
+ ORDER BY time
+ ''' % (where_sql, start_of_day, last_second_of_day), jid_tuple)
results = self.cur.fetchall()
return results
@@ -651,13 +650,13 @@
return results
else: # user just typed something, we search in message column
- where_sql = self._build_contact_where(account, jid)
+ where_sql, jid_tuple = self._build_contact_where(account, jid)
like_sql = '%' + query.replace("'", "''") + '%'
self.cur.execute('''
- SELECT contact_name, time, kind, show, message, subject FROM logs
- WHERE (%s) AND message LIKE '%s'
- ORDER BY time
- ''' % (where_sql, like_sql))
+ SELECT contact_name, time, kind, show, message, subject FROM logs
+ WHERE (%s) AND message LIKE '%s'
+ ORDER BY time
+ ''' % (where_sql, like_sql), jid_tuple)
results = self.cur.fetchall()
return results
@@ -672,7 +671,7 @@
# Error trying to create a new jid_id. This means there is no log
return []
days_with_logs = []
- where_sql = self._build_contact_where(account, jid)
+ where_sql, jid_tuple = self._build_contact_where(account, jid)
# First select all date of month whith logs we want
start_of_month = self.get_unix_time_from_date(year, month, 1)
@@ -684,13 +683,13 @@
# and take only one of the same values (distinct)
# Now we have timestamps of time 0:00 of every day with logs
self.cur.execute('''
- SELECT DISTINCT time/(86400)*86400 FROM logs
- WHERE (%s)
- AND time BETWEEN %d AND %d
- AND kind NOT IN (%d, %d)
- ORDER BY time
- ''' % (where_sql, start_of_month, last_second_of_month,
- constants.KIND_STATUS, constants.KIND_GCSTATUS))
+ SELECT DISTINCT time/(86400)*86400 FROM logs
+ WHERE (%s)
+ AND time BETWEEN %d AND %d
+ AND kind NOT IN (%d, %d)
+ ORDER BY time
+ ''' % (where_sql, start_of_month, last_second_of_month,
+ constants.KIND_STATUS, constants.KIND_GCSTATUS), jid_tuple)
result = self.cur.fetchall()
# convert timestamps to day of month
@@ -706,19 +705,21 @@
"""
where_sql = ''
if not is_room:
- where_sql = self._build_contact_where(account, jid)
+ where_sql, jid_tuple = self._build_contact_where(account, jid)
else:
try:
jid_id = self.get_jid_id(jid, 'ROOM')
except exceptions.PysqliteOperationalError, e:
# Error trying to create a new jid_id. This means there is no log
return None
- where_sql = 'jid_id = %s' % jid_id
+ where_sql = 'jid_id = ?'
+ jid_tuple = (jid_id,)
self.cur.execute('''
- SELECT MAX(time) FROM logs
- WHERE (%s)
- AND kind NOT IN (%d, %d)
- ''' % (where_sql, constants.KIND_STATUS, constants.KIND_GCSTATUS))
+ SELECT MAX(time) FROM logs
+ WHERE (%s)
+ AND kind NOT IN (%d, %d)
+ ''' % (where_sql, constants.KIND_STATUS, constants.KIND_GCSTATUS),
+ jid_tuple)
results = self.cur.fetchone()
if results is not None:
@@ -766,6 +767,7 @@
Build the where clause for a jid, including metacontacts jid(s) if any
"""
where_sql = ''
+ jid_tuple = ()
# will return empty list if jid is not associated with
# any metacontacts
family = gajim.contacts.get_metacontacts_family(account, jid)
@@ -775,13 +777,15 @@
jid_id = self.get_jid_id(user['jid'])
except exceptions.PysqliteOperationalError, e:
continue
- where_sql += 'jid_id = %s' % jid_id
+ where_sql += 'jid_id = ?'
+ jid_tuple += (jid_id,)
if user != family[-1]:
where_sql += ' OR '
else: # if jid was not associated with metacontacts
jid_id = self.get_jid_id(jid)
- where_sql = 'jid_id = %s' % jid_id
- return where_sql
+ where_sql = 'jid_id = ?'
+ jid_tuple += (jid_id,)
+ return where_sql, jid_tuple
def save_transport_type(self, jid, type_):
"""