fix: replaced apostrophes for WooCommerce Admin JS strings in Homescreen & Core Profiler (#50776)

This commit is contained in:
RJ 2024-08-20 17:13:17 +08:00 committed by GitHub
parent 6a59fbc111
commit d7682504d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
38 changed files with 74 additions and 70 deletions

View File

@ -90,7 +90,7 @@ export const selectIndustryMapping = {
'woocommerce'
),
im_setting_up_a_store_for_a_client: __(
"Which industry is your client's business in?",
'Which industry is your clients business in?',
'woocommerce'
),
};
@ -238,7 +238,7 @@ export const BusinessInfo = ( {
'woocommerce'
) }
subTitle={ __(
"We'll use this information to help you set up payments, shipping, and taxes, as well as recommending the best theme for your store.",
'Well use this information to help you set up payments, shipping, and taxes, as well as recommending the best theme for your store.',
'woocommerce'
) }
/>
@ -268,7 +268,7 @@ export const BusinessInfo = ( {
/>
<p className="woocommerce-profiler-question-subtext">
{ __(
"Don't worry — you can always change it later!",
'Dont worry — you can always change it later!',
'woocommerce'
) }
</p>
@ -390,7 +390,7 @@ export const BusinessInfo = ( {
{ createInterpolateElement(
__(
// translators: first tag is filled with the country name detected by geolocation, second tag is the country name selected by the user
"It looks like you're located in <geolocatedCountry></geolocatedCountry>. Are you sure you want to create a store in <selectedCountry></selectedCountry>?",
'It looks like youre located in <geolocatedCountry></geolocatedCountry>. Are you sure you want to create a store in <selectedCountry></selectedCountry>?',
'woocommerce'
),
{

View File

@ -45,7 +45,7 @@ export const BusinessLocation = ( {
'woocommerce'
) }
subTitle={ __(
"We'll use this information to help you set up payments, shipping, and taxes.",
'Well use this information to help you set up payments, shipping, and taxes.',
'woocommerce'
) }
/>

View File

@ -45,7 +45,7 @@ export const IntroOptIn = ( {
title={ __( 'Welcome to Woo!', 'woocommerce' ) }
subTitle={ interpolateComponents( {
mixedString: __(
"It's great to have you here with us! We'll be guiding you through the setup process first, answer a few questions to tailor your experience.",
'Its great to have you here with us! Well be guiding you through the setup process first, answer a few questions to tailor your experience.',
'woocommerce'
),
components: {

View File

@ -20,32 +20,32 @@ import { MultipleSelector } from '../components/multiple-selector/multiple-selec
const businessOptions = [
{
title: __( "I'm just starting my business", 'woocommerce' ),
title: __( 'Im just starting my business', 'woocommerce' ),
value: 'im_just_starting_my_business' as const,
},
{
title: __( "I'm already selling", 'woocommerce' ),
title: __( 'Im already selling', 'woocommerce' ),
value: 'im_already_selling' as const,
},
{
title: __( "I'm setting up a store for a client", 'woocommerce' ),
title: __( 'Im setting up a store for a client', 'woocommerce' ),
value: 'im_setting_up_a_store_for_a_client' as const,
},
];
const sellingOnlineOptions = [
{
label: __( "Yes, I'm selling online", 'woocommerce' ),
label: __( 'Yes, Im selling online', 'woocommerce' ),
value: 'yes_im_selling_online' as const,
key: 'yes_im_selling_online' as const,
},
{
label: __( "No, I'm selling offline", 'woocommerce' ),
label: __( 'No, Im selling offline', 'woocommerce' ),
value: 'no_im_selling_offline' as const,
key: 'no_im_selling_offline' as const,
},
{
label: __( "I'm selling both online and offline", 'woocommerce' ),
label: __( 'Im selling both online and offline', 'woocommerce' ),
value: 'im_selling_both_online_and_offline' as const,
key: 'im_selling_both_online_and_offline' as const,
},

View File

@ -94,7 +94,7 @@ describe( 'BusinessInfo', () => {
'im_setting_up_a_store_for_a_client';
render( <BusinessInfo { ...props } /> );
expect(
screen.getByText( /Which industry is your client's business in?/i )
screen.getByText( /Which industry is your clients business in?/i )
).toBeInTheDocument();
} );

View File

@ -50,7 +50,7 @@ describe( 'UserProfile', () => {
// @ts-ignore
render( <UserProfile { ...props } /> );
const radioInput = screen.getByLabelText< HTMLInputElement >(
"I'm already selling"
'Im already selling'
); // Replace with the label of your radio button
// Perform the radio button selection
@ -65,7 +65,7 @@ describe( 'UserProfile', () => {
expect( onlineSellingQuestion ).toBeInTheDocument();
} );
it( 'should show online selling question when choosing "Yes, I\'m selling online"', () => {
it( 'should show online selling question when choosing "Yes, Im selling online"', () => {
render(
// @ts-ignore
<UserProfile

View File

@ -28,7 +28,7 @@ const LightbulbStage = {
],
};
const LayoutStage = {
title: __( "Extending your store's capabilities", 'woocommerce' ),
title: __( 'Extending your stores capabilities', 'woocommerce' ),
image: <img src={ LayoutImage } alt="loader-lightbulb" />,
paragraphs: [
{
@ -42,7 +42,7 @@ const LayoutStage = {
};
const DevelopingStage = {
title: __( "Woo! Let's get your features ready", 'woocommerce' ),
title: __( 'Woo! Lets get your features ready', 'woocommerce' ),
image: <img src={ DevelopingImage } alt="loader-developng" />,
paragraphs: [
{

View File

@ -137,7 +137,7 @@ class CartModal extends Component {
<p className="woocommerce-cart-modal__help-text">
{ __(
"You won't have access to this functionality until the extensions have been purchased and installed.",
'You wont have access to this functionality until the extensions have been purchased and installed.',
'woocommerce'
) }
</p>
@ -148,7 +148,7 @@ class CartModal extends Component {
isBusy={ purchaseLaterButtonBusy }
onClick={ () => this.onClickPurchaseLater() }
>
{ __( "I'll do it later", 'woocommerce' ) }
{ __( 'Ill do it later', 'woocommerce' ) }
</Button>
<Button

View File

@ -76,7 +76,7 @@ export class ErrorBoundary extends Component<
</h1>
<p className="woocommerce-global-error-boundary__subheading">
{ __(
"We're sorry for the inconvenience. Please try reloading the page, or you can get support from the community forums.",
'Were sorry for the inconvenience. Please try reloading the page, or you can get support from the community forums.',
'woocommerce'
) }
</p>

View File

@ -89,7 +89,7 @@ const computeDims = ( elementsSelectors: NonEmptySelectorArray ) => {
if ( ! rect ) {
throw new Error(
"Shipping tour: Couldn't find element with selector: " +
'Shipping tour: Couldnt find element with selector: ' +
elementSelector
);
}
@ -172,7 +172,7 @@ const TourFloaterWrapper = ( { step }: { step: number } ) => {
if ( ! shippingSettingsTableElement ) {
throw new Error(
"Shipping tour: Couldn't find shipping settings table element with selector: " +
'Shipping tour: Couldnt find shipping settings table element with selector: ' +
SHIPPING_ZONES_SETTINGS_TABLE_CLASS
);
}
@ -190,7 +190,7 @@ const TourFloaterWrapper = ( { step }: { step: number } ) => {
if ( ! shippingSettingsTableParentElement ) {
throw new Error(
"Shipping tour: Couldn't find shipping settings table parent element with selector: " +
'Shipping tour: Couldnt find shipping settings table parent element with selector: ' +
SHIPPING_ZONES_SETTINGS_TABLE_CLASS
);
}
@ -264,14 +264,14 @@ export const ShippingTour: React.FC< {
<>
<span>
{ __(
"Specify the areas you'd like to ship to! Give each zone a name, then list the regions you'd like to include. Your regions can be as specific as a zip code or as broad as a country. Shoppers will only see the methods available in their region.",
'Specify the areas youd like to ship to! Give each zone a name, then list the regions youd like to include. Your regions can be as specific as a zip code or as broad as a country. Shoppers will only see the methods available in their region.',
'woocommerce'
) }
</span>
<br />
<span>
{ __(
"We've added some shipping zones to get you started — you can manage them by selecting Edit or Delete.",
'Weve added some shipping zones to get you started — you can manage them by selecting Edit or Delete.',
'woocommerce'
) }
</span>
@ -292,14 +292,14 @@ export const ShippingTour: React.FC< {
<>
<span>
{ __(
"Add one or more shipping methods you'd like to offer to shoppers in your zones.",
'Add one or more shipping methods youd like to offer to shoppers in your zones.',
'woocommerce'
) }
</span>
<br />
<span>
{ __(
"For example, we've added the “Free shipping” method for shoppers in your country. You can edit, add to, or remove shipping methods by selecting Edit or Delete.",
'For example, weve added the “Free shipping” method for shoppers in your country. You can edit, add to, or remove shipping methods by selecting Edit or Delete.',
'woocommerce'
) }
</span>

View File

@ -321,7 +321,7 @@ function OrdersPanel( { unreadOrdersCount, orderStatuses } ) {
return (
<EmptyContent
title={ __(
"You currently don't have any actionable statuses. " +
'You currently dont have any actionable statuses. ' +
'To display orders here, select orders that require further review in settings.',
'woocommerce'
) }

View File

@ -127,7 +127,7 @@ export const Layout = ( {
className="your-store-today"
title={ __( 'Your store today', 'woocommerce' ) }
subtitle={ __(
"To do's, tips, and insights for your business",
'To dos, tips, and insights for your business',
'woocommerce'
) }
/>

View File

@ -61,7 +61,7 @@ export const useSendMagicLink = () => {
createNotice(
'error',
__(
"We couldn't send the link. Try again in a few seconds.",
'We couldnt send the link. Try again in a few seconds.',
'woocommerce'
)
);
@ -71,7 +71,7 @@ export const useSendMagicLink = () => {
createNotice(
'error',
__(
"Sorry, your account doesn't have sufficient permission.",
'Sorry, your account doesnt have sufficient permission.',
'woocommerce'
)
);
@ -80,7 +80,7 @@ export const useSendMagicLink = () => {
} else {
createNotice(
'error',
"We couldn't send the link. Try again in a few seconds."
'We couldnt send the link. Try again in a few seconds.'
);
}
} );

View File

@ -71,7 +71,7 @@ const renderEmptyCard = () => (
>
{ __(
'As things begin to happen in your store your inbox will start to fill up. ' +
"You'll see things like achievements, new feature announcements, extension recommendations and more!",
'Youll see things like achievements, new feature announcements, extension recommendations and more!',
'woocommerce'
) }
</ActivityCard>

View File

@ -86,7 +86,7 @@ const getActionsList = ( { activePlugins, allTasklists }: WhatsNextProps ) => {
const mailchimp = {
title: __( 'Build customer relationships', 'woocommerce' ),
description: __(
"Keep your shoppers up to date with what's new in your store and set up clever post-purchase automations.",
'Keep your shoppers up to date with whats new in your store and set up clever post-purchase automations.',
'woocommerce'
),
link: isMailChimpActivated
@ -123,7 +123,7 @@ const getActionsList = ( { activePlugins, allTasklists }: WhatsNextProps ) => {
const externalDocumentation = {
title: __( 'Help is on hand', 'woocommerce' ),
description: __(
"Detailed guides and our support team are always available if you're feeling stuck or need some guidance.",
'Detailed guides and our support team are always available if youre feeling stuck or need some guidance.',
'woocommerce'
),
link: `https://woo.com/documentation/woocommerce/?utm_source=launch_your_store&utm_medium=product`,

View File

@ -148,7 +148,7 @@ export const LaunchYourStoreSuccess = ( {
}
)
: __(
"You've successfully launched your store and are ready to start selling! We can't wait to see your business grow.",
'Youve successfully launched your store and are ready to start selling! We cant wait to see your business grow.',
'woocommerce'
) }
</h2>
@ -193,7 +193,7 @@ export const LaunchYourStoreSuccess = ( {
/>
</div>
<h2 className="woocommerce-launch-store__congrats-main-actions-title">
{ __( "What's next?", 'woocommerce' ) }
{ __( 'Whats next?', 'woocommerce' ) }
</h2>
<WhatsNext
activePlugins={ activePlugins }

View File

@ -92,7 +92,7 @@ export const ConfirmationModal = ( {
>
<div className="site-visibility-settings-confirmation-modal__content">
{ __(
"Are you sure you want to switch from live to coming soon mode? Your site will not be visible, and customers won't be able to make purchases during this time.",
'Are you sure you want to switch from live to coming soon mode? Your site will not be visible, and customers wont be able to make purchases during this time.',
'woocommerce'
) }
</div>

View File

@ -55,13 +55,13 @@ export const SiteVisibilityTour = ( { onClose }: { onClose: () => void } ) => {
meta: {
name: 'set-your-store-visibility',
heading: __(
"Set your store's visibility",
'Set your stores visibility',
'woocommerce'
),
descriptions: {
desktop: createInterpolateElement(
__(
'Launch your store only when you\'re ready to by switching between "Coming soon" and "Live" modes. Build excitement by creating a custom page visitors will see before you\'re ready to go live. <link>Discover more</link>',
'Launch your store only when youre ready to by switching between "Coming soon" and "Live" modes. Build excitement by creating a custom page visitors will see before youre ready to go live. <link>Discover more</link>',
'woocommerce'
),
{

View File

@ -150,7 +150,7 @@ export const Configure = ( { markConfigured, paymentGateway } ) => {
{ helpText || (
<p>
{ __(
"You can manage this payment gateway's settings by clicking the button below",
'You can manage this payment gateways settings by clicking the button below',
'woocommerce'
) }
</p>

View File

@ -28,7 +28,7 @@ export const LoadSampleProductConfirmModal: React.VFC< Props > = ( {
>
<Text className="woocommerce-confirmation-modal__message">
{ __(
"We'll import images from WooCommerce.com to set up your sample products.",
'Well import images from WooCommerce.com to set up your sample products.',
'woocommerce'
) }
</Text>

View File

@ -19,7 +19,7 @@ global.fetch = jest.fn().mockImplementation( () =>
);
const confirmModalText =
"We'll import images from WooCommerce.com to set up your sample products.";
'Well import images from WooCommerce.com to set up your sample products.';
describe( 'Products', () => {
beforeEach( () => {

View File

@ -42,7 +42,7 @@ global.fetch = jest.fn().mockImplementation( () =>
jest.mock( '@woocommerce/tracks', () => ( { recordEvent: jest.fn() } ) );
const confirmModalText =
"We'll import images from WooCommerce.com to set up your sample products.";
'Well import images from WooCommerce.com to set up your sample products.';
describe( 'Products', () => {
beforeEach( () => {

View File

@ -182,7 +182,7 @@ export class Shipping extends Component {
createNotice(
'success',
__(
"📦 Shipping is done! Don't worry, you can always change it later",
'📦 Shipping is done! Dont worry, you can always change it later',
'woocommerce'
)
);

View File

@ -56,7 +56,7 @@ export const Partners: React.FC< TaxChildProps > = ( {
onDisable();
} }
>
{ __( "I don't charge sales tax", 'woocommerce' ) }
{ __( 'I dont charge sales tax', 'woocommerce' ) }
</Button>
</li>
</ul>

View File

@ -122,7 +122,7 @@ export const Tax: React.FC< TaxProps > = ( { onComplete, query, task } ) => {
createNotice(
'success',
__(
"You're awesome! One less item on your to-do list ✅",
'Youre awesome! One less item on your to-do list ✅',
'woocommerce'
)
);

View File

@ -56,12 +56,12 @@ export const DefaultProgressTitle: React.FC< DefaultProgressTitleProps > = ( {
: __( 'Welcome to your store', 'woocommerce' );
}
if ( completedCount <= 3 ) {
return __( "Let's get you started", 'woocommerce' ) + ' 🚀';
return __( 'Lets get you started', 'woocommerce' ) + ' 🚀';
}
if ( completedCount > 3 && completedCount < 6 ) {
return __( "You're on the right track", 'woocommerce' );
return __( 'Youre on the right track', 'woocommerce' );
}
return __( "You're almost there", 'woocommerce' );
return __( 'Youre almost there', 'woocommerce' );
}, [ completedCount, hasVisitedTasks, tasksCount ] );
if ( loading ) {

View File

@ -49,7 +49,7 @@ describe( 'default-progress-title', () => {
).toBeInTheDocument();
} );
it( 'should render "Let\'s get you started" when has task visited and task completed count <= 3', () => {
it( 'should render "Lets get you started" when has task visited and task completed count <= 3', () => {
( useSelect as jest.Mock ).mockImplementation( ( fn ) =>
fn( () => ( {
getTaskList: () => ( {
@ -60,11 +60,11 @@ describe( 'default-progress-title', () => {
);
render( <DefaultProgressTitle taskListId="1" /> );
expect(
screen.getByText( "Let's get you started", { exact: false } )
screen.getByText( 'Lets get you started', { exact: false } )
).toBeInTheDocument();
} );
it( 'should render "You\'re on the right track" when has task visited and task completed count > 3', () => {
it( 'should render "Youre on the right track" when has task visited and task completed count > 3', () => {
( useSelect as jest.Mock ).mockImplementation( ( fn ) =>
fn( () => ( {
getTaskList: () => ( {
@ -81,11 +81,11 @@ describe( 'default-progress-title', () => {
);
render( <DefaultProgressTitle taskListId="1" /> );
expect(
screen.getByText( "You're on the right track", { exact: false } )
screen.getByText( 'Youre on the right track', { exact: false } )
).toBeInTheDocument();
} );
it( 'should render "You\'re almost there" when has task visited and task completed count > 5', () => {
it( 'should render "Youre almost there" when has task visited and task completed count > 5', () => {
( useSelect as jest.Mock ).mockImplementation( ( fn ) =>
fn( () => ( {
getTaskList: () => ( {
@ -104,7 +104,7 @@ describe( 'default-progress-title', () => {
);
render( <DefaultProgressTitle taskListId="1" /> );
expect(
screen.getByText( "You're almost there", { exact: false } )
screen.getByText( 'Youre almost there', { exact: false } )
).toBeInTheDocument();
} );
} );

View File

@ -52,7 +52,7 @@ const ReminderText: React.FC< ReminderTextProps > = ( {
)
: /* translators: 1: remaining tasks count */
__(
"🚀 You're doing great! {{strongText}}%1$d steps left{{/strongText}} to get your store up and running. {{setupLink}}Continue setup{{/setupLink}}",
'🚀 Youre doing great! {{strongText}}%1$d steps left{{/strongText}} to get your store up and running. {{setupLink}}Continue setup{{/setupLink}}',
'woocommerce'
);

View File

@ -34,7 +34,7 @@ const LaunchYourStoreHeader = ( {
</h1>
<p>
{ __(
"It's time to celebrate you're ready to launch your store! Woo! Hit the button to preview your store and make it public.",
'Its time to celebrate youre ready to launch your store! Woo! Hit the button to preview your store and make it public.',
'woocommerce'
) }
</p>

View File

@ -26,7 +26,7 @@ const StoreDetailsHeader = ( { task, goToTask } ) => {
</h1>
<p>
{ __(
"Get your store up and running in no time. Add your store's address to set up shipping, tax and payments faster.",
'Get your store up and running in no time. Add your stores address to set up shipping, tax and payments faster.',
'woocommerce'
) }
</p>

View File

@ -54,7 +54,7 @@ const WoocommercePaymentsHeader = ( { task, trackClick } ) => {
className="svg-background"
/>
<div className="woocommerce-task-header__contents">
<h1>{ __( "It's time to get paid", 'woocommerce' ) }</h1>
<h1>{ __( 'Its time to get paid', 'woocommerce' ) }</h1>
{ incentive?.task_header_content ? (
<p
dangerouslySetInnerHTML={ sanitizeHTML(

View File

@ -166,7 +166,7 @@ export const TaskListCompletedHeader: React.FC<
<Text size="title" as="h2" lineHeight={ 1.4 }>
{ __(
"You've completed store setup",
'Youve completed store setup',
'woocommerce'
) }
</Text>

View File

@ -33,7 +33,7 @@ export const TaskListCompleted = ( {
<img src={ HeaderImage } alt="Completed" />
<h2>
{ __(
"You've completed store setup",
'Youve completed store setup',
'woocommerce'
) }
</h2>

View File

@ -70,7 +70,7 @@ const onboardingHomepageNotice = () => {
dispatch( 'core/notices' ).removeNotice( 'SAVE_POST_NOTICE_ID' );
dispatch( 'core/notices' ).createSuccessNotice(
__( "🏠 Nice work creating your store's homepage!", 'woocommerce' ),
__( '🏠 Nice work creating your stores homepage!', 'woocommerce' ),
{
id: 'WOOCOMMERCE_ONBOARDING_HOME_PAGE_NOTICE',
type: notificationType,

View File

@ -41,7 +41,7 @@ const showTaxCompletionNotice = () => {
saveButton.classList.add( 'has-tax' );
dispatch( 'core/notices' ).createSuccessNotice(
__( "You've added your first tax rate!", 'woocommerce' ),
__( 'Youve added your first tax rate!', 'woocommerce' ),
{
id: 'WOOCOMMERCE_ONBOARDING_TAX_NOTICE',
actions: [

View File

@ -22,7 +22,7 @@
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:css": "stylelint '**/*.scss' --fix --ip 'storybook/wordpress'",
"lint:fix:lang:js": "pnpm lint:js --fix --ext=js,ts,tsx",
"lint:fix:lang:js": "pnpm lint:lang:js --fix --ext=js,ts,tsx",
"lint:lang:css": "stylelint '**/*.scss'",
"lint:lang:js": "eslint ./client --ext=js,ts,tsx",
"test:js": "jest --config client/jest.config.js",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Changed instances of prime marks inappropriately used when apostrophes are supposed to be used for some parts of WC Admin JS/TS/TSX files

View File

@ -29,7 +29,7 @@ test.describe( 'Store owner can complete the core profiler', () => {
} )
).toBeVisible();
await page
.getByRole( 'radio', { name: "I'm just starting my business" } )
.getByRole( 'radio', { name: 'Im just starting my business' } )
.first()
.click();
await page.getByRole( 'button', { name: 'Continue' } ).click();
@ -175,12 +175,12 @@ test.describe( 'Store owner can complete the core profiler', () => {
} )
).toBeVisible();
await page
.getByRole( 'radio', { name: "I'm already selling" } )
.getByRole( 'radio', { name: 'Im already selling' } )
.first()
.click();
await page.getByLabel( 'Select an option' ).click();
await page
.getByRole( 'option', { name: "No, I'm selling offline" } )
.getByRole( 'option', { name: 'No, Im selling offline' } )
.click();
await page.getByRole( 'button', { name: 'Continue' } ).click();
} );
@ -282,14 +282,14 @@ test.describe( 'Store owner can complete the core profiler', () => {
await expect
.soft(
page.getByRole( 'heading', {
name: "Woo! Let's get your features ready",
name: 'Woo! Lets get your features ready',
} )
)
.toBeVisible( { timeout: 30000 } );
await expect
.soft(
page.getByRole( 'heading', {
name: "Extending your store's capabilities",
name: 'Extending your stores capabilities',
} )
)
.toBeVisible( { timeout: 30000 } );