Make errors properly translatable

This commit is contained in:
kramo
2023-06-26 11:08:33 +02:00
parent 92add88c5d
commit 4f7dc8716a
3 changed files with 14 additions and 8 deletions

View File

@@ -16,12 +16,12 @@ class FriendlyError(Exception):
@property
def title(self) -> str:
"""Get the gettext translated error title"""
return _(self.title_format).format(self.title_args)
return self.title_format.format(self.title_args)
@property
def subtitle(self) -> str:
"""Get the gettext translated error subtitle"""
return _(self.subtitle_format).format(self.subtitle_args)
return self.subtitle_format.format(self.subtitle_args)
def __init__(
self,