mirror of
https://github.com/civsocit/olgram.git
synced 2025-05-24 17:03:24 +00:00
locale
This commit is contained in:
parent
2305590899
commit
eca5c53233
|
@ -26,9 +26,12 @@ _redis: ty.Optional[Redis] = None
|
|||
|
||||
|
||||
def _get_translator(message: types.Message) -> ty.Callable:
|
||||
try:
|
||||
if not message.from_user.locale:
|
||||
return _
|
||||
return translators.get(message.from_user.locale.language, _)
|
||||
except Exception:
|
||||
return _
|
||||
|
||||
|
||||
async def init_redis():
|
||||
|
|
Loading…
Reference in New Issue
Block a user