Skip to content

Commit dc10484

Browse files
frossoCopilotrtio
authored
fix: some missing i18n wrappers (#10944)
Co-authored-by: Copilot <[email protected]> Co-authored-by: Rafael Meneses <[email protected]>
1 parent 0613e7d commit dc10484

File tree

17 files changed

+343
-626
lines changed

17 files changed

+343
-626
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fix
3+
4+
fix: adding some missing i18n wrappers

client/capital/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* External dependencies
55
*/
66
import React from 'react';
7-
import { __, _n } from '@wordpress/i18n';
7+
import { __, _n, sprintf } from '@wordpress/i18n';
88
import { TableCard } from '@woocommerce/components';
99

1010
/**
@@ -79,9 +79,11 @@ const columns = [
7979

8080
const getLoanStatusText = ( loan: CapitalLoan ) => {
8181
return loan.fully_paid_at
82-
? __( 'Paid off', 'woocommerce-payments' ) +
83-
': ' +
82+
? sprintf(
83+
/* translators: %s: date when the loan was paid off */
84+
__( 'Paid off: %s', 'woocommerce-payments' ),
8485
formatDateTimeFromString( loan.fully_paid_at )
86+
)
8587
: __( 'Active', 'woocommerce-payments' );
8688
};
8789

client/checkout/blocks/payment-methods-logos/logo-popover.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import React, {
88
useState,
99
useCallback,
1010
} from 'react';
11+
import { __ } from '@wordpress/i18n';
1112

1213
interface LogoPopoverProps {
1314
id: string;
@@ -118,7 +119,10 @@ export const LogoPopover: React.FC< React.PropsWithChildren<
118119
left: 'auto',
119120
} }
120121
role="dialog"
121-
aria-label="Supported Credit Card Brands"
122+
aria-label={ __(
123+
'Supported Credit Card Brands',
124+
'woocommerce-payments'
125+
) }
122126
data-testid={ dataTestId }
123127
>
124128
{ children }

client/components/account-balances/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ const AccountBalances: React.FC = () => {
7878

7979
return (
8080
<Card className="wcpay-account-balances">
81-
<CardHeader>Balance</CardHeader>
81+
<CardHeader>
82+
{ __( 'Balance', 'woocommerce-payments' ) }
83+
</CardHeader>
8284
<CardBody className="wcpay-account-balances__balances">
8385
<BalanceBlock
8486
id={ `wcpay-account-balances-${ loadingData.currencyCode }-total` }
@@ -123,7 +125,9 @@ const AccountBalances: React.FC = () => {
123125
return (
124126
<>
125127
<Card className="wcpay-account-balances">
126-
<CardHeader>Balance</CardHeader>
128+
<CardHeader>
129+
{ __( 'Balance', 'woocommerce-payments' ) }
130+
</CardHeader>
127131
<CardBody className="wcpay-account-balances__balances">
128132
<BalanceBlock
129133
id={ `wcpay-account-balances-${ selectedOverview.currencyCode }-total` }

client/components/welcome/currency-select.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* External dependencies
33
*/
44
import React, { useEffect } from 'react';
5+
import { __ } from '@wordpress/i18n';
56
import { decodeEntities } from '@wordpress/html-entities';
67

78
/**
@@ -87,7 +88,7 @@ export const CurrencySelect: React.FC< {
8788

8889
return (
8990
<InlineLabelSelect
90-
label="Currency"
91+
label={ __( 'Currency', 'woocommerce-payments' ) }
9192
value={ currencyOptions.find(
9293
( option ) => option.key === selectedCurrency
9394
) }

0 commit comments

Comments
 (0)