From 15a8d9b0ca2ee5c856112e43cd91c40ed6f8cc0b Mon Sep 17 00:00:00 2001 From: unarist Date: Mon, 31 Jul 2017 07:18:44 +0900 Subject: [PATCH] Make salutation of email localizable (#4454) --- app/views/admin_mailer/new_report.text.erb | 2 +- app/views/notification_mailer/digest.text.erb | 2 +- app/views/notification_mailer/favourite.text.erb | 2 +- app/views/notification_mailer/follow.text.erb | 2 +- app/views/notification_mailer/follow_request.text.erb | 2 +- app/views/notification_mailer/mention.text.erb | 2 +- app/views/notification_mailer/reblog.text.erb | 2 +- config/locales/en.yml | 1 + 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/views/admin_mailer/new_report.text.erb b/app/views/admin_mailer/new_report.text.erb index 6fa744bc3d..671ae5ca70 100644 --- a/app/views/admin_mailer/new_report.text.erb +++ b/app/views/admin_mailer/new_report.text.erb @@ -1,4 +1,4 @@ -<%= display_name(@me) %>, +<%= raw t('application_mailer.salutation', name: display_name(@me)) %> <%= raw t('admin_mailer.new_report.body', target: @report.target_account.acct, reporter: @report.account.acct) %> diff --git a/app/views/notification_mailer/digest.text.erb b/app/views/notification_mailer/digest.text.erb index b633529787..e0d1f9b8b9 100644 --- a/app/views/notification_mailer/digest.text.erb +++ b/app/views/notification_mailer/digest.text.erb @@ -1,4 +1,4 @@ -<%= display_name(@me) %>, +<%= raw t('application_mailer.salutation', name: display_name(@me)) %> <%= raw t('notification_mailer.digest.body', since: l(@since), instance: root_url) %> <% @notifications.each do |notification| %> diff --git a/app/views/notification_mailer/favourite.text.erb b/app/views/notification_mailer/favourite.text.erb index 795045307f..2581b4909b 100644 --- a/app/views/notification_mailer/favourite.text.erb +++ b/app/views/notification_mailer/favourite.text.erb @@ -1,4 +1,4 @@ -<%= display_name(@me) %>, +<%= raw t('application_mailer.salutation', name: display_name(@me)) %> <%= raw t('notification_mailer.favourite.body', name: @account.acct) %> diff --git a/app/views/notification_mailer/follow.text.erb b/app/views/notification_mailer/follow.text.erb index af41a3080e..cbe46f5524 100644 --- a/app/views/notification_mailer/follow.text.erb +++ b/app/views/notification_mailer/follow.text.erb @@ -1,4 +1,4 @@ -<%= display_name(@me) %>, +<%= raw t('application_mailer.salutation', name: display_name(@me)) %> <%= raw t('notification_mailer.follow.body', name: @account.acct) %> diff --git a/app/views/notification_mailer/follow_request.text.erb b/app/views/notification_mailer/follow_request.text.erb index 49087a575e..a018394b85 100644 --- a/app/views/notification_mailer/follow_request.text.erb +++ b/app/views/notification_mailer/follow_request.text.erb @@ -1,4 +1,4 @@ -<%= display_name(@me) %>, +<%= raw t('application_mailer.salutation', name: display_name(@me)) %> <%= raw t('notification_mailer.follow_request.body', name: @account.acct) %> diff --git a/app/views/notification_mailer/mention.text.erb b/app/views/notification_mailer/mention.text.erb index b38c5a4d06..03f53813b9 100644 --- a/app/views/notification_mailer/mention.text.erb +++ b/app/views/notification_mailer/mention.text.erb @@ -1,4 +1,4 @@ -<%= display_name(@me) %>, +<%= raw t('application_mailer.salutation', name: display_name(@me)) %> <%= raw t('notification_mailer.mention.body', name: @status.account.acct) %> diff --git a/app/views/notification_mailer/reblog.text.erb b/app/views/notification_mailer/reblog.text.erb index fd85437a7d..8fc841bf6e 100644 --- a/app/views/notification_mailer/reblog.text.erb +++ b/app/views/notification_mailer/reblog.text.erb @@ -1,4 +1,4 @@ -<%= display_name(@me) %>, +<%= raw t('application_mailer.salutation', name: display_name(@me)) %> <%= raw t('notification_mailer.reblog.body', name: @account.acct) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index ace83a0f81..90b4fe82bc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -215,6 +215,7 @@ en: body: "%{reporter} has reported %{target}" subject: New report for %{instance} (#%{id}) application_mailer: + salutation: '%{name},' settings: 'Change e-mail preferences: %{link}' signature: Mastodon notifications from %{instance} view: 'View:'