chore(SW-288): update Finnish translations + date format
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
"requiredNights": 0,
|
||||
"benefits": [
|
||||
{
|
||||
"title": "Ansaintakerroin 25 %"
|
||||
"title": "Ansaintakerroin +25 %"
|
||||
},
|
||||
{
|
||||
"title": "Aikainen sisäänkirjautuminen – 1 tunti lisäaikaa varaustilanteen mukaan"
|
||||
|
||||
@@ -75,7 +75,7 @@ function LevelCard({ formatMessage, lang, level }: LevelCardProps) {
|
||||
notFound()
|
||||
}
|
||||
}
|
||||
const pointsString = `${level.requiredPoints.toLocaleString(lang)} ${formatMessage({ id: "Points" })} `
|
||||
const pointsString = `${level.requiredPoints.toLocaleString(lang)} ${formatMessage({ id: "points" })} `
|
||||
|
||||
return (
|
||||
<article className={styles.card}>
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
"level": 5,
|
||||
"name": "Loyal Friend",
|
||||
"requirement": "100 000p",
|
||||
"description": "Du har været hos os på mange ophold, så derfor vil vi gerne give dig nogle af vores bedste bonusser.",
|
||||
"description": "Du har været hos os på mange ophold, så derfor vil vi gerne give dig nogle af vores bedste fordele.",
|
||||
"icon": "/_static/icons/loyaltylevels/loyal-friend.svg",
|
||||
"benefits": [
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ import { getMembershipLevelObject } from "@/utils/membershipLevel"
|
||||
|
||||
import styles from "./next.module.css"
|
||||
|
||||
import { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
||||
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
||||
|
||||
export default async function NextLevelBenefitsBlock({
|
||||
title,
|
||||
@@ -49,7 +49,7 @@ export default async function NextLevelBenefitsBlock({
|
||||
</Chip>
|
||||
<div className={styles.textContainer}>
|
||||
<Body color="peach50" textAlign="center">
|
||||
{formatMessage({ id: "As our" })} {nextLevel.name}
|
||||
{formatMessage({ id: "As our" }, { level: nextLevel.name })}
|
||||
</Body>{" "}
|
||||
<Title
|
||||
level="h4"
|
||||
|
||||
@@ -3,6 +3,7 @@ import { dt } from "@/lib/dt"
|
||||
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import { getIntl } from "@/i18n"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
import { getMembership } from "@/utils/user"
|
||||
|
||||
import type { UserProps } from "@/types/components/myPages/user"
|
||||
@@ -10,7 +11,7 @@ import type { UserProps } from "@/types/components/myPages/user"
|
||||
export default async function ExpiringPoints({ user }: UserProps) {
|
||||
const { formatMessage } = await getIntl()
|
||||
const membership = getMembership(user.memberships)
|
||||
// TODO - add correct points when available from API
|
||||
|
||||
if (!membership || !membership.pointsToExpire) {
|
||||
// TODO: handle this case?
|
||||
return null
|
||||
@@ -19,12 +20,19 @@ export default async function ExpiringPoints({ user }: UserProps) {
|
||||
// sv hardcoded to force space on thousands
|
||||
const formatter = new Intl.NumberFormat(Lang.sv)
|
||||
const d = dt(membership.pointsExpiryDate)
|
||||
|
||||
const dateFormat = getLang() == Lang.fi ? "DD.MM.YYYY" : "YYYY-MM-DD"
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Body color="white" textTransform="bold" textAlign="center">
|
||||
{formatter.format(membership.pointsToExpire)}{" "}
|
||||
{formatMessage({ id: "spendable points expiring by" })}{" "}
|
||||
{d.format("YYYY-MM-DD")}
|
||||
{formatMessage(
|
||||
{ id: "spendable points expiring by" },
|
||||
{
|
||||
points: formatter.format(membership.pointsToExpire),
|
||||
date: d.format(dateFormat),
|
||||
}
|
||||
)}
|
||||
</Body>
|
||||
</section>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user