1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-12-16 11:36:17 +00:00
This commit is contained in:
mihalin
2022-03-22 06:56:39 +03:00
parent 5d5b47ea50
commit e209d56ce8
2 changed files with 14 additions and 9 deletions

View File

@@ -4,9 +4,14 @@ from os.path import dirname
locales_dir = dirname(__file__)
def dummy_translator(x: str) -> str:
return x
lang = BotSettings.language()
if lang == "ru":
_ = lambda x: x
_ = dummy_translator
else:
t = gettext.translation("olgram", localedir=locales_dir, languages=[lang])
_ = t.gettext