Completa i18n IT/EN/FR/DE/ES su sito pubblico, area autenticata e admin.
Tutte le view marketing, legali, viewer, dashboard e admin usano t(); mailer utente-facing e flash localizzati; admin con LocaleResolver e selettore lingua. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,15 +4,18 @@ module Billing
|
||||
@invoice = params[:invoice]
|
||||
@club = @invoice.club
|
||||
|
||||
attachments["fattura-#{@invoice.number.parameterize}.pdf"] = {
|
||||
mime_type: "application/pdf",
|
||||
content: @invoice.pdf.download
|
||||
}
|
||||
I18n.with_locale(I18n.locale) do
|
||||
prefix = t("mailers.invoice.attachment_prefix")
|
||||
attachments["#{prefix}-#{@invoice.number.parameterize}.pdf"] = {
|
||||
mime_type: "application/pdf",
|
||||
content: @invoice.pdf.download
|
||||
}
|
||||
|
||||
mail(
|
||||
to: @club.billing_email,
|
||||
subject: "Fattura #{@invoice.display_number} — Match Live TV"
|
||||
)
|
||||
mail(
|
||||
to: @club.billing_email,
|
||||
subject: t("mailers.invoice.subject", number: @invoice.display_number)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,11 +9,14 @@ module Recordings
|
||||
@recipient = recipient
|
||||
@replay_url = recording.replay_url
|
||||
@expires_at = recording.expires_at
|
||||
@archive_url = "#{MatchLiveTv.app_public_url.chomp('/')}/clubs/#{@club.id}/replays"
|
||||
|
||||
mail(
|
||||
to: recipient.email,
|
||||
subject: "Replay pronto — #{recording.title_or_default}"
|
||||
)
|
||||
I18n.with_locale(I18n.locale) do
|
||||
mail(
|
||||
to: recipient.email,
|
||||
subject: t("mailers.replay_ready.subject", title: recording.title_or_default)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def replay_expiring_soon(recording:, recipient:)
|
||||
@@ -24,11 +27,14 @@ module Recordings
|
||||
@replay_url = recording.replay_url
|
||||
@expires_at = recording.expires_at
|
||||
@days_left = ((recording.expires_at - Time.current) / 1.day).ceil
|
||||
@archive_url = "#{MatchLiveTv.app_public_url.chomp('/')}/clubs/#{@club.id}/replays"
|
||||
|
||||
mail(
|
||||
to: recipient.email,
|
||||
subject: "Replay in scadenza tra #{@days_left} giorni — #{recording.title_or_default}"
|
||||
)
|
||||
I18n.with_locale(I18n.locale) do
|
||||
mail(
|
||||
to: recipient.email,
|
||||
subject: t("mailers.replay_expiring.subject", days: @days_left, title: recording.title_or_default)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,6 +6,8 @@ class UserMailer < ApplicationMailer
|
||||
@reset_url = public_password_reset_url(token: token)
|
||||
@expiry_hours = MatchLiveTv.password_reset_expiry_hours
|
||||
|
||||
mail to: user.email, subject: "Reimposta la password — Match Live TV"
|
||||
I18n.with_locale(I18n.locale) do
|
||||
mail to: user.email, subject: t("mailers.password_reset.subject")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user