@@ -9,11 +9,9 @@ import giftCardNoiseUrl from '../../images/gift-card-noise.webp';
99import giftCardOrbUrl from '../../images/gift-card-orb.webp' ;
1010import { getAvailableProducts , getCurrencySymbol , formatNumber , getStripeAmount , isCookiesDisabled , getActiveInterval } from '../../utils/helpers' ;
1111import { getGiftDurationLabel } from '../../utils/gift-redemption-notification' ;
12+ import { t } from '../../utils/i18n' ;
1213import useCardTilt from '../../utils/use-card-tilt' ;
1314
14- // TODO: wrap strings with t() once copy is finalised
15- /* eslint-disable i18next/no-literal-string */
16-
1715export const GiftPageStyles = `
1816@property --shine-angle {
1917 syntax: '<angle>';
@@ -627,14 +625,14 @@ function GiftPriceSwitch({selectedInterval, setSelectedInterval}) {
627625 className = { 'gh-portal-btn' + ( selectedInterval === 'month' ? ' active' : '' ) }
628626 onClick = { ( ) => setSelectedInterval ( 'month' ) }
629627 >
630- 1 month
628+ { t ( ' 1 month' ) }
631629 </ button >
632630 < button
633631 data-test-button = 'switch-yearly'
634632 className = { 'gh-portal-btn' + ( selectedInterval === 'year' ? ' active' : '' ) }
635633 onClick = { ( ) => setSelectedInterval ( 'year' ) }
636634 >
637- 1 year
635+ { t ( ' 1 year' ) }
638636 </ button >
639637 </ div >
640638 ) ;
@@ -719,9 +717,9 @@ const GiftPage = () => {
719717 < div className = 'gh-portal-gift-checkout-bg' aria-hidden = 'true' />
720718 < div className = 'gh-portal-gift-checkout-inner' >
721719 < header className = 'gh-portal-gift-checkout-header' >
722- < h1 className = 'gh-portal-main-title' > Gift a membership</ h1 >
720+ < h1 className = 'gh-portal-main-title' > { t ( ' Gift a membership' ) } </ h1 >
723721 < p className = 'gh-portal-gift-checkout-subtitle' >
724- Gift subscriptions are not available right now.
722+ { t ( ' Gift subscriptions are not available right now.' ) }
725723 </ p >
726724 </ header >
727725 </ div >
@@ -756,9 +754,9 @@ const GiftPage = () => {
756754 < div className = 'gh-portal-gift-checkout-bg' aria-hidden = 'true' />
757755 < div className = 'gh-portal-gift-checkout-inner' ref = { innerRef } >
758756 < header className = 'gh-portal-gift-checkout-header' >
759- < h1 className = 'gh-portal-main-title' > Gift a membership</ h1 >
757+ < h1 className = 'gh-portal-main-title' > { t ( ' Gift a membership' ) } </ h1 >
760758 < p className = 'gh-portal-gift-checkout-subtitle' >
761- Share a full membership to { siteTitle } with a friend or colleague
759+ { t ( ' Share a full membership to {siteTitle} with a friend or colleague' , { siteTitle } ) }
762760 </ p >
763761 </ header >
764762
@@ -770,11 +768,11 @@ const GiftPage = () => {
770768 </ div >
771769
772770 < div className = 'gh-portal-gift-checkout-section' >
773- < div className = 'gh-portal-gift-checkout-label' > { isSingleTier ? 'Membership details' : 'Tier' } </ div >
771+ < div className = 'gh-portal-gift-checkout-label' > { isSingleTier ? t ( 'Membership details' ) : t ( 'Tier' ) } </ div >
774772 < div
775773 className = { 'gh-portal-gift-checkout-tiers' + ( isSingleTier ? ' single' : '' ) }
776774 role = { isSingleTier ? undefined : 'radiogroup' }
777- aria-label = { isSingleTier ? undefined : 'Tier' }
775+ aria-label = { isSingleTier ? undefined : t ( 'Tier' ) }
778776 >
779777 { products . map ( ( product ) => {
780778 const isSelected = product . id === activeProduct . id ;
@@ -835,7 +833,7 @@ const GiftPage = () => {
835833 < div className = 'gh-portal-gift-checkout-cta-wrapper' >
836834 < ActionButton
837835 dataTestId = 'purchase-gift'
838- label = 'Continue'
836+ label = { t ( 'Continue' ) }
839837 onClick = { handlePurchase }
840838 disabled = { isDisabled }
841839 isRunning = { isPurchasing }
0 commit comments