fix: added locales that are required for validation functions#1591
fix: added locales that are required for validation functions#1591Shivam25092001 wants to merge 11 commits into
Conversation
… feat-sdk-config-api
…itch-web into feat-sdk-config-api
🚫 Missing Linked IssueHi 👋 This pull request does not appear to be linked to any open issue yet. Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically. ✔️ How to fix this
Once linked, this check will pass automatically on your next push or when you re-run the workflow. Thanks for helping maintainers! 🙌 |
🚫 Missing Linked IssueHi 👋 This pull request does not appear to be linked to any open issue yet. Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically. ✔️ How to fix this
Once linked, this check will pass automatically on your next push or when you re-run the workflow. Thanks for helping maintainers! 🙌 |
XyneSpaces
left a comment
There was a problem hiding this comment.
Automated Code Review
Summary
This PR adds missing locale strings for validation error messages (cardHolderNameRequiredText and lastNameRequiredText) across all supported languages. It also introduces a proper type-safe conversion function toValidationLocale to connect web locale strings to the validation system.
Findings
The Swedish translation for cardHolderNameRequiredText appears to contain Dutch text instead of Swedish:
cardHolderNameRequiredText: `Naam van de kaarthouder vereist`, // This is Dutch, not SwedishShould be something like: Kortinnehavarens namn krävs
File: src/LocaleStrings/SwedishLocale.res
💡 Consider casing consistency
Looking at the English locale:
cardHolderNameRequiredText: "Card Holder's name required"(sentence case)lastNameRequiredText: "Last Name Required"(title case)
Consider standardizing the casing pattern for consistency.
File: src/LocaleStrings/EnglishLocale.res
No blocking issues found. The changes correctly:
- Add the missing locale fields to
LocaleStringTypes.restype definition - Add
toValidationLocaleconversion function for proper type safety - Update
DynamicFieldsUtils.resto use the typed conversion instead ofObj.magic - Provide translations for all 17 supported locales
Verdict
approve with minor translation correction needed for Swedish.
1f71111 to
5349296
Compare
|
Replaced with PR: #1609 due to unclear commit history and unresolvable conflicts |
Type of Change
Description
How did you test it?
Checklist
npm run re:build