diff --git a/lib/features/trades/widgets/mostro_message_detail_widget.dart b/lib/features/trades/widgets/mostro_message_detail_widget.dart index 91964f7c..524d53f3 100644 --- a/lib/features/trades/widgets/mostro_message_detail_widget.dart +++ b/lib/features/trades/widgets/mostro_message_detail_widget.dart @@ -69,9 +69,10 @@ class MostroMessageDetail extends ConsumerWidget { .mostroInstance ?.expirationSeconds ?? 900; + final expMinutes = (expSecs / 60).round(); return S.of(context)!.payInvoice( orderPayload?.amount.toString() ?? '', - '${expSecs ~/ 60} minutes', + expMinutes, orderPayload?.fiatAmount.toString() ?? '', orderPayload?.fiatCode ?? '', ); @@ -81,11 +82,12 @@ class MostroMessageDetail extends ConsumerWidget { .mostroInstance ?.expirationSeconds ?? 900; + final expMinutes = (expSecs / 60).round(); return S.of(context)!.addInvoice( orderPayload?.amount.toString() ?? '', - orderPayload?.fiatCode ?? '', + expMinutes, orderPayload?.fiatAmount.toString() ?? '', - expSecs, + orderPayload?.fiatCode ?? '', ); case actions.Action.waitingSellerToPay: final expSecs = ref @@ -93,16 +95,18 @@ class MostroMessageDetail extends ConsumerWidget { .mostroInstance ?.expirationSeconds ?? 900; + final expMinutes = (expSecs / 60).round(); return S .of(context)! - .waitingSellerToPay(orderPayload?.id ?? '', expSecs); + .waitingSellerToPay(expMinutes, orderPayload?.id ?? ''); case actions.Action.waitingBuyerInvoice: final expSecs = ref .read(orderRepositoryProvider) .mostroInstance ?.expirationSeconds ?? 900; - return S.of(context)!.waitingBuyerInvoice(expSecs); + final expMinutes = (expSecs / 60).round(); + return S.of(context)!.waitingBuyerInvoice(expMinutes); case actions.Action.buyerInvoiceAccepted: return S.of(context)!.buyerInvoiceAccepted; case actions.Action.holdInvoicePaymentAccepted: diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 364adba5..9ee8fc50 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -2,10 +2,70 @@ "@@locale": "en", "newOrder": "Your offer has been published! Please wait until another user picks your order. It will be available for {expiration_hours} hours. You can cancel this order before another user picks it up by executing: cancel.", "canceled": "You have canceled the order ID: {id}.", - "payInvoice": "Please pay this hold invoice of {amount} Sats for {fiat_code} {fiat_amount} to start the operation. If you do not pay it within {expiration_seconds}, the trade will be canceled.", - "addInvoice": "Please send me an invoice for {amount} satoshis equivalent to {fiat_code} {fiat_amount}. This is where I will send the funds upon trade completion. If you don't provide the invoice within {expiration_seconds}, the trade will be canceled.", - "waitingSellerToPay": "Please wait. I’ve sent a payment request to the seller to send the Sats for the order ID {id}. If the seller doesn’t complete the payment within {expiration_seconds}, the trade will be canceled.", - "waitingBuyerInvoice": "Payment received! Your Sats are now 'held' in your wallet. I’ve requested the buyer to provide an invoice. If they don’t do so within {expiration_seconds}, your Sats will return to your wallet, and the trade will be canceled.", + "payInvoice": "Please pay this hold invoice of {amount} Sats for {fiat_code} {fiat_amount} to start the operation. If you do not pay it within {expiration_seconds} minutes, the trade will be canceled.", + "@payInvoice": { + "placeholders": { + "amount": { + "type": "String", + "description": "The amount of satoshis" + }, + "expiration_seconds": { + "type": "int", + "description": "The expiration time in minutes" + }, + "fiat_amount": { + "type": "String", + "description": "The fiat amount" + }, + "fiat_code": { + "type": "String", + "description": "The fiat currency code" + } + } + }, + "addInvoice": "Please send me an invoice for {amount} satoshis equivalent to {fiat_code} {fiat_amount}. This is where I will send the funds upon trade completion. If you don't provide the invoice within {expiration_seconds} minutes, the trade will be canceled.", + "@addInvoice": { + "placeholders": { + "amount": { + "type": "String", + "description": "The amount of satoshis" + }, + "expiration_seconds": { + "type": "int", + "description": "The expiration time in minutes" + }, + "fiat_amount": { + "type": "String", + "description": "The fiat amount" + }, + "fiat_code": { + "type": "String", + "description": "The fiat currency code" + } + } + }, + "waitingSellerToPay": "Please wait. I’ve sent a payment request to the seller to send the Sats for the order ID {id}. If the seller doesn’t complete the payment within {expiration_seconds} minutes, the trade will be canceled.", + "@waitingSellerToPay": { + "placeholders": { + "expiration_seconds": { + "type": "int", + "description": "The expiration time in minutes" + }, + "id": { + "type": "String", + "description": "The order ID" + } + } + }, + "waitingBuyerInvoice": "Payment received! Your Sats are now 'held' in your wallet. I’ve requested the buyer to provide an invoice. If they don’t do so within {expiration_seconds} minutes, your Sats will return to your wallet, and the trade will be canceled.", + "@waitingBuyerInvoice": { + "placeholders": { + "expiration_seconds": { + "type": "int", + "description": "The expiration time in minutes" + } + } + }, "buyerInvoiceAccepted": "The invoice has been successfully saved.", "holdInvoicePaymentAccepted": "Contact the seller at {seller_npub} to arrange how to send {fiat_code} {fiat_amount} using {payment_method}. Once you send the fiat money, please notify me with fiat-sent.", "buyerTookOrder": "Contact the buyer at {buyer_npub} to inform them how to send {fiat_code} {fiat_amount} through {payment_method}. You’ll be notified when the buyer confirms the fiat payment. Afterward, verify if it has arrived. If the buyer does not respond, you can initiate a cancellation or a dispute. Remember, an administrator will NEVER contact you to resolve your order unless you open a dispute first.", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index db570bcd..a747114e 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -2,10 +2,70 @@ "@@locale": "es", "newOrder": "¡Tu oferta ha sido publicada! Por favor espera hasta que otro usuario elija tu orden. Estará disponible durante {expiration_hours} horas. Puedes cancelar esta orden antes de que otro usuario la tome ejecutando: cancel.", "canceled": "Has cancelado la orden ID: {id}.", - "payInvoice": "Por favor paga esta factura retenida de {amount} Sats por {fiat_code} {fiat_amount} para iniciar la operación. Si no la pagas dentro de {expiration_seconds}, el intercambio será cancelado.", - "addInvoice": "Por favor envíame una factura por {amount} satoshis equivalente a {fiat_code} {fiat_amount}. Aquí es donde enviaré los fondos una vez completado el intercambio. Si no proporcionas la factura dentro de {expiration_seconds}, el intercambio será cancelado.", - "waitingSellerToPay": "Por favor espera. He enviado una solicitud de pago al vendedor para enviar los Sats para la orden ID {id}. Si el vendedor no completa el pago dentro de {expiration_seconds}, el intercambio será cancelado.", - "waitingBuyerInvoice": "¡Pago recibido! Tus Sats ahora están 'retenidos' en tu billetera. He solicitado al comprador que proporcione una factura. Si no lo hace dentro de {expiration_seconds}, tus Sats regresarán a tu billetera y el intercambio será cancelado.", + "payInvoice": "Por favor paga esta factura retenida de {amount} Sats por {fiat_amount} {fiat_code} para iniciar la operación. Si no la pagas antes de {expiration_seconds} minutos, el intercambio será cancelado.", + "@payInvoice": { + "placeholders": { + "amount": { + "type": "String", + "description": "La cantidad de satoshis" + }, + "expiration_seconds": { + "type": "int", + "description": "El tiempo de expiración en minutos" + }, + "fiat_amount": { + "type": "String", + "description": "La cantidad fiat" + }, + "fiat_code": { + "type": "String", + "description": "El código de moneda fiat" + } + } + }, + "addInvoice": "Por favor envíame una factura por {amount} satoshis equivalente a {fiat_amount} {fiat_code}. Aquí es donde enviaré los fondos una vez completado el intercambio. Si no proporcionas la factura antes de {expiration_seconds} minutos, el intercambio será cancelado.", + "@addInvoice": { + "placeholders": { + "amount": { + "type": "String", + "description": "La cantidad de satoshis" + }, + "expiration_seconds": { + "type": "int", + "description": "El tiempo de expiración en minutos" + }, + "fiat_amount": { + "type": "String", + "description": "La cantidad fiat" + }, + "fiat_code": { + "type": "String", + "description": "El código de moneda fiat" + } + } + }, + "waitingSellerToPay": "Por favor espera. He enviado una solicitud de pago al vendedor para enviar los Sats para la orden con ID {id}. Si el vendedor no completa el pago dentro de {expiration_seconds} minutos, el intercambio será cancelado.", + "@waitingSellerToPay": { + "placeholders": { + "expiration_seconds": { + "type": "int", + "description": "El tiempo de expiración en minutos" + }, + "id": { + "type": "String", + "description": "El ID del pedido" + } + } + }, + "waitingBuyerInvoice": "¡Pago recibido! Tus Sats ahora están 'retenidos' en tu billetera. He solicitado al comprador que proporcione una factura. Si no lo hace dentro de {expiration_seconds} minutos, tus Sats regresarán a tu billetera y el intercambio será cancelado.", + "@waitingBuyerInvoice": { + "placeholders": { + "expiration_seconds": { + "type": "int", + "description": "El tiempo de expiración en minutos" + } + } + }, "buyerInvoiceAccepted": "La factura ha sido guardada exitosamente.", "holdInvoicePaymentAccepted": "Contacta al vendedor en {seller_npub} para acordar cómo enviar {fiat_code} {fiat_amount} usando {payment_method}. Una vez que envíes el dinero fiat, por favor notifícame con fiat-sent.", "buyerTookOrder": "Contacta al comprador en {buyer_npub} para informarle cómo enviar {fiat_code} {fiat_amount} a través de {payment_method}. Serás notificado cuando el comprador confirme el pago fiat. Después, verifica si ha llegado. Si el comprador no responde, puedes iniciar una cancelación o una disputa. Recuerda, un administrador NUNCA te contactará para resolver tu orden a menos que abras una disputa primero.", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index 80f20333..85471296 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -2,10 +2,70 @@ "@@locale": "it", "newOrder": "La tua offerta è stata pubblicata! Attendi fino a quando un altro utente accetta il tuo ordine. Sarà disponibile per {expiration_hours} ore. Puoi annullare questo ordine prima che un altro utente lo prenda premendo: Cancella.", "canceled": "Hai annullato l'ordine ID: {id}!", - "payInvoice": "Paga questa Hodl Invoice di {amount} Sats per {fiat_amount} {fiat_code} per iniziare l'operazione. Se non la paghi entro {expiration_seconds} lo scambio sarà annullato.", - "addInvoice": "Inserisci una Invoice bolt11 di {amount} satoshi equivalente a {fiat_amount} {fiat_code}. Questa invoice riceverà i fondi una volta completato lo scambio. Se non fornisci una invoice entro {expiration_seconds} questo scambio sarà annullato.", + "payInvoice": "Paga questa Hodl Invoice di {amount} Sats per {fiat_amount} {fiat_code} per iniziare l'operazione. Se non la paghi entro {expiration_seconds} minuti lo scambio sarà annullato.", + "@payInvoice": { + "placeholders": { + "amount": { + "type": "String", + "description": "L'importo in satoshi" + }, + "expiration_seconds": { + "type": "int", + "description": "Il tempo di scadenza in minuti" + }, + "fiat_amount": { + "type": "String", + "description": "L'importo fiat" + }, + "fiat_code": { + "type": "String", + "description": "Il codice della valuta fiat" + } + } + }, + "addInvoice": "Inserisci una Invoice bolt11 di {amount} satoshi equivalente a {fiat_amount} {fiat_code}. Questa invoice riceverà i fondi una volta completato lo scambio. Se non fornisci una invoice entro {expiration_seconds} minuti questo scambio sarà annullato.", + "@addInvoice": { + "placeholders": { + "amount": { + "type": "String", + "description": "L'importo in satoshi" + }, + "expiration_seconds": { + "type": "int", + "description": "Il tempo di scadenza in minuti" + }, + "fiat_amount": { + "type": "String", + "description": "L'importo fiat" + }, + "fiat_code": { + "type": "String", + "description": "Il codice della valuta fiat" + } + } + }, "waitingSellerToPay": "Attendi un momento per favore. Ho inviato una richiesta di pagamento al venditore per rilasciare i Sats per l'ordine ID {id}. Una volta effettuato il pagamento, vi connetterò entrambi. Se il venditore non completa il pagamento entro {expiration_seconds} minuti lo scambio sarà annullato.", - "waitingBuyerInvoice": "Pagamento ricevuto! I tuoi Sats sono ora 'custoditi' nel tuo portafoglio. Attendi un momento per favore. Ho richiesto all'acquirente di fornire una invoice lightning. Una volta ricevuta, vi connetterò entrambi, altrimenti se non la riceviamo entro {expiration_seconds} i tuoi Sats saranno nuovamente disponibili nel tuo portafoglio e lo scambio sarà annullato.", + "@waitingSellerToPay": { + "placeholders": { + "expiration_seconds": { + "type": "int", + "description": "Il tempo di scadenza in minuti" + }, + "id": { + "type": "String", + "description": "L'ID dell'ordine" + } + } + }, + "waitingBuyerInvoice": "Pagamento ricevuto! I tuoi Sats sono ora 'custoditi' nel tuo portafoglio. Attendi un momento per favore. Ho richiesto all'acquirente di fornire una invoice lightning. Una volta ricevuta, vi connetterò entrambi, altrimenti se non la riceviamo entro {expiration_seconds} minuti i tuoi Sats saranno nuovamente disponibili nel tuo portafoglio e lo scambio sarà annullato.", + "@waitingBuyerInvoice": { + "placeholders": { + "expiration_seconds": { + "type": "int", + "description": "Il tempo di scadenza in minuti" + } + } + }, "buyerInvoiceAccepted": "Fattura salvata con successo!", "holdInvoicePaymentAccepted": "Contatta il venditore tramite la sua npub {seller_npub} ed ottieni i dettagli per inviare il pagamento di {fiat_amount} {fiat_code} utilizzando {payment_method}. Una volta inviato il pagamento, clicca: Pagamento inviato", "buyerTookOrder": "Contatta l'acquirente, ecco il suo npub {buyer_npub}, per informarlo su come inviarti {fiat_amount} {fiat_code} tramite {payment_method}. Riceverai una notifica una volta che l'acquirente indicherà che il pagamento fiat è stato inviato. Successivamente, dovresti verificare se sono arrivati i fondi. Se l'acquirente non risponde, puoi iniziare l'annullamento dell'ordine o una disputa. Ricorda, un amministratore NON ti contatterà per risolvere il tuo ordine a meno che tu non apra prima una disputa.",