forked from CGM_Public/pretix_original
Fix i18n of OrderError
This commit is contained in:
@@ -403,7 +403,15 @@ def _cancel_order(order, user=None, send_mail: bool=True, api_token=None, device
|
|||||||
|
|
||||||
|
|
||||||
class OrderError(LazyLocaleException):
|
class OrderError(LazyLocaleException):
|
||||||
pass
|
def __init__(self, *args):
|
||||||
|
msg = args[0]
|
||||||
|
msgargs = args[1] if len(args) > 1 else None
|
||||||
|
self.args = args
|
||||||
|
if msgargs:
|
||||||
|
msg = _(msg) % msgargs
|
||||||
|
else:
|
||||||
|
msg = _(msg)
|
||||||
|
super().__init__(msg)
|
||||||
|
|
||||||
|
|
||||||
def _check_date(event: Event, now_dt: datetime):
|
def _check_date(event: Event, now_dt: datetime):
|
||||||
|
|||||||
Reference in New Issue
Block a user