- 🇧🇬Bulgaria pfrenssen Sofia
The approach in the patch is not right, for many adjustments the data is dynamic and should not be used with
t()
. - 🇮🇳India rckstr_rohan
his , use a mapping to retrieve the correct translation for each label is more useful for dynamic datas
Example:
{% set adjustmentTranslations = {
'shipping': 'Shipping',
'tax': 'Tax',
'discount': 'Discount',
'fee': 'Fee',
} %}{% for adjustment in totals.adjustments %}
{{ adjustmentTranslations[adjustment.type] }} {{ adjustment.amount|commerce_price_format }}{% endfor %}