Change 'on sale' badge text to percentage discount

Hi, please use this code instead of

{%- assign percent = compare_at_price | minus:price | times: 100 | divided_by:compare_at_price | round -%}
Save {{ percent }}%