forked from kaibruneji/MyIrcBot
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtranslate_krzb.py
23 lines (21 loc) Β· 877 Bytes
/
translate_krzb.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def tr(txt):
if txt is None: return "ΡΠ΅Π³ΠΎ ΠΏΠ΅ΡΠ΅Π²ΠΎΠ΄ΠΈΡΡ-ΡΠΎ?"
tr_dict = {
'q': 'ΠΉ', 'w': 'Ρ', 'e': 'Ρ', 'r': 'ΠΊ', 't': 'Π΅', 'y': 'Π½', 'u': 'Π³',
'i': 'Ρ', 'o': 'Ρ', 'p': 'Π·', '[': 'Ρ
', ']': 'Ρ', 'a': 'Ρ', 's': 'Ρ',
'd': 'Π²', 'f': 'Π°', 'g': 'ΠΏ', 'h': 'Ρ', 'j': 'ΠΎ', 'k': 'Π»', 'l': 'Π΄',
';': 'ΠΆ', "'": 'Ρ', 'z': 'Ρ', 'x': 'Ρ', 'c': 'Ρ', 'v': 'ΠΌ', 'b': 'ΠΈ',
'n': 'Ρ', 'm': 'Ρ', ',': 'Π±', '.': 'Ρ', '/': '.', '&': '?', '`': 'Ρ',
'~': 'Ρ', '>': 'Ρ', '<': 'Π±'
}
def t(x):
if x in tr_dict:
x = tr_dict.get(x)
return x
txt_list = list()
txt_tuple = tuple(txt)
for i in txt_tuple:
y = t(i.lower())
txt_list.append(y)
res = ''.join(txt_list)
return res