Skip to content

Commit

Permalink
Different message for already registered domain, need to figure out t…
Browse files Browse the repository at this point in the history
…he cart problem
  • Loading branch information
Steven Partridge committed Sep 30, 2024
1 parent efd1b0c commit fe415d3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
10 changes: 8 additions & 2 deletions client/components/domains/register-domain-step/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions client/lib/domains/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
22 changes: 8 additions & 14 deletions client/lib/domains/registration/availability-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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: <strong />,
a: (
<a
target={ linksTarget }
rel="noopener noreferrer"
href={ domainAddNew( site, domain ) }
/>
),
a: <a target={ linksTarget } rel="noopener noreferrer" href={ CALYPSO_CONTACT } />,
},
}
);
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: {
Expand Down Expand Up @@ -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.'
);
}

Expand Down

0 comments on commit fe415d3

Please sign in to comment.