Skip to content

fix: added locales that are required for validation functions#1591

Closed
Shivam25092001 wants to merge 11 commits into
feat-superposition-dynamic-fields-cleanfrom
fix-superposition-validation-locales
Closed

fix: added locales that are required for validation functions#1591
Shivam25092001 wants to merge 11 commits into
feat-superposition-dynamic-fields-cleanfrom
fix-superposition-validation-locales

Conversation

@Shivam25092001

@Shivam25092001 Shivam25092001 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

How did you test it?

image

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@semanticdiff-com

semanticdiff-com Bot commented May 26, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  package-lock.json  0% smaller
  package.json  0% smaller
  shared-code  0% smaller
  src/App.res Unsupported file format
  src/Components/CryptoCurrencyNetworks.res Unsupported file format
  src/Components/DynamicFieldInput.res Unsupported file format
  src/Components/DynamicFields.res Unsupported file format
  src/Components/DynamicFields/CardHolderNameField.res Unsupported file format
  src/Components/DynamicFields/CountryDropdownField.res Unsupported file format
  src/Components/DynamicFields/EmailField.res Unsupported file format
  src/Components/DynamicFields/GenericDropdownField.res Unsupported file format
  src/Components/DynamicFields/PhoneCountryCodeDropdownField.res Unsupported file format
  src/Components/DynamicFields/PhoneField.res Unsupported file format
  src/Components/DynamicFields/StateDropdownField.res Unsupported file format
  src/LoaderController.res Unsupported file format
  src/LocaleStrings/ArabicLocale.res Unsupported file format
  src/LocaleStrings/CatalanLocale.res Unsupported file format
  src/LocaleStrings/ChineseLocale.res Unsupported file format
  src/LocaleStrings/DeutschLocale.res Unsupported file format
  src/LocaleStrings/DutchLocale.res Unsupported file format
  src/LocaleStrings/EnglishGBLocale.res Unsupported file format
  src/LocaleStrings/EnglishLocale.res Unsupported file format
  src/LocaleStrings/FrenchBelgiumLocale.res Unsupported file format
  src/LocaleStrings/FrenchLocale.res Unsupported file format
  src/LocaleStrings/HebrewLocale.res Unsupported file format
  src/LocaleStrings/ItalianLocale.res Unsupported file format
  src/LocaleStrings/JapaneseLocale.res Unsupported file format
  src/LocaleStrings/LocaleStringTypes.res Unsupported file format
  src/LocaleStrings/PolishLocale.res Unsupported file format
  src/LocaleStrings/PortugueseLocale.res Unsupported file format
  src/LocaleStrings/RussianLocale.res Unsupported file format
  src/LocaleStrings/SpanishLocale.res Unsupported file format
  src/LocaleStrings/SwedishLocale.res Unsupported file format
  src/LocaleStrings/TraditionalChineseLocale.res Unsupported file format
  src/Payments/DateOfBirth.res Unsupported file format
  src/Payments/PazeButton.res Unsupported file format
  src/Payments/PreMountLoader.res Unsupported file format
  src/Types/HyperLoggerTypes.res Unsupported file format
  src/Utilities/APIHelpers/APIUtils.res Unsupported file format
  src/Utilities/DynamicFieldsUtils.res Unsupported file format
  src/Utilities/LoggerUtils.res Unsupported file format
  src/Utilities/PaymentHelpers.res Unsupported file format
  src/Utilities/RecoilAtoms.res Unsupported file format
  src/Utilities/Utils.res Unsupported file format
  src/hyper-loader/Elements.res Unsupported file format
  src/hyper-loader/Hyper.res Unsupported file format
  src/hyper-loader/PaymentSession.res Unsupported file format
  src/hyper-loader/UpdateIntentHelpersNew.res Unsupported file format

@github-actions

Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 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

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

@github-actions

Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 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

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

@XyneSpaces XyneSpaces left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

⚠️ Typo in Swedish locale

The Swedish translation for cardHolderNameRequiredText appears to contain Dutch text instead of Swedish:

cardHolderNameRequiredText: `Naam van de kaarthouder vereist`, // This is Dutch, not Swedish

Should 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.res type definition
  • Add toValidationLocale conversion function for proper type safety
  • Update DynamicFieldsUtils.res to use the typed conversion instead of Obj.magic
  • Provide translations for all 17 supported locales

Verdict

approve with minor translation correction needed for Swedish.

@Shivam25092001 Shivam25092001 force-pushed the feat-superposition-dynamic-fields branch 2 times, most recently from 1f71111 to 5349296 Compare June 14, 2026 11:54
@Shivam25092001 Shivam25092001 changed the base branch from feat-superposition-dynamic-fields to feat-superposition-dynamic-fields-clean June 14, 2026 12:34
@Shivam25092001

Copy link
Copy Markdown
Contributor Author

Replaced with PR: #1609 due to unclear commit history and unresolvable conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants