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:
@@ -1,6 +1,5 @@
|
||||
import { useIntl } from 'react-intl'
|
||||
|
||||
import { CurrencyEnum } from '@scandic-hotels/common/constants/currency'
|
||||
import Caption from '../../Caption'
|
||||
import Subtitle from '../../Subtitle'
|
||||
|
||||
@@ -29,7 +28,15 @@ export default function HotelVoucherCard({
|
||||
{productTypeVoucher.numberOfVouchers}
|
||||
</Subtitle>
|
||||
<Caption color="uiTextHighContrast" className={styles.currency}>
|
||||
{CurrencyEnum.Voucher}
|
||||
{intl.formatMessage(
|
||||
{
|
||||
defaultMessage:
|
||||
'{numberOfVouchers, plural, one {Voucher} other {Vouchers}}',
|
||||
},
|
||||
{
|
||||
numberOfVouchers: productTypeVoucher.numberOfVouchers,
|
||||
}
|
||||
)}
|
||||
</Caption>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user