Fix string translation

This commit is contained in:
Jeremy Stretch 2023-10-30 14:42:42 -04:00
parent e39815b0fa
commit cdb9a0dcac

View File

@ -17,11 +17,9 @@ def handle_protectederror(obj_list, request, e):
raise e raise e
# Formulate the error message # Formulate the error message
err_message = _( err_message = _("Unable to delete <strong>{objects}</strong>. {count} dependent objects were found: ").format(
"Unable to delete <strong>{objects}</strong>. {count} dependent objects were found: ".format( objects=', '.join(str(obj) for obj in obj_list),
objects=', '.join(str(obj) for obj in obj_list), count=len(protected_objects) if len(protected_objects) <= 50 else _('More than 50')
count=len(protected_objects) if len(protected_objects) <= 50 else _('More than 50')
)
) )
# Append dependent objects to error message # Append dependent objects to error message