Skip to content

Commit a38e6f9

Browse files
committed
update copy in ai introduction modal for products
1 parent 8b69ca7 commit a38e6f9

File tree

1 file changed

+47
-24
lines changed

1 file changed

+47
-24
lines changed

packages/js/src/shared-admin/components/ai-generate-titles-and-descriptions-upsell.js

Lines changed: 47 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ export const AiGenerateTitlesAndDescriptionsUpsell = ( { learnMoreLink, thumbnai
2121
const upsellLinkWooPremiumBundle = useSelect( select => select( STORE ).selectLink( "https://yoa.st/ai-generator-upsell-woo-seo-premium-bundle" ), [] );
2222
const upsellLinkWoo = useSelect( select => select( STORE ).selectLink( "https://yoa.st/ai-generator-upsell-woo-seo" ), [] );
2323
let upsellLink = upsellLinkPremium;
24+
let newToText = sprintf(
25+
/* translators: %1$s expands to Yoast SEO Premium. */
26+
__( "New to %1$s", "wordpress-seo" ),
27+
"Yoast SEO Premium"
28+
);
29+
const learnMoreLinkStructure = {
30+
// eslint-disable-next-line jsx-a11y/anchor-has-content
31+
a: <OutboundLink
32+
href={ learnMoreLink }
33+
className="yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium"
34+
variant="primary"
35+
/>,
36+
ArrowNarrowRightIcon: <ArrowNarrowRightIcon className="yst-w-4 yst-h-4 rtl:yst-rotate-180" />,
37+
};
2438

2539
const isPremium = useSelect( select => select( STORE ).getIsPremium(), [] );
2640
const isWooSeoUpsell = useSelect( select => select( STORE ).getIsWooSeoUpsell(), [] );
@@ -30,21 +44,29 @@ export const AiGenerateTitlesAndDescriptionsUpsell = ( { learnMoreLink, thumbnai
3044
"Yoast SEO Premium"
3145
);
3246
let bundleNote = "";
47+
let title = __( "Generate titles & descriptions with Yoast AI!", "wordpress-seo" );
3348

3449
if ( isWooSeoUpsell ) {
50+
const upsellPremiumWooLabel = sprintf(
51+
/* translators: %1$s expands to Yoast SEO Premium, %2$s expands to Yoast WooCommerce SEO. */
52+
__( "%1$s + %2$s", "wordpress-seo" ),
53+
"Yoast SEO Premium",
54+
"Yoast WooCommerce SEO"
55+
);
56+
newToText = sprintf(
57+
/* translators: %1$s expands to Yoast SEO Premium and Yoast WooCommerce SEO. */
58+
__( "New to %1$s", "wordpress-seo" ),
59+
upsellPremiumWooLabel
60+
);
61+
title = __( "Generate product titles & descriptions with AI!", "wordpress-seo" );
3562
if ( ! isPremium ) {
3663
upsellLabel = `${sprintf(
3764
/* translators: %1$s expands to Woo Premium bundle. */
3865
__( "Unlock with the %1$s", "wordpress-seo" ),
3966
"Woo Premium bundle"
4067
)}*`;
4168
bundleNote = <div className="yst-text-xs yst-text-slate-500 yst-mt-2">
42-
{ `*${sprintf(
43-
/* translators: %1$s expands to Yoast SEO Premium, %2$s expands to Yoast WooCommerce SEO. */
44-
__( "%1$s + %2$s", "wordpress-seo" ),
45-
"Yoast SEO Premium",
46-
"Yoast WooCommerce SEO"
47-
)}` }
69+
{ `*${upsellPremiumWooLabel}` }
4870
</div>;
4971
upsellLink = upsellLinkWooPremiumBundle;
5072
}
@@ -70,41 +92,42 @@ export const AiGenerateTitlesAndDescriptionsUpsell = ( { learnMoreLink, thumbnai
7092
</div>
7193
<div className="yst-mt-6 yst-text-xs yst-font-medium">
7294
<span className="yst-introduction-modal-uppercase">
73-
{ sprintf(
74-
/* translators: %1$s expands to Yoast SEO Premium. */
75-
__( "New to %1$s", "wordpress-seo" ),
76-
"Yoast SEO Premium"
77-
) }
95+
{ newToText }
7896
</span>
7997
&nbsp;
8098
<span className="yst-uppercase yst-text-slate-700">21.0</span>
8199
</div>
82100
<div className="yst-mt-4 yst-mx-1.5 yst-text-center">
83101
<h3 className="yst-text-slate-900 yst-text-lg yst-font-medium">
84-
{ __( "Generate titles & descriptions with Yoast AI!", "wordpress-seo" ) }
102+
{ title }
85103
</h3>
86104
<div className="yst-mt-2 yst-text-slate-600 yst-text-sm">
87-
{ createInterpolateElement(
105+
{ isWooSeoUpsell ? createInterpolateElement(
88106
sprintf(
89107
/* translators: %1$s and %2$s are anchor tag; %3$s is the arrow icon. */
90108
__(
91-
"Speed up your workflow with generative AI. Get high-quality title and description suggestions for your search and social appearance. %1$sLearn more%2$s%3$s",
109+
"Speed up your workflow with generative AI. Get high-quality product title and description suggestions for your search and social appearance. %1$sLearn more%2$s%3$s",
92110
"wordpress-seo"
93111
),
94112
"<a>",
95113
"<ArrowNarrowRightIcon />",
96114
"</a>"
97115
),
98-
{
99-
// eslint-disable-next-line jsx-a11y/anchor-has-content
100-
a: <OutboundLink
101-
href={ learnMoreLink }
102-
className="yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium"
103-
variant="primary"
104-
/>,
105-
ArrowNarrowRightIcon: <ArrowNarrowRightIcon className="yst-w-4 yst-h-4 rtl:yst-rotate-180" />,
106-
}
107-
) }
116+
learnMoreLinkStructure
117+
)
118+
: createInterpolateElement(
119+
sprintf(
120+
/* translators: %1$s and %2$s are anchor tag; %3$s is the arrow icon. */
121+
__(
122+
"Speed up your workflow with generative AI. Get high-quality title and description suggestions for your search and social appearance. %1$sLearn more%2$s%3$s",
123+
"wordpress-seo"
124+
),
125+
"<a>",
126+
"<ArrowNarrowRightIcon />",
127+
"</a>"
128+
),
129+
learnMoreLinkStructure
130+
) }
108131
</div>
109132
</div>
110133
<div className="yst-w-full yst-flex yst-mt-10">

0 commit comments

Comments
 (0)