Merged in feat/lokalise-rebuild (pull request #2993)
Feat/lokalise rebuild * chore(lokalise): update translation ids * chore(lokalise): easier to switch between projects * chore(lokalise): update translation ids * . * . * . * . * . * . * chore(lokalise): update translation ids * chore(lokalise): update translation ids * . * . * . * chore(lokalise): update translation ids * chore(lokalise): update translation ids * . * . * chore(lokalise): update translation ids * chore(lokalise): update translation ids * chore(lokalise): new translations * merge * switch to errors for missing id's * merge * sync translations Approved-by: Linus Flood
This commit is contained in:
@@ -34,6 +34,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
<Typography variant="Body/Paragraph/mdBold">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
id: "editProfile.userInformation",
|
||||
defaultMessage: "User information",
|
||||
})}
|
||||
</p>
|
||||
@@ -41,9 +42,18 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
</header>
|
||||
<DateSelect
|
||||
labels={{
|
||||
day: intl.formatMessage({ defaultMessage: "Day" }),
|
||||
month: intl.formatMessage({ defaultMessage: "Month" }),
|
||||
year: intl.formatMessage({ defaultMessage: "Year" }),
|
||||
day: intl.formatMessage({
|
||||
id: "common.day",
|
||||
defaultMessage: "Day",
|
||||
}),
|
||||
month: intl.formatMessage({
|
||||
id: "common.month",
|
||||
defaultMessage: "Month",
|
||||
}),
|
||||
year: intl.formatMessage({
|
||||
id: "common.year",
|
||||
defaultMessage: "Year",
|
||||
}),
|
||||
errorMessage: getErrorMessage(
|
||||
intl,
|
||||
errors["dateOfBirth"]?.message?.toString()
|
||||
@@ -56,6 +66,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
<Input
|
||||
data-hj-suppress
|
||||
label={`${intl.formatMessage({
|
||||
id: "common.address",
|
||||
defaultMessage: "Address",
|
||||
})} 1`}
|
||||
name="address.streetAddress"
|
||||
@@ -63,6 +74,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
<Input
|
||||
data-hj-suppress
|
||||
label={intl.formatMessage({
|
||||
id: "common.city",
|
||||
defaultMessage: "City",
|
||||
})}
|
||||
name="address.city"
|
||||
@@ -71,6 +83,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
<Input
|
||||
data-hj-suppress
|
||||
label={intl.formatMessage({
|
||||
id: "common.zipCode",
|
||||
defaultMessage: "Zip code",
|
||||
})}
|
||||
name="address.zipCode"
|
||||
@@ -84,6 +97,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
errors?.address?.countryCode?.message?.toString()
|
||||
)}
|
||||
label={intl.formatMessage({
|
||||
id: "common.country",
|
||||
defaultMessage: "Country",
|
||||
})}
|
||||
lang={lang}
|
||||
@@ -93,6 +107,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
</div>
|
||||
<Input
|
||||
label={intl.formatMessage({
|
||||
id: "common.emailAddress",
|
||||
defaultMessage: "Email address",
|
||||
})}
|
||||
name="email"
|
||||
@@ -102,6 +117,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
/>
|
||||
<Phone
|
||||
countryLabel={intl.formatMessage({
|
||||
id: "common.countryCode",
|
||||
defaultMessage: "Country code",
|
||||
})}
|
||||
countriesWithTranslatedName={getFormattedCountryList(intl)}
|
||||
@@ -111,6 +127,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
errors?.phoneNumber?.message?.toString()
|
||||
)}
|
||||
label={intl.formatMessage({
|
||||
id: "common.phoneNumber",
|
||||
defaultMessage: "Phone number",
|
||||
})}
|
||||
name="phoneNumber"
|
||||
@@ -119,6 +136,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
<Select
|
||||
items={languageOptions}
|
||||
label={intl.formatMessage({
|
||||
id: "common.language",
|
||||
defaultMessage: "Language",
|
||||
})}
|
||||
name="language"
|
||||
@@ -130,6 +148,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
<Typography variant="Body/Paragraph/mdBold">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
id: "common.password",
|
||||
defaultMessage: "Password",
|
||||
})}
|
||||
</p>
|
||||
@@ -138,6 +157,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
<PasswordInput
|
||||
data-hj-suppress
|
||||
label={intl.formatMessage({
|
||||
id: "editProfile.currentPassword",
|
||||
defaultMessage: "Current password",
|
||||
})}
|
||||
name="password"
|
||||
@@ -146,6 +166,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
<PasswordInput
|
||||
data-hj-suppress
|
||||
label={intl.formatMessage({
|
||||
id: "editProfile.retypeNewPassword",
|
||||
defaultMessage: "Retype new password",
|
||||
})}
|
||||
name="retypeNewPassword"
|
||||
|
||||
@@ -126,6 +126,7 @@ export default function Form({ user }: EditFormProps) {
|
||||
<div className={styles.title}>
|
||||
<Title as="h4" color="red" level="h1" textTransform="capitalize">
|
||||
{intl.formatMessage({
|
||||
id: "common.welcome",
|
||||
defaultMessage: "Welcome",
|
||||
})}
|
||||
</Title>
|
||||
@@ -142,21 +143,26 @@ export default function Form({ user }: EditFormProps) {
|
||||
<div className={styles.btnContainer}>
|
||||
<Dialog
|
||||
bodyText={intl.formatMessage({
|
||||
id: "editProfile.discardChangesDescription",
|
||||
defaultMessage: "Any changes you've made will be lost.",
|
||||
})}
|
||||
cancelButtonText={intl.formatMessage({
|
||||
id: "editProfile.goBackToEdit",
|
||||
defaultMessage: "Go back to edit",
|
||||
})}
|
||||
proceedHref={profile[lang]}
|
||||
proceedText={intl.formatMessage({
|
||||
id: "editProfile.yesDiscardChanges",
|
||||
defaultMessage: "Yes, discard changes",
|
||||
})}
|
||||
titleText={intl.formatMessage({
|
||||
id: "editProfile.discardChangesTitle",
|
||||
defaultMessage: "Discard unsaved changes?",
|
||||
})}
|
||||
trigger={
|
||||
<Button intent="secondary" size="small" theme="base">
|
||||
{intl.formatMessage({
|
||||
id: "editProfile.discardChanges",
|
||||
defaultMessage: "Discard changes",
|
||||
})}
|
||||
</Button>
|
||||
@@ -171,6 +177,7 @@ export default function Form({ user }: EditFormProps) {
|
||||
type="submit"
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "common.save",
|
||||
defaultMessage: "Save",
|
||||
})}
|
||||
</Button>
|
||||
|
||||
@@ -46,6 +46,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
const lang = useLang()
|
||||
|
||||
const signupButtonText = intl.formatMessage({
|
||||
id: "signUp.joinNow",
|
||||
defaultMessage: "Join now",
|
||||
})
|
||||
|
||||
@@ -59,6 +60,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
if (error.data?.code === "CONFLICT") {
|
||||
toast.error(
|
||||
intl.formatMessage({
|
||||
id: "signUp.accountExistsError",
|
||||
defaultMessage:
|
||||
"An account with this email already exists. Please try signing in instead.",
|
||||
})
|
||||
@@ -68,6 +70,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
|
||||
toast.error(
|
||||
intl.formatMessage({
|
||||
id: "errorMessage.somethingWentWrong",
|
||||
defaultMessage: "Something went wrong!",
|
||||
})
|
||||
)
|
||||
@@ -130,6 +133,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
<Typography variant="Title/Subtitle/md">
|
||||
<h3>
|
||||
{intl.formatMessage({
|
||||
id: "signUp.contactInformation",
|
||||
defaultMessage: "Contact information",
|
||||
})}
|
||||
</h3>
|
||||
@@ -138,6 +142,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
<div className={styles.nameInputs}>
|
||||
<Input
|
||||
label={intl.formatMessage({
|
||||
id: "common.firstName",
|
||||
defaultMessage: "First name",
|
||||
})}
|
||||
name="firstName"
|
||||
@@ -145,6 +150,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
/>
|
||||
<Input
|
||||
label={intl.formatMessage({
|
||||
id: "common.lastName",
|
||||
defaultMessage: "Last name",
|
||||
})}
|
||||
name="lastName"
|
||||
@@ -156,15 +162,25 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
<Typography variant="Body/Supporting text (caption)/smBold">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
id: "common.birthDate",
|
||||
defaultMessage: "Birth date",
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
<DateSelect
|
||||
labels={{
|
||||
day: intl.formatMessage({ defaultMessage: "Day" }),
|
||||
month: intl.formatMessage({ defaultMessage: "Month" }),
|
||||
year: intl.formatMessage({ defaultMessage: "Year" }),
|
||||
day: intl.formatMessage({
|
||||
id: "common.day",
|
||||
defaultMessage: "Day",
|
||||
}),
|
||||
month: intl.formatMessage({
|
||||
id: "common.month",
|
||||
defaultMessage: "Month",
|
||||
}),
|
||||
year: intl.formatMessage({
|
||||
id: "common.year",
|
||||
defaultMessage: "Year",
|
||||
}),
|
||||
errorMessage: getErrorMessage(
|
||||
intl,
|
||||
errors.dateOfBirth?.message?.toString()
|
||||
@@ -178,6 +194,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
<div className={cx(styles.container, styles.additional)}>
|
||||
<Input
|
||||
label={intl.formatMessage({
|
||||
id: "common.zipCode",
|
||||
defaultMessage: "Zip code",
|
||||
})}
|
||||
name="address.zipCode"
|
||||
@@ -190,6 +207,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
errors.address?.countryCode?.message
|
||||
)}
|
||||
label={intl.formatMessage({
|
||||
id: "common.country",
|
||||
defaultMessage: "Country",
|
||||
})}
|
||||
lang={lang}
|
||||
@@ -198,6 +216,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
/>
|
||||
<Input
|
||||
label={intl.formatMessage({
|
||||
id: "common.emailAddress",
|
||||
defaultMessage: "Email address",
|
||||
})}
|
||||
name="email"
|
||||
@@ -206,6 +225,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
/>
|
||||
<Phone
|
||||
countryLabel={intl.formatMessage({
|
||||
id: "common.countryCode",
|
||||
defaultMessage: "Country code",
|
||||
})}
|
||||
countriesWithTranslatedName={getFormattedCountryList(intl)}
|
||||
@@ -215,6 +235,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
errors.phoneNumber?.message
|
||||
)}
|
||||
label={intl.formatMessage({
|
||||
id: "common.phoneNumber",
|
||||
defaultMessage: "Phone number",
|
||||
})}
|
||||
name="phoneNumber"
|
||||
@@ -226,6 +247,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
<Typography variant="Title/Subtitle/md">
|
||||
<h3>
|
||||
{intl.formatMessage({
|
||||
id: "common.password",
|
||||
defaultMessage: "Password",
|
||||
})}
|
||||
</h3>
|
||||
@@ -234,6 +256,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
<PasswordInput
|
||||
name="password"
|
||||
label={intl.formatMessage({
|
||||
id: "common.password",
|
||||
defaultMessage: "Password",
|
||||
})}
|
||||
isNewPassword
|
||||
@@ -244,6 +267,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
<Typography variant="Title/Subtitle/md">
|
||||
<h3>
|
||||
{intl.formatMessage({
|
||||
id: "signUp.termsAndConditions",
|
||||
defaultMessage: "Terms and conditions",
|
||||
})}
|
||||
</h3>
|
||||
@@ -256,11 +280,13 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
}}
|
||||
errorCodeMessages={{
|
||||
[signupErrors.TERMS_REQUIRED]: intl.formatMessage({
|
||||
id: "common.mustAcceptTermsError",
|
||||
defaultMessage: "You must accept the terms and conditions",
|
||||
}),
|
||||
}}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "signUp.iAccept",
|
||||
defaultMessage: "I accept",
|
||||
})}
|
||||
</Checkbox>
|
||||
@@ -268,6 +294,7 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
<p>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: "signUp.termsAndConditionsDescription",
|
||||
defaultMessage:
|
||||
"By accepting the <termsAndConditionsLink>Terms and Conditions for Scandic Friends</termsAndConditionsLink> I understand that my personal data will be processed in accordance with <privacyPolicy>Scandic's Privacy Policy</privacyPolicy>.",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user