Skip to content

Commit eec9c1d

Browse files
committed
Rename "Province" label to "State" for US
1 parent d35c616 commit eec9c1d

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/components/scenes/RampKycFormScene.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useHandler } from '../../hooks/useHandler'
55
import { lstrings } from '../../locales/strings'
66
import { GuiFormField } from '../../plugins/gui/components/GuiFormField'
77
import { GuiFormRow } from '../../plugins/gui/components/GuiFormRow'
8+
import { useSelector } from '../../types/reactRedux'
89
import type { BuySellTabSceneProps } from '../../types/routerTypes'
910
import { ErrorCard } from '../cards/ErrorCard'
1011
import { SceneWrapper } from '../common/SceneWrapper'
@@ -59,6 +60,12 @@ export const RampKycFormScene = React.memo((props: Props) => {
5960
onCancel
6061
} = params
6162

63+
const countryCode = useSelector(state => state.ui.settings.countryCode)
64+
const stateFieldLabel =
65+
countryCode === 'US'
66+
? lstrings.form_field_title_address_state
67+
: lstrings.form_field_title_address_state_province_region
68+
6269
const [firstName, setFirstName] = React.useState(initialFirstName)
6370
const [lastName, setLastName] = React.useState(initialLastName)
6471
const [email, setEmail] = React.useState(initialEmail)
@@ -231,7 +238,7 @@ export const RampKycFormScene = React.memo((props: Props) => {
231238
<GuiFormField
232239
fieldType="state"
233240
value={state}
234-
label={lstrings.form_field_title_address_state_province_region}
241+
label={stateFieldLabel}
235242
onChangeText={handleStateInput}
236243
onSubmitEditing={handleStateSubmit}
237244
returnKeyType="next"

src/locales/en_US.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,6 +1825,7 @@ const strings = {
18251825
form_field_title_street_name: 'Street Name',
18261826
form_field_title_apt_unit_number: 'Apt/Unit # (optional)',
18271827
form_field_title_address_state_province_region: 'Province',
1828+
form_field_title_address_state: 'State',
18281829
form_field_title_address_zip_postal_code: 'Postal Code/Zip',
18291830
form_field_title_email_address: 'Email Address',
18301831
form_field_title_first_name: 'First Name',

src/locales/strings/enUS.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,6 +1414,7 @@
14141414
"form_field_title_street_name": "Street Name",
14151415
"form_field_title_apt_unit_number": "Apt/Unit # (optional)",
14161416
"form_field_title_address_state_province_region": "Province",
1417+
"form_field_title_address_state": "State",
14171418
"form_field_title_address_zip_postal_code": "Postal Code/Zip",
14181419
"form_field_title_email_address": "Email Address",
14191420
"form_field_title_first_name": "First Name",

0 commit comments

Comments
 (0)