fix(i18n): prepare for Lokalise
This commit is contained in:
@@ -22,12 +22,19 @@ export default function Row({ transaction }: RowProps) {
|
||||
const pathName = usePathname()
|
||||
const isWebview = webviews.includes(pathName)
|
||||
|
||||
const nightString = `${transaction.nights} ${transaction.nights === 1 ? intl.formatMessage({ id: "night" }) : intl.formatMessage({ id: "nights" })}`
|
||||
const nightsMsg = intl.formatMessage(
|
||||
{
|
||||
id: "{nightsAmount, plural, one {# night} other {# nights}}",
|
||||
},
|
||||
{
|
||||
nightsAmount: transaction.nights,
|
||||
}
|
||||
)
|
||||
|
||||
let description =
|
||||
transaction.hotelName && transaction.city
|
||||
? `${transaction.hotelName}, ${transaction.city} ${nightString}`
|
||||
: `${nightString}`
|
||||
? `${transaction.hotelName}, ${transaction.city} ${nightsMsg}`
|
||||
: `${nightsMsg}`
|
||||
|
||||
switch (transaction.type) {
|
||||
case Transactions.rewardType.stay:
|
||||
|
||||
Reference in New Issue
Block a user