-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocales.py
55 lines (49 loc) · 1.6 KB
/
locales.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
"""
All locales for the wxVk
"""
from locale import getdefaultlocale
def get_locale(language: str) -> dict:
""" Returns locale dict based on given language. """
if language in LOCALES:
return LOCALES[language]
return LOCALES[FALLBACK_LANGUAGE]
FALLBACK_LANGUAGE = "en_US"
LOCALES = {
"en_US": {
"quit": "Quit",
"login": "Login",
"password": "Password",
"gettoken": "Get token",
"token": "Token",
"enter_credentials" : "Enter your credentials",
"sumbit" : "Sumbit",
'2fa' : "Enter 2FA code",
"tryauth": "Trying to authorize...",
"success" : "Success!",
"error" : "Error",
"badpass": "Wrong password",
"savecreds": "Remember credentials",
"loading": "Loading",
"messages":"Messages"
},
"ru_RU": {
"quit": "Выйти",
"login": "Логин",
"password": "Пароль",
"gettoken": "Получить токен",
"token": "Токен",
"enter_credentials": "Введите учетные данные",
"sumbit": "Подтвердить",
"2fa": "Введите 2FA код",
"tryauth": "Пытаюсь авторизоваться...",
"success": "Успешно!",
"error": "Ошибка",
"badpass": "Неверный пароль",
"savecreds": "Запомнить учетные данные",
"loading": "Загрузка",
"messages": "Сообщения"
}
}
_OSLANGUAGE, _ = getdefaultlocale()
locale = get_locale(_OSLANGUAGE)
del getdefaultlocale