Let the script do the work for you!
{{ recentPurchase.name.shorten(30) }}
{{ __('Just purchased') }} "{{ recentPurchase.item_name.shorten(30) }}"
{{ recentPurchase.price }}
{{ userMessage }}