From 45a011ebfbcfe0a5cd986316570919ef271fcd8b Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Fri, 19 Aug 2022 11:08:04 -0500 Subject: Extracted all strings from the invoice page to en.json --- src/locales/en.json | 6 ++++++ src/routes/invoice/[id]/+page.svelte | 17 +++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 187f9618..fc276ef2 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -61,6 +61,12 @@ "description": "You can convert to local currency at any point." } }, + "invoice": { + "addTip": "Add a tip", + "addTipq": "Add a tip?", + "done": "Done", + "paymentSuccessful": "Payment Successful!" + }, "jobs": { "header": "Jobs", "subheader": "Current Openings", diff --git a/src/routes/invoice/[id]/+page.svelte b/src/routes/invoice/[id]/+page.svelte index d9f7543d..538df732 100644 --- a/src/routes/invoice/[id]/+page.svelte +++ b/src/routes/invoice/[id]/+page.svelte @@ -6,6 +6,7 @@ import { goto } from '$app/navigation'; import { onMount } from 'svelte'; import { copy } from '$lib/utils'; + import { _, number } from 'svelte-i18n'; export let data; $: ({ amount, id, rate, status, text, username } = data); @@ -150,7 +151,7 @@ ? 'bottom-0' : '-top-full'} bg-white p-6 md:p-0 rounded-t-3xl md:rounded-none left-0 md:static text-center space-y-5" > -

Add a tip?

+

{$_('invoice.addTipq')}

{tipAmountFormatted} - Add a tip + {$_('invoice.addTip')} Invoice {invoiceAmountFiatFormatted} - {`(${amountFormatted} SATS)`}{`(${amountFormatted} SAT)`}
@@ -272,7 +273,7 @@ Tip {tipAmountFormatted} - {`(${tipAmountSats} SATS)`}{`(${tipAmountSats} SAT)`} @@ -280,7 +281,7 @@ Total {totalAmountFormatted} - {`(${totalAmountSats} SATS)`}{`(${totalAmountSats} SAT)`} @@ -291,14 +292,14 @@ {:else}
-

Payment Successful!

+

{$_('invoice.paymentSuccessful')}

{totalAmountFormatted} {$preferredCurrency}

-

({totalAmountSats} SATS)

+

({totalAmountSats} SAT)

{/if} -- cgit v1.2.3