Skip to content

Commit

Permalink
fix(loc): Do not use _(...) in combination with format (#10407)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik authored Jun 17, 2024
1 parent f92e5c6 commit bafde45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dojo/notifications/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ def create_notification(event=None, **kwargs):
def create_description(event, *args, **kwargs):
if "description" not in kwargs.keys():
if event == 'product_added':
kwargs["description"] = _('Product {title} has been created successfully.'.format(title=kwargs['title']))
kwargs["description"] = _('Product %s has been created successfully.') % kwargs['title']
elif event == 'product_type_added':
kwargs["description"] = _('Product Type {title} has been created successfully.'.format(title=kwargs['title']))
kwargs["description"] = _('Product Type %s has been created successfully.') % kwargs['title']
else:
kwargs["description"] = _('Event {event} has occurred.'.format(event=str(event)))
kwargs["description"] = _('Event %s has occurred.') % str(event)

return kwargs["description"]

Expand Down

0 comments on commit bafde45

Please sign in to comment.