diff --git a/app/src/main/java/com/bitcointxoko/gudariwallet/util/NotificationHelper.kt b/app/src/main/java/com/bitcointxoko/gudariwallet/util/NotificationHelper.kt
index b8f1250..1cd3d91 100644
--- a/app/src/main/java/com/bitcointxoko/gudariwallet/util/NotificationHelper.kt
+++ b/app/src/main/java/com/bitcointxoko/gudariwallet/util/NotificationHelper.kt
@@ -14,7 +14,6 @@ import com.bitcointxoko.gudariwallet.R
object NotificationHelper {
// ── Intent extra key — read by MainActivity ───────────────────────────────
- // Public so MainActivity can reference it without a magic string.
const val EXTRA_PAYMENT_HASH = "extra_payment_hash"
// ── Channel setup ─────────────────────────────────────────────────────────
@@ -25,10 +24,10 @@ object NotificationHelper {
nm.createNotificationChannel(
NotificationChannel(
NotificationConstants.CHANNEL_PAYMENTS,
- "Payments",
+ context.getString(R.string.notif_channel_payments_name),
NotificationManager.IMPORTANCE_HIGH
).apply {
- description = "Incoming and outgoing Lightning payment alerts"
+ description = context.getString(R.string.notif_channel_payments_desc)
enableVibration(true)
enableLights(true)
}
@@ -37,10 +36,10 @@ object NotificationHelper {
nm.createNotificationChannel(
NotificationChannel(
NotificationConstants.CHANNEL_SERVICE_STATUS,
- "Wallet Monitor",
+ context.getString(R.string.notif_channel_service_name),
NotificationManager.IMPORTANCE_LOW
).apply {
- description = "Background service monitoring for incoming payments"
+ description = context.getString(R.string.notif_channel_service_desc)
setShowBadge(false)
enableVibration(false)
setSound(null, null)
@@ -56,8 +55,9 @@ object NotificationHelper {
* screen for [paymentHash].
*/
fun notifyPaymentReceived(context: Context, amountSats: Long, memo: String?, paymentHash: String) {
- val title = "Payment received · +$amountSats sats"
- val text = if (!memo.isNullOrBlank()) memo else "No memo"
+ val title = context.getString(R.string.notif_payment_received_title, amountSats)
+ val text = if (!memo.isNullOrBlank()) memo
+ else context.getString(R.string.notif_payment_received_no_memo)
val notification = NotificationCompat.Builder(context, NotificationConstants.CHANNEL_PAYMENTS)
.setSmallIcon(R.drawable.ic_notification)
@@ -70,7 +70,7 @@ object NotificationHelper {
.setStyle(
NotificationCompat.BigTextStyle()
.bigText(text)
- .setSummaryText("+$amountSats sats")
+ .setSummaryText(context.getString(R.string.notif_payment_received_summary, amountSats))
)
.build()
@@ -83,8 +83,8 @@ object NotificationHelper {
* screen for [paymentHash].
*/
fun notifyPaymentSent(context: Context, amountSats: Long, paymentHash: String) {
- val title = "Payment sent"
- val text = "−$amountSats sats"
+ val title = context.getString(R.string.notif_payment_sent_title)
+ val text = context.getString(R.string.notif_payment_sent_text, amountSats)
notify(
context,
NotificationConstants.NOTIF_ID_PAYMENT_SENT,
@@ -97,8 +97,8 @@ object NotificationHelper {
fun buildServiceNotification(context: Context): Notification {
return NotificationCompat.Builder(context, NotificationConstants.CHANNEL_SERVICE_STATUS)
.setSmallIcon(R.drawable.ic_notification)
- .setContentTitle("Gudari Wallet")
- .setContentText("Monitoring for incoming payments")
+ .setContentTitle(context.getString(R.string.notif_service_title))
+ .setContentText(context.getString(R.string.notif_service_text))
.setOngoing(true)
.setSilent(true)
.setShowWhen(false)
@@ -117,9 +117,9 @@ object NotificationHelper {
// ── Private helpers ───────────────────────────────────────────────────────
private fun buildPaymentNotification(
- context: Context,
- title: String,
- text: String,
+ context : Context,
+ title : String,
+ text : String,
paymentHash: String
): Notification {
return NotificationCompat.Builder(context, NotificationConstants.CHANNEL_PAYMENTS)
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
new file mode 100644
index 0000000..6bee854
--- /dev/null
+++ b/app/src/main/res/values-es/strings.xml
@@ -0,0 +1,19 @@
+
+
+
+ Pagos
+ Alertas de pagos Lightning entrantes y salientes
+ Monitor de cartera
+ Servicio en segundo plano para pagos entrantes
+
+ Pago recibido · +%1$d sats
+ Sin nota
+ +%1$d sats
+
+ Pago enviado
+ −%1$d sats
+
+ Gudari Wallet
+ Monitorizando pagos entrantes
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index a1407d0..8c12949 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,4 +1,20 @@
Gudari Wallet
Gudari Wallet NFC payment sharing
+
+ Payments
+ Incoming and outgoing Lightning payment alerts
+ Wallet Monitor
+ Background service monitoring for incoming payments
+
+ Payment received · +%1$d sats
+ No memo
+ +%1$d sats
+
+ Payment sent
+ −%1$d sats
+
+ Gudari Wallet
+ Monitoring for incoming payments
+
\ No newline at end of file