mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 03:08:29 +02:00
trying to translate without loading the translation file will now return the text key instead of raising an error
This commit is contained in:
parent
fb8d20c08f
commit
970f18f503
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ def translate(*text) -> str:
|
||||||
:return: translated text
|
:return: translated text
|
||||||
"""
|
"""
|
||||||
return "".join([
|
return "".join([
|
||||||
self._language_data["translation"].get(word, word) if isinstance(word, str)
|
self._language_data.get("translation", {}).get(word, word) if isinstance(word, str)
|
||||||
else str(word)
|
else str(word)
|
||||||
for word in text
|
for word in text
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in a new issue