Move PaymentMailer translations out of Spree namespace

The mailer is not in the Spree namespace and we don't need to keep the
clutter.
This commit is contained in:
Maikel Linke
2026-02-06 09:53:12 +11:00
parent de873ae42c
commit c66b9611b6
5 changed files with 16 additions and 16 deletions

View File

@@ -6,7 +6,7 @@ class PaymentMailer < ApplicationMailer
def authorize_payment(payment)
@payment = payment
@order = @payment.order
subject = I18n.t('spree.payment_mailer.authorize_payment.subject',
subject = I18n.t("payment_mailer.authorize_payment.subject",
distributor: @order.distributor.name)
I18n.with_locale valid_locale(@order.user) do
mail(to: @order.email,
@@ -18,7 +18,7 @@ class PaymentMailer < ApplicationMailer
def authorization_required(payment)
@order = payment.order
shop_owner = @order.distributor.owner
subject = I18n.t('spree.payment_mailer.authorization_required.subject',
subject = I18n.t("payment_mailer.authorization_required.subject",
order: @order)
I18n.with_locale valid_locale(shop_owner) do
mail(to: shop_owner.email,
@@ -31,7 +31,7 @@ class PaymentMailer < ApplicationMailer
@order = payment.order
@taler_order_status_url = taler_order_status_url
subject = I18n.t("spree.payment_mailer.refund_available.subject",
subject = I18n.t("payment_mailer.refund_available.subject",
order: @order)
I18n.with_locale valid_locale(@order.user) do
mail(to: @order.email,

View File

@@ -1,2 +1,2 @@
= t('spree.payment_mailer.authorization_required.message', order_number: @order.number)
= t(".message", order_number: @order.number)
= link_to spree.edit_admin_order_url(@order), spree.edit_admin_order_url(@order)

View File

@@ -1,2 +1,2 @@
= t('spree.payment_mailer.authorize_payment.instructions', distributor: @payment.order.distributor.name, amount: @payment.display_amount)
= t(".instructions", distributor: @payment.order.distributor.name, amount: @payment.display_amount)
= link_to main_app.authorize_payment_url(@payment), main_app.authorize_payment_url(@payment)

View File

@@ -1,2 +1,2 @@
%p= t("spree.payment_mailer.refund_available.message", order_number: @order.number)
%p= t(".message", order_number: @order.number)
%p= link_to @taler_order_status_url, @taler_order_status_url

View File

@@ -458,6 +458,16 @@ en:
join_community: "Join the community"
invite_manager:
subject: "%{enterprise} has invited you to be a manager"
payment_mailer:
authorize_payment:
subject: "Please authorize your payment to %{distributor} on OFN"
instructions: "Your payment of %{amount} to %{distributor} requires additional authentication. Please visit the following URL to authorize your payment:"
authorization_required:
subject: "A payment requires authorization from the customer"
message: "A payment for order %{order_number} requires additional authorization from the customer. The customer has been notified via email and the payment will appear as pending until it is authorized."
refund_available:
subject: "Refund available"
message: "Your payment for order %{order_number} is being refunded. Claim your refund following the link below."
producer_mailer:
order_cycle:
subject: "Order cycle report for %{producer}"
@@ -4923,16 +4933,6 @@ en:
subject: "Reset password instructions"
confirmation_instructions:
subject: "Please confirm your OFN account"
payment_mailer:
authorize_payment:
subject: "Please authorize your payment to %{distributor} on OFN"
instructions: "Your payment of %{amount} to %{distributor} requires additional authentication. Please visit the following URL to authorize your payment:"
authorization_required:
subject: "A payment requires authorization from the customer"
message: "A payment for order %{order_number} requires additional authorization from the customer. The customer has been notified via email and the payment will appear as pending until it is authorized."
refund_available:
subject: "Refund available"
message: "Your payment for order %{order_number} is being refunded. Claim your refund following the link below."
shipment_mailer:
shipped_email:
dear_customer: "Dear Customer,"