1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-05-10 15:59:50 +00:00

Fix attribute error in TranslationError

This commit is contained in:
Rapptz 2022-08-09 10:45:12 -04:00
parent df54da8bc9
commit 4fbafcd718

@ -171,7 +171,7 @@ class TranslationError(AppCommandError):
if msg:
super().__init__(*msg)
else:
ctx = context.name.replace('_', ' ')
ctx = context.location.name.replace('_', ' ')
fmt = f'Failed to translate {self.string!r} in a {ctx}'
if self.locale is not None:
fmt = f'{fmt} in the {self.locale.value} locale'