Skip to content

Conversation

@Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Oct 28, 2025

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Dynamically labels the KYC state field as "State" for US users (using Redux country code) and adds the corresponding locale string.

  • Frontend (Ramp KYC Form):
    • Dynamically sets the state field label based on state.ui.settings.countryCode (US => lstrings.form_field_title_address_state, otherwise lstrings.form_field_title_address_state_province_region).
    • Uses useSelector to read the country code; updates field label accordingly.
  • Localization:
    • Adds en string form_field_title_address_state: "State".

Written by Cursor Bugbot for commit eec9c1d. This will update automatically on new commits. Configure here.


const stateFieldLabel =
countryCode === 'US'
? lstrings.form_field_title_address_state
: lstrings.form_field_title_address_state_province_region
Copy link

Choose a reason for hiding this comment

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

Bug: Missing Localized String for State Field

The code uses lstrings.form_field_title_address_state for US users, but this string key only exists in English locale files (en_US.ts and enUS.json). When a US user accesses this form with a non-English language setting, the string key will be undefined in those locale files (e.g., de.json, es.json), causing the field label to display as undefined or cause an error. The string key needs to be added to all supported locale files, or a fallback should be implemented.

Fix in Cursor Fix in Web

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.

3 participants