Skip to content

Commit

Permalink
Translate error message on Admin - Transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
ani-kalpachka committed Jul 2, 2024
1 parent 0b82795 commit 4a82d5e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion public/locales/bg/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"unique-field-violation": "Полето `{1}` със тази стойност вече съществува в платформата.",
"payment-reference": "Невалиден формат на кода за плащане",
"eik-invalid": "Невалидно ЕИК",
"help-us-improve": "Съгласявам се да се свържете с мен за подобрение на платформата."
"help-us-improve": "Съгласявам се да се свържете с мен за подобрение на платформата.",
"positive-amount": "Сумата трябва да е положително число."
}
3 changes: 2 additions & 1 deletion public/locales/en/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"unique-field-violation": "The field `{1}` with this value already exists in the platform.",
"payment-reference": "Invalid payment code format",
"eik-invalid": "Invalid EIK",
"help-us-improve": "I agree to be contacted to help improve the platform."
"help-us-improve": "I agree to be contacted to help improve the platform.",
"positive-amount": "The amount must be a positive number."
}
2 changes: 1 addition & 1 deletion src/components/admin/transfers/CreateForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function CreateForm({ campaigns }: Props) {
return value ? value < Number(fromMoney(currentAmount)) : false
},
}),
otherwise: yup.number().positive().integer().required(),
otherwise: yup.number().positive('validation:positive-amount').integer().required(),
}),
reason: yup.string().trim().min(1).max(300).required(),
documentId: yup.string().uuid().notRequired().nullable(),
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/form/AcceptPrivacyPolicyField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function AcceptPrivacyPolicyField({ name }: AcceptGDPRFieldProps)
label={
<Typography variant="body2">
{t('validation:informed-agree-with')}{' '}
<ExternalLink href={routes.privacyPolicy}>{t('validation:gdpr')}</ExternalLink>.
<ExternalLink href={routes.privacyPolicy}>{t('validation:gdpr')}</ExternalLink>
</Typography>
}
/>
Expand Down

0 comments on commit 4a82d5e

Please sign in to comment.