From c94c429ddc8da37de686df004b84d7b8df582019 Mon Sep 17 00:00:00 2001 From: Dale du Preez Date: Tue, 12 Aug 2025 14:04:24 +0200 Subject: [PATCH 1/6] Add linting rule for i18 text domain --- .eslintrc.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index c0c9d9be6c..ff3d22768c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -62,6 +62,12 @@ module.exports = { 'testing-library/no-unnecessary-act': 'off', '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-var-requires': 'off', + '@wordpress/i18n-text-domain': [ + 'error', + { + allowedTextDomain: 'woocommerce-gateway-stripe', + }, + ], }, settings: { react: { @@ -82,4 +88,5 @@ module.exports = { '@wordpress/data', ], }, + ignorePatterns: [ 'phpunit-html/**' ], }; From 086ba477419f5b0fdd9f2be0f0b83d38cf2a63cf Mon Sep 17 00:00:00 2001 From: Dale du Preez Date: Tue, 12 Aug 2025 16:35:08 +0200 Subject: [PATCH 2/6] Fix missing/wrong text domains --- .../general-settings-section/payment-method-checkbox.js | 3 ++- client/settings/stripe-account-connected-notice/index.js | 2 +- client/stripe-utils/cash-app-limit-notice-handler.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/settings/general-settings-section/payment-method-checkbox.js b/client/settings/general-settings-section/payment-method-checkbox.js index 4fcb6e27c2..5c48ff712a 100644 --- a/client/settings/general-settings-section/payment-method-checkbox.js +++ b/client/settings/general-settings-section/payment-method-checkbox.js @@ -100,7 +100,8 @@ const PaymentMethodCheckbox = ( { { sprintf( /* translators: %s: a payment method name. */ __( - '%s cannot be enabled at checkout. Click to expand.' + '%s cannot be enabled at checkout. Click to expand.', + 'woocommerce-gateway-stripe' ), label ) } diff --git a/client/settings/stripe-account-connected-notice/index.js b/client/settings/stripe-account-connected-notice/index.js index 54273c620b..2856bdd649 100644 --- a/client/settings/stripe-account-connected-notice/index.js +++ b/client/settings/stripe-account-connected-notice/index.js @@ -45,7 +45,7 @@ const StripeAccountConnectedNotice = () => { if ( shouldShowNotice() ) { localStorage.removeItem( LOCAL_STORAGE_KEY ); dispatch( 'core/notices' ).createSuccessNotice( - __( 'Stripe Account Connected', 'woocommerce' ), + __( 'Stripe Account Connected', 'woocommerce-gateway-stripe' ), { id: 'WOOCOMMERCE_STRIPE_ACCOUNT_CONNECTED_NOTICE', actions: [ diff --git a/client/stripe-utils/cash-app-limit-notice-handler.js b/client/stripe-utils/cash-app-limit-notice-handler.js index e2b5cad76d..c0145dde63 100644 --- a/client/stripe-utils/cash-app-limit-notice-handler.js +++ b/client/stripe-utils/cash-app-limit-notice-handler.js @@ -11,7 +11,8 @@ const LIMIT_NOTICE_CLASSNAME = 'wc-block-checkout__payment-method-limit-notice'; export const cashAppLimitNotice = document.createElement( 'div' ); cashAppLimitNotice.classList.add( 'woocommerce-info', LIMIT_NOTICE_CLASSNAME ); cashAppLimitNotice.textContent = __( - 'Please note that, depending on your account and transaction history, Cash App Pay may reject your transaction due to its amount.' + 'Please note that, depending on your account and transaction history, Cash App Pay may reject your transaction due to its amount.', + 'woocommerce-gateway-stripe' ); cashAppLimitNotice.setAttribute( 'data-testid', 'cash-app-limit-notice' ); From aba54642d07b74debfe92e4e3f609b56882d565f Mon Sep 17 00:00:00 2001 From: Dale du Preez Date: Tue, 12 Aug 2025 16:39:56 +0200 Subject: [PATCH 3/6] Changelog --- changelog.txt | 1 + readme.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/changelog.txt b/changelog.txt index f4d09c1c31..07a792f002 100644 --- a/changelog.txt +++ b/changelog.txt @@ -39,6 +39,7 @@ * Dev - Fix some e2e issues: timing, optional flows, and WooCommerce RC support * Fix - Reduce number of calls to Stripe payment_methods API * Fix - Add `get_icon_url()` to Payment Method base class +* Fix - Ensure all Javascript strings use the correct text domain for translation = 9.7.1 - 2025-07-28 = * Add - Add state mapping for Lithuania in express checkout diff --git a/readme.txt b/readme.txt index 4ff9a70767..ea98467c7e 100644 --- a/readme.txt +++ b/readme.txt @@ -148,5 +148,6 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o * Dev - Fix some e2e issues: timing, optional flows, and WooCommerce RC support * Fix - Reduce number of calls to Stripe payment_methods API * Fix - Add `get_icon_url()` to Payment Method base class +* Fix - Ensure all Javascript strings use the correct text domain for translation [See changelog for full details across versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt). From d24f072e8c41513f2cea7711e6fc7d58469159ba Mon Sep 17 00:00:00 2001 From: Dale du Preez Date: Tue, 12 Aug 2025 16:49:20 +0200 Subject: [PATCH 4/6] Exclude more directories for JS linting --- .eslintrc.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index ff3d22768c..6d9c6530c8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -88,5 +88,11 @@ module.exports = { '@wordpress/data', ], }, - ignorePatterns: [ 'phpunit-html/**' ], + ignorePatterns: [ + 'build/**', + 'node_modules/**', + 'vendor/**', + 'phpunit-html/**', + 'release/**', + ], }; From 10ba71def9960aae5aa889bf2cc47ee7b8cdac19 Mon Sep 17 00:00:00 2001 From: Dale du Preez Date: Tue, 12 Aug 2025 16:52:56 +0200 Subject: [PATCH 5/6] Sort entries --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6d9c6530c8..7e518c4b88 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -91,8 +91,8 @@ module.exports = { ignorePatterns: [ 'build/**', 'node_modules/**', - 'vendor/**', 'phpunit-html/**', 'release/**', + 'vendor/**', ], }; From c8e77f283d1f87a6caf10e32002c55379b7aeaa2 Mon Sep 17 00:00:00 2001 From: Dale du Preez Date: Wed, 13 Aug 2025 11:27:05 +0200 Subject: [PATCH 6/6] Move changelog entry to 9.9.0 --- changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 6d410d393d..9822b95021 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ * Update - Increases the default font size for the Optimized Checkout payment element to match the rest of the checkout form * Fix - Checks for the subscription payment method (if it is Stripe) when verifying for the payment method detachment * Dev - Implements WooCommerce constants for the tax statuses +* Fix - Ensure all Javascript strings use the correct text domain for translation = 9.8.0 - 2025-08-11 = * Add - Adds the current setting value for the Optimized Checkout to the Stripe System Status Report data @@ -40,7 +41,6 @@ * Fix - Handle missing customer when calling payment_methods API * Fix - Reduce number of calls to Stripe payment_methods API * Fix - Add `get_icon_url()` to Payment Method base class -* Fix - Ensure all Javascript strings use the correct text domain for translation = 9.7.1 - 2025-07-28 = * Add - Add state mapping for Lithuania in express checkout