mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-02 02:38:30 +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 "".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)
|
||||
for word in text
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue