From 09b701204f340059d952dcbf8695e43a2a133d82 Mon Sep 17 00:00:00 2001 From: Nick Misasi Date: Mon, 22 Jan 2024 14:56:01 -0500 Subject: [PATCH] [CLD-6487] Replace 'Country' with 'Country/Region' in country selectors (#25977) * Replace 'Country' with 'Country/Region' in countr selectors * Fix linteR * Update snapshots --- webapp/channels/src/actions/cloud.tsx | 3 +-- .../src/components/payment_form/country_selector.tsx | 4 ++-- .../__snapshots__/start_trial_form_modal.test.tsx.snap | 2 +- webapp/channels/src/i18n/en.json | 2 +- webapp/channels/src/utils/countries.ts | 7 ++++++- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/webapp/channels/src/actions/cloud.tsx b/webapp/channels/src/actions/cloud.tsx index c4582f0f68..5c0fe8cf3e 100644 --- a/webapp/channels/src/actions/cloud.tsx +++ b/webapp/channels/src/actions/cloud.tsx @@ -2,7 +2,6 @@ // See LICENSE.txt for license information. import type {Stripe} from '@stripe/stripe-js'; -import {getCode} from 'country-list'; import type {Address, CloudCustomerPatch, Feedback, WorkspaceDeletionRequest} from '@mattermost/types/cloud'; @@ -48,7 +47,7 @@ export function completeStripeAddPaymentMethod( line2: billingDetails.address2, city: billingDetails.city, state: billingDetails.state, - country: getCode(billingDetails.country), + country: billingDetails.country, postal_code: billingDetails.postalCode, }, }, diff --git a/webapp/channels/src/components/payment_form/country_selector.tsx b/webapp/channels/src/components/payment_form/country_selector.tsx index 8d5ba25200..abf1c17980 100644 --- a/webapp/channels/src/components/payment_form/country_selector.tsx +++ b/webapp/channels/src/components/payment_form/country_selector.tsx @@ -29,11 +29,11 @@ const CountrySelector = (props: CountrySelectorProps) => { }))} legend={formatMessage({ id: 'payment_form.country', - defaultMessage: 'Country', + defaultMessage: 'Country/Region', })} placeholder={formatMessage({ id: 'payment_form.country', - defaultMessage: 'Country', + defaultMessage: 'Country/Region', })} name={'country_dropdown'} /> diff --git a/webapp/channels/src/components/start_trial_form_modal/__snapshots__/start_trial_form_modal.test.tsx.snap b/webapp/channels/src/components/start_trial_form_modal/__snapshots__/start_trial_form_modal.test.tsx.snap index 68e268327e..d7a24da305 100644 --- a/webapp/channels/src/components/start_trial_form_modal/__snapshots__/start_trial_form_modal.test.tsx.snap +++ b/webapp/channels/src/components/start_trial_form_modal/__snapshots__/start_trial_form_modal.test.tsx.snap @@ -252,7 +252,7 @@ Object {
(a.name > b.name ? 1 : -1));