Skip to content

Commit

Permalink
Translate hard coded strings in the fees tooltip breakdown (#10004)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgascam authored Dec 20, 2024
1 parent 915fcc8 commit 779ef47
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Use translatable strings on the fee breakdown tooltip of the payment settings screen.
20 changes: 16 additions & 4 deletions client/utils/account-fees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const formatMethodFeesTooltip = (
return (
<div className={ 'wcpay-fees-tooltip' }>
<div>
<div>Base fee</div>
<div>{ __( 'Base fee', 'woocommerce-payments' ) }</div>
<div>
{ getFeeDescriptionString(
accountFees.base,
Expand All @@ -153,7 +153,12 @@ export const formatMethodFeesTooltip = (
</div>
{ hasFees( accountFees.additional ) ? (
<div>
<div>International payment method fee</div>
<div>
{ __(
'International payment method fee',
'woocommerce-payments'
) }
</div>
<div>
{ getFeeDescriptionString(
accountFees.additional,
Expand All @@ -166,14 +171,21 @@ export const formatMethodFeesTooltip = (
) }
{ hasFees( accountFees.fx ) ? (
<div>
<div>Currency conversion fee</div>
<div>
{ __(
'Currency conversion fee',
'woocommerce-payments'
) }
</div>
<div>{ getFeeDescriptionString( accountFees.fx ) }</div>
</div>
) : (
''
) }
<div>
<div>Total per transaction</div>
<div>
{ __( 'Total per transaction', 'woocommerce-payments' ) }
</div>
<div className={ 'wcpay-fees-tooltip__bold' }>
{ getFeeDescriptionString( total ) }
</div>
Expand Down

0 comments on commit 779ef47

Please sign in to comment.