@@ -2,7 +2,7 @@ import { isEnabled } from '@automattic/calypso-config';
2
2
import { PLAN_PERSONAL } from '@automattic/calypso-products' ;
3
3
import { OnboardSelect , ProductsList } from '@automattic/data-stores' ;
4
4
import { themesIllustrationImage } from '@automattic/design-picker' ;
5
- import { localizeUrl } from '@automattic/i18n-utils' ;
5
+ import { localizeUrl , useHasEnTranslation } from '@automattic/i18n-utils' ;
6
6
import { StepContainer , isOnboardingFlow } from '@automattic/onboarding' ;
7
7
import { useSelect } from '@wordpress/data' ;
8
8
import clsx from 'clsx' ;
@@ -32,6 +32,7 @@ const DesignChoicesStep: Step = ( { navigation, flow, stepName } ) => {
32
32
isOnboardingFlow ( flow ) && isEnabled ( 'onboarding/big-sky-before-plans' ) ;
33
33
34
34
const translate = useTranslate ( ) ;
35
+ const hasEnTranslation = useHasEnTranslation ( ) ;
35
36
const { submit, goBack } = navigation ;
36
37
const headerText = isGoalsFirstVariation
37
38
? translate ( 'How would you like to start?' )
@@ -75,6 +76,28 @@ const DesignChoicesStep: Step = ( { navigation, flow, stepName } ) => {
75
76
submit ?.( { destination } ) ;
76
77
} ;
77
78
79
+ const getCreateWithAILabel = ( ) => {
80
+ if ( hasEnTranslation ( 'Create with AI {{small}}(BETA){{/small}}' ) ) {
81
+ return translate ( 'Create with AI {{small}}(BETA){{/small}}' , {
82
+ components : {
83
+ small : < span className = "design-choices__beta-label" /> ,
84
+ } ,
85
+ } ) ;
86
+ }
87
+
88
+ if ( hasEnTranslation ( 'Create with AI' ) ) {
89
+ return translate ( '%s {{small}}(BETA){{/small}}' , {
90
+ args : [ translate ( 'Create with AI' ) ] ,
91
+ components : {
92
+ small : < span className = "design-choices__beta-label" /> ,
93
+ } ,
94
+ comment : 'Do not translate' ,
95
+ } ) ;
96
+ }
97
+
98
+ return translate ( 'Create with AI (BETA)' ) ;
99
+ } ;
100
+
78
101
const bigSkyBadgeLabel =
79
102
! isLoading && isEligible && personalProduct ?. cost_per_month_display && isGoalsFirstVariation
80
103
? translate ( 'Starting at %(price)s a month' , {
@@ -160,7 +183,8 @@ const DesignChoicesStep: Step = ( { navigation, flow, stepName } ) => {
160
183
) }
161
184
{ ! isLoading && isEligible && isGoalsFirstVariation && (
162
185
< GoalsFirstDesignChoice
163
- title = { translate ( 'Create with AI (BETA)' ) }
186
+ title = { getCreateWithAILabel ( ) }
187
+ ariaLabel = { translate ( 'Create with AI (BETA)' ) }
164
188
description = { translate (
165
189
'Use our AI website builder to easily and quickly build the site of your dreams.'
166
190
) }
0 commit comments