From fe415d375458a1a7372198364172590f1542d204 Mon Sep 17 00:00:00 2001 From: Steven Partridge Date: Fri, 27 Sep 2024 18:12:39 -0700 Subject: [PATCH] Different message for already registered domain, need to figure out the cart problem --- .../domains/register-domain-step/index.jsx | 10 +++++++-- client/lib/domains/constants.js | 1 + .../registration/availability-messages.js | 22 +++++++------------ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/client/components/domains/register-domain-step/index.jsx b/client/components/domains/register-domain-step/index.jsx index 4bc61dd6a42a30..a4d6b6d151c901 100644 --- a/client/components/domains/register-domain-step/index.jsx +++ b/client/components/domains/register-domain-step/index.jsx @@ -1084,13 +1084,18 @@ class RegisterDomainStep extends Component { MAPPED, MAPPED_SAME_SITE_TRANSFERRABLE, MAPPED_OTHER_SITE_SAME_USER_REGISTRABLE, + MAPPED_SAME_SITE_REGISTRABLE, TRANSFERRABLE, TRANSFERRABLE_PREMIUM, UNKNOWN, REGISTERED_OTHER_SITE_SAME_USER, } = domainAvailability; - const availableDomainStatuses = [ AVAILABLE, UNKNOWN ]; + const availableDomainStatuses = [ + AVAILABLE, + UNKNOWN, + MAPPED_OTHER_SITE_SAME_USER_REGISTRABLE, + ]; if ( error ) { resolve( null ); @@ -1122,7 +1127,8 @@ class RegisterDomainStep extends Component { if ( isDomainMapped && status !== REGISTERED_OTHER_SITE_SAME_USER && - status !== MAPPED_OTHER_SITE_SAME_USER_REGISTRABLE + status !== MAPPED_OTHER_SITE_SAME_USER_REGISTRABLE && + status !== MAPPED_SAME_SITE_REGISTRABLE ) { availabilityStatus = mappable; } diff --git a/client/lib/domains/constants.js b/client/lib/domains/constants.js index df236ee71d050b..cc5139735f6ffb 100644 --- a/client/lib/domains/constants.js +++ b/client/lib/domains/constants.js @@ -47,6 +47,7 @@ export const domainAvailability = { MAPPED_OTHER_SITE_SAME_USER_REGISTRABLE: 'mapped_to_other_site_same_user_registrable', MAPPED_SAME_SITE_NOT_TRANSFERRABLE: 'mapped_to_same_site_not_transferrable', MAPPED_SAME_SITE_TRANSFERRABLE: 'mapped_to_same_site_transferrable', + MAPPED_SAME_SITE_REGISTRABLE: 'mapped_to_same_site_registrable', NOT_AVAILABLE: 'not_available', NOT_REGISTRABLE: 'available_but_not_registrable', PURCHASES_DISABLED: 'domain_registration_unavailable', diff --git a/client/lib/domains/registration/availability-messages.js b/client/lib/domains/registration/availability-messages.js index 7978c6e0bf7670..10c2fc4b6d0c2e 100644 --- a/client/lib/domains/registration/availability-messages.js +++ b/client/lib/domains/registration/availability-messages.js @@ -219,7 +219,7 @@ function getAvailabilityNotice( break; case domainAvailability.MAPPED_OTHER_SITE_SAME_USER: message = translate( - '{{strong}}%(domain)s{{/strong}} is already connected to your site %(site)s. If you want to connect it to this site ' + + '{{strong}}%(domain)s{{/strong}} is already connected to your site %(site). If you want to connect it to this site ' + 'instead, we will be happy to help you do that. {{a}}Contact us.{{/a}}', { args: { domain, site }, @@ -230,28 +230,22 @@ function getAvailabilityNotice( } ); break; - case domainAvailability.MAPPED_OTHER_SITE_SAME_USER_REGISTRABLE: + case domainAvailability.MAPPED_SAME_SITE_REGISTRABLE: message = translate( - '{{strong}}%(domain)s{{/strong}} is already connected to your site %(site)s.' + - ' {{a}}Register it to the connected site.{{/a}}', + '{{strong}}%(domain)s{{/strong}} is already connected to your site %(site)s and also available for registration.', { args: { domain, site }, components: { strong: , - a: ( - - ), + a: , }, } ); break; - case domainAvailability.MAPPED_OTHER_SITES_SAME_USER_REGISTRABLE: + case domainAvailability.MAPPED_OTHER_SITE_SAME_USER_REGISTRABLE: message = translate( - '{{strong}}%(domain)s{{/strong}} is already connected to your site %(site)s. {{a}}Register it via the connected site here.{{/a}}', + '{{strong}}%(domain)s{{/strong}} is already connected to your site %(site).' + + ' {{a}}Register it to the connected site.{{/a}}', { args: { domain, site }, components: { @@ -650,7 +644,7 @@ function getAvailabilityNotice( default: message = translate( - 'HAHAHAHAHAH Sorry, there was a problem processing your request. Please try again in a few minutes.' + 'Sorry, there was a problem processing your request. Please try again in a few minutes.' ); }