Skip to content

Commit

Permalink
Onboarding/Domains: Use segment specific copy for transfer/mapping su…
Browse files Browse the repository at this point in the history
…bheader
  • Loading branch information
spen committed May 31, 2019
1 parent 560b2e1 commit 89fec6f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 6 additions & 0 deletions client/lib/signup/site-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const getSiteTypePropertyDefaults = propertyKey =>
domainsStepSubheader: i18n.translate(
'Enter a keyword that describes your site to get started.'
),
domainsStepTransferringSubheader: i18n.translate(
'Use a domain you already own with your new WordPress.com site.'
),
// Site styles step
siteStyleSubheader: i18n.translate(
'This will help you get started with a theme you might like. You can change it later.'
Expand Down Expand Up @@ -98,6 +101,9 @@ export function getAllSiteTypes() {
domainsStepSubheader: i18n.translate(
"Enter your blog's name or some keywords that describe it to get started."
),
domainsStepTransferringSubheader: i18n.translate(
'Use a domain you already own with your new WordPress.com blog.'
),
},
{
id: 1, // This value must correspond with its sibling in the /segments API results
Expand Down
14 changes: 4 additions & 10 deletions client/signup/steps/domains/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -519,17 +519,11 @@ class DomainsStep extends React.Component {
};

getSubHeaderText() {
const { siteType, translate } = this.props;
const onboardingSubHeaderCopy =
siteType && getSiteTypePropertyValue( 'slug', siteType, 'domainsStepSubheader' );
const { siteType, stepSectionName } = this.props;

if ( onboardingSubHeaderCopy ) {
return onboardingSubHeaderCopy;
}

return 'transfer' === this.props.stepSectionName || 'mapping' === this.props.stepSectionName
? translate( 'Use a domain you already own with your new WordPress.com site.' )
: translate( "Enter your site's name or some keywords that describe it to get started." );
return 'transfer' === stepSectionName || 'mapping' === stepSectionName
? getSiteTypePropertyValue( 'slug', siteType, 'domainsStepTransferringSubheader' )
: getSiteTypePropertyValue( 'slug', siteType, 'domainsStepSubheader' );
}

getHeaderText() {
Expand Down

0 comments on commit 89fec6f

Please sign in to comment.