Return result string if it is not a dict

This commit is contained in:
Davte 2019-08-05 21:44:32 +02:00
parent 3fbe4b93e9
commit 91f9119ad5
2 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,7 @@ __author__ = "Davide Testa"
__email__ = "davide@davte.it" __email__ = "davide@davte.it"
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
__license__ = "GNU General Public License v3.0" __license__ = "GNU General Public License v3.0"
__version__ = "2.2.6" __version__ = "2.2.7"
__maintainer__ = "Davide Testa" __maintainer__ = "Davide Testa"
__contact__ = "t.me/davte" __contact__ = "t.me/davte"

View File

@ -195,6 +195,8 @@ class MultiLanguageObject(object):
) )
) )
return default_message or self.missing_message return default_message or self.missing_message
if type(result) is str:
return result
return result[language].format( return result[language].format(
**format_kwargs **format_kwargs
) )