From 8792aaeeb9f6c632edd7f44153459e9438c44c10 Mon Sep 17 00:00:00 2001 From: SantaSpeen Date: Tue, 13 May 2025 18:43:21 +0300 Subject: [PATCH] [+] dedent fix --- internationalization/i18n.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internationalization/i18n.py b/internationalization/i18n.py index c50d517..a42c200 100644 --- a/internationalization/i18n.py +++ b/internationalization/i18n.py @@ -116,10 +116,10 @@ class I18N: :return: The phrase from the locale file. """ # key: some.key.here - phrase = textwrap.dedent(self._locale.get(key)) + phrase = self._locale.get(key) if not phrase: return f"<{key.upper()}>" - return phrase.format_map(defaultdict(lambda: '', kwargs)) + return textwrap.dedent(phrase.format_map(defaultdict(lambda: '', kwargs))) def __getattr__(self, item): key = item.replace("_", ".") # заменяем _ на . для удобства