From 774a1b0ce392c857b5adf0dba7d97a2523d9a94e Mon Sep 17 00:00:00 2001 From: SantaSpeen Date: Tue, 13 May 2025 18:35:31 +0300 Subject: [PATCH] [+] dedent --- internationalization/i18n.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internationalization/i18n.py b/internationalization/i18n.py index 9db30bc..c50d517 100644 --- a/internationalization/i18n.py +++ b/internationalization/i18n.py @@ -1,4 +1,5 @@ import builtins +import textwrap from collections import defaultdict import json5 @@ -115,7 +116,7 @@ class I18N: :return: The phrase from the locale file. """ # key: some.key.here - phrase = self._locale.get(key) + phrase = textwrap.dedent(self._locale.get(key)) if not phrase: return f"<{key.upper()}>" return phrase.format_map(defaultdict(lambda: '', kwargs))