Skip to content

Commit 18f2a39

Browse files
Merge pull request #19455 from mozilla/PAY-3261-date-encoded-in-strong-tags
fix(payments-next): Date encoded within <strong> tags on the Payments Screen for IAP subscriptions
2 parents 0491bb4 + a6fd2e0 commit 18f2a39

1 file changed

Lines changed: 31 additions & 9 deletions

File tree

  • apps/payments/next/app/[locale]/subscriptions/manage

apps/payments/next/app/[locale]/subscriptions/manage/page.tsx

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,20 @@ export default async function Manage({
547547
</p>
548548
{nextBillDate && (
549549
<p>
550-
{l10n.getString(
550+
{l10n.getFragmentWithSource(
551551
'subscription-management-iap-sub-will-expire-on',
552552
{
553-
date: nextBillDate,
553+
vars: {
554+
date: nextBillDate,
555+
},
556+
elems: {
557+
strong: <strong />
558+
},
554559
},
555-
`Your subscription will expire on ${nextBillDate}`
560+
<>
561+
Your subscription will expire on <strong>${nextBillDate}</strong>
562+
</>
563+
556564
)}
557565
</p>
558566
)}
@@ -656,19 +664,33 @@ export default async function Manage({
656664
<p>
657665
{!!purchase.expiryTimeMillis &&
658666
(purchase.autoRenewing
659-
? l10n.getString(
667+
? l10n.getFragmentWithSource(
660668
'subscription-management-iap-sub-next-bill-is-due',
661669
{
662-
date: nextBillDate,
670+
vars: {
671+
date: nextBillDate,
672+
},
673+
elems: {
674+
strong: <strong />
675+
},
663676
},
664-
`Next bill is due ${nextBillDate}`
677+
<>
678+
Next bill is due <strong>{nextBillDate}</strong>
679+
</>
665680
)
666-
: l10n.getString(
681+
: l10n.getFragmentWithSource(
667682
'subscription-management-iap-sub-will-expire-on',
668683
{
669-
date: nextBillDate,
684+
vars: {
685+
date: nextBillDate,
686+
},
687+
elems: {
688+
strong: <strong />
689+
},
670690
},
671-
`Your subscription will expire on ${nextBillDate}`
691+
<>
692+
Your subscription will expire on <strong>{nextBillDate}</strong>
693+
</>
672694
))}
673695
</p>
674696
</div>

0 commit comments

Comments
 (0)