Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/isida/3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaliyS <vitaliy@root.ua>2013-11-25 20:46:21 +0400
committerVitaliyS <vitaliy@root.ua>2013-11-25 20:46:21 +0400
commitc5e5e6191078bb09d398b142c5e4504c0a2de8e3 (patch)
treed2f78e79fa3476fae3c385ef5cfbe21d01120686
parent7bb0f159f2a9108060a9efe402004bf507a6adb2 (diff)
upd: wot.py - new feature
-rw-r--r--data/locales/ru.txt11
-rw-r--r--data/locales/ua.txt10
-rw-r--r--plugins/wot.py5
3 files changed, 19 insertions, 7 deletions
diff --git a/data/locales/ru.txt b/data/locales/ru.txt
index c0481c8..8b2521e 100644
--- a/data/locales/ru.txt
+++ b/data/locales/ru.txt
@@ -1348,6 +1348,12 @@ Show list of users for last day Показ списка участников з
# file: plugins/wot.py
Use more characters in the name of the tank Используйте больше символов в названии танка
+none отсутствует
+1 class 1 степень
+2 class 2 степень
+3 class 3 степень
+master мастер
+\n%s (%s/%s - %s%%), mastery: %s \n%s (%s/%s - %s%%), классность: %s
not founded tank танк не найден
Impossible to get tanks' statistics Невозможно получить статистику танков
\nUp to %s%% win left: %s battles \nДо %s%% побед осталось: %s битв
@@ -1366,7 +1372,6 @@ Impossible to get tanks' statistics Невозможно получить ста
- unicum - уникум
\nWN6 rating: %s (XVM: %s) \nРейтинг WN6: %s (XVM: %s)
\nArmor-rating: %s \nРейтинг Бронесайта: %s
-\nTrue Win Rate (TWR): %s%% \nПриведенный процент побед (TWR): %s%%
Impossible to get statistics Невозможно получить статистику
Query error Ошибка запроса
Player not found Игрок не найден
@@ -1806,5 +1811,5 @@ Youtube settings Настройки youtube
API settings Настройки API
# write locale file: ru.txt
-# total: 1478
-# missed translations: 1
+# total: 1483
+# missed translations: 6
diff --git a/data/locales/ua.txt b/data/locales/ua.txt
index 9162500..5bcd2bc 100644
--- a/data/locales/ua.txt
+++ b/data/locales/ua.txt
@@ -1348,6 +1348,12 @@ Show list of users for last day Показ списку учасників за
# file: plugins/wot.py
Use more characters in the name of the tank Використовуйте більше символів в назві танку
+none відсутня
+1 class 1 степінь
+2 class 2 степінь
+3 class 3 степінь
+master майстер
+\n%s (%s/%s - %s%%), mastery: %s \n%s (%s/%s - %s%%), класність: %s
not founded tank танк не знайдено
Impossible to get tanks' statistics Неможливо отримати статистику танків
\nUp to %s%% win left: %s battles \nДо %s%% перемог залишилося: %s битв
@@ -1805,5 +1811,5 @@ Youtube settings Налаштування Youtube
API settings Налаштування API
# write locale file: ua.txt
-# total: 1477
-# missed translations: 9
+# total: 1483
+# missed translations: 6
diff --git a/plugins/wot.py b/plugins/wot.py
index e9b86ae..9a08a9f 100644
--- a/plugins/wot.py
+++ b/plugins/wot.py
@@ -57,7 +57,7 @@ def wot(type, jid, nick, text):
v = json.loads(data)
player_id = str(v['data'][0]['id'])
- data = load_page('%s/2.0/account/tanks/?application_id=%s&account_id=%s&fields=statistics,tank_id' % (API_ADDR, APP_ID, player_id))
+ data = load_page('%s/2.0/account/tanks/?application_id=%s&account_id=%s&fields=statistics,tank_id,mark_of_mastery' % (API_ADDR, APP_ID, player_id))
vdata = json.loads(data)
data = load_page('%s/2.0/account/info/?application_id=%s&account_id=%s&fields=clan,nickname,statistics.all' % (API_ADDR, APP_ID, player_id))
@@ -86,8 +86,9 @@ def wot(type, jid, nick, text):
if str(t['tank_id']) in tids:
tank_win = t['statistics']['wins']
tank_battle = t['statistics']['battles']
+ mom = [L('none','%s/%s'%(jid,nick)), L('1 class','%s/%s'%(jid,nick)), L('2 class','%s/%s'%(jid,nick)), L('3 class','%s/%s'%(jid,nick)), L('master','%s/%s'%(jid,nick))][t['mark_of_mastery']]
if tank_battle:
- msg += '\n%s (%s/%s - %s%%)' % (tanks_data[str(t['tank_id'])]['name_i18n'], tank_win, tank_battle, round(100.0*tank_win/tank_battle, 2))
+ msg += L('\n%s (%s/%s - %s%%), mastery: %s','%s/%s'%(jid,nick)) % (tanks_data[str(t['tank_id'])]['name_i18n'], tank_win, tank_battle, round(100.0*tank_win/tank_battle, 2), mom)
else:
msg += '\n%s (%s/%s)' % (tanks_data[str(t['tank_id'])]['name_i18n'], tank_win, tank_battle)
if not msg.count('\n'):