From 4a6716dcede1c0719192ee454051b23dbd393441 Mon Sep 17 00:00:00 2001
From: kunal yadav <168568608+kunal-595@users.noreply.github.com>
Date: Thu, 12 Feb 2026 13:34:06 +0530
Subject: [PATCH] chore(i18n): extract hardcoded strings in
CreateFidelityBondDialog (#1037)
---
.../CreateFidelityBondDialogSteps.tsx | 34 ++++++++++++-------
src/i18n/locales/en/translation.json | 17 +++++++++-
2 files changed, 38 insertions(+), 13 deletions(-)
diff --git a/src/components/earn/CreateFidelityBondDialog/CreateFidelityBondDialogSteps.tsx b/src/components/earn/CreateFidelityBondDialog/CreateFidelityBondDialogSteps.tsx
index 44f27a9a..95688626 100644
--- a/src/components/earn/CreateFidelityBondDialog/CreateFidelityBondDialogSteps.tsx
+++ b/src/components/earn/CreateFidelityBondDialog/CreateFidelityBondDialogSteps.tsx
@@ -84,7 +84,7 @@ export function CreateFidelityBondDialogSteps({ wizard }: CreateFidelityBondDial
{t('earn.fidelity_bond.select_date.description')}
-
Choose when your funds will be unlocked
+
{t('earn.fidelity_bond.select_date.subtitle')}
@@ -141,7 +141,9 @@ export function CreateFidelityBondDialogSteps({ wizard }: CreateFidelityBondDial
{selectedLockdate && (
-
Selected lock date
+
+ {t('earn.fidelity_bond.select_date.label_selected_lock_date')}
+
{selectedDateLabel}
)}
@@ -167,7 +169,7 @@ export function CreateFidelityBondDialogSteps({ wizard }: CreateFidelityBondDial
-
Select Source Jar
+
{t('earn.fidelity_bond.select_jar.title')}
{t('earn.fidelity_bond.select_jar.description')}
@@ -193,7 +195,9 @@ export function CreateFidelityBondDialogSteps({ wizard }: CreateFidelityBondDial
{jar.name}
- {jar.utxos.filter((u) => !u.frozen && !fb.utxo.isFidelityBond(u)).length} available UTXOs
+ {t('earn.fidelity_bond.select_jar.text_available_utxos', {
+ count: jar.utxos.filter((u) => !u.frozen && !fb.utxo.isFidelityBond(u)).length,
+ })}
@@ -225,7 +229,7 @@ export function CreateFidelityBondDialogSteps({ wizard }: CreateFidelityBondDial
-
Select UTXOs
+
{t('earn.fidelity_bond.select_utxos.title')}
{t('earn.fidelity_bond.select_utxos.description', { jar: selectedJarIndex })}
@@ -321,7 +325,7 @@ export function CreateFidelityBondDialogSteps({ wizard }: CreateFidelityBondDial
{selectedUtxos.length > 0 && (
- Total Selected
+ {t('earn.fidelity_bond.select_utxos.label_total_selected')}
{formatSats(totalAmount)}
@@ -351,14 +355,16 @@ export function CreateFidelityBondDialogSteps({ wizard }: CreateFidelityBondDial
-
Freeze Remaining UTXOs
-
Protect your privacy by freezing unselected UTXOs
+
{t('earn.fidelity_bond.freeze_utxos.title')}
+
{t('earn.fidelity_bond.freeze_utxos.subtitle')}
-
Selected UTXOs ({selectedUtxos.length})
+
+ {t('earn.fidelity_bond.freeze_utxos.label_selected_utxos', { count: selectedUtxos.length })}
+
{selectedUtxos.map((utxo) => (
@@ -371,7 +377,9 @@ export function CreateFidelityBondDialogSteps({ wizard }: CreateFidelityBondDial
{utxosToFreeze.length > 0 && (
-
UTXOs to Freeze ({utxosToFreeze.length})
+
+ {t('earn.fidelity_bond.freeze_utxos.label_utxos_to_freeze', { count: utxosToFreeze.length })}
+
{t('earn.fidelity_bond.freeze_utxos.description_selected_utxos_to_freeze', {
jar: selectedJarIndex,
@@ -487,7 +495,7 @@ export function CreateFidelityBondDialogSteps({ wizard }: CreateFidelityBondDial
{t('earn.fidelity_bond.text_creating')}
-
This may take a moment...
+
{t('earn.fidelity_bond.text_creating_subtitle')}
)
@@ -499,7 +507,9 @@ export function CreateFidelityBondDialogSteps({ wizard }: CreateFidelityBondDial
{t('earn.fidelity_bond.create_fidelity_bond.success_text')}
-
Your fidelity bond has been created successfully
+
+ {t('earn.fidelity_bond.create_fidelity_bond.text_success_subtitle')}
+
diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json
index 015e609f..c276a281 100644
--- a/src/i18n/locales/en/translation.json
+++ b/src/i18n/locales/en/translation.json
@@ -524,6 +524,7 @@
"alert_all_funds_in_use": "Keep in mind: As you are using all available funds for the creation of this fidelity bond, you will not have any UTXOs left.
A fidelity bond will not participate in collaborative transactions and you have to fund your wallet again to start sending or earning.",
"text_loading": "Loading...",
"text_creating": "Creating...",
+ "text_creating_subtitle": "This may take a moment...",
"text_unfreezing": "Unfreezing...",
"select_date": {
"text_primary_button": "Next",
@@ -531,22 +532,29 @@
"form_label_year": "Year",
"form_label_month": "Month",
"description": "Fidelity bond expiration date:",
+ "subtitle": "Choose when your funds will be unlocked",
+ "label_selected_lock_date": "Selected lock date",
"warning_fb_with_same_expiry": "Warning: A fidelity bond with the same expiry date already exists."
},
"select_jar": {
"text_primary_button": "Next",
"text_secondary_button": "Cancel",
+ "title": "Select Source Jar",
"description": "Select a jar to fund the fidelity bond from.",
+ "text_available_utxos_one": "{{ count }} available UTXO",
+ "text_available_utxos_other": "{{ count }} available UTXOs",
"alert_no_jars_available": "No jars with available UTXOs found."
},
"select_utxos": {
"text_primary_button": "Next",
"text_primary_button_unsafe": "Select potentially less private UTXOs",
"text_secondary_button": "Cancel",
+ "title": "Select UTXOs",
"description": "Select one or more UTXOs from Jar {{ jar }} to use for the fidelity bond.",
"button_select_all": "Select All",
"button_deselect_all": "Deselect All",
"label_total": "Total:",
+ "label_total_selected": "Total Selected",
"utxo_card": {
"confirmations": "{{ confs }} Confirmations",
"label_frozen": "frozen",
@@ -559,6 +567,12 @@
"text_primary_button_all_frozen": "Review bond configuration",
"text_primary_button_error": "Try again",
"text_secondary_button": "Cancel",
+ "title": "Freeze Remaining UTXOs",
+ "subtitle": "Protect your privacy by freezing unselected UTXOs",
+ "label_selected_utxos_one": "Selected UTXO ({{ count }})",
+ "label_selected_utxos_other": "Selected UTXOs ({{ count }})",
+ "label_utxos_to_freeze_one": "UTXO to Freeze ({{ count }})",
+ "label_utxos_to_freeze_other": "UTXOs to Freeze ({{ count }})",
"description_selected_utxos": "Selected UTXOs:",
"description_unselected_utxos": "The following UTXOs will not be used for the fidelity bond:",
"description_selected_utxos_to_freeze": "They will be frozen to remain in Jar {{ jar }}. You can unfreeze them anytime after creating the bond."
@@ -587,7 +601,8 @@
"label_address": "Time-locked address",
"label_transaction_id": "Transaction ID",
"text_copy_transaction_id": "Transaction ID copied",
- "label_utxos_to_unfreeze": "Do you want to unfreeze the UTXOs that were frozen earlier?"
+ "label_utxos_to_unfreeze": "Do you want to unfreeze the UTXOs that were frozen earlier?",
+ "text_success_subtitle": "Your fidelity bond has been created successfully"
},
"unfreeze_utxos": {
"text_primary_button": "Done",