[+] dedent
This commit is contained in:
parent
633c92608f
commit
774a1b0ce3
@ -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: '<unknown>', kwargs))
|
||||
|
Loading…
x
Reference in New Issue
Block a user