Merged in fix/SW-3021-vouchers (pull request #2719)
fix(SW-3021): add pluralization support for vouchers * fix(SW-3021): add pluralization support for vouchers Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -51,7 +51,15 @@ export function calculateTotalPrice(
|
||||
}
|
||||
if (totals.vouchers) {
|
||||
const appendTotalPrice = totalPrice ? `${totalPrice} + ` : ""
|
||||
totalPrice = `${appendTotalPrice}${totals.vouchers} ${intl.formatMessage({ defaultMessage: "Voucher" })}`
|
||||
totalPrice = `${appendTotalPrice}${totals.vouchers} ${intl.formatMessage(
|
||||
{
|
||||
defaultMessage:
|
||||
"{numberOfVouchers, plural, one {Voucher} other {Vouchers}}",
|
||||
},
|
||||
{
|
||||
numberOfVouchers: totals.vouchers,
|
||||
}
|
||||
)}`
|
||||
}
|
||||
if (totals.cash) {
|
||||
const appendTotalPrice = totalPrice ? `${totalPrice} + ` : ""
|
||||
|
||||
Reference in New Issue
Block a user