From 342e25dd5a154e1389a83228aed0b75c080d30c2 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 25 Nov 2020 14:17:41 +0000 Subject: [PATCH] Remove duplicate translation strings, and use short form translation lookups --- app/views/user_mailer/email_confirm.html.erb | 6 +++--- app/views/user_mailer/email_confirm.text.erb | 6 +++--- app/views/user_mailer/lost_password.html.erb | 6 +++--- app/views/user_mailer/lost_password.text.erb | 6 +++--- config/locales/en.yml | 10 ---------- 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/app/views/user_mailer/email_confirm.html.erb b/app/views/user_mailer/email_confirm.html.erb index 3848b192b..d972e9f64 100644 --- a/app/views/user_mailer/email_confirm.html.erb +++ b/app/views/user_mailer/email_confirm.html.erb @@ -1,7 +1,7 @@ -

<%= t "user_mailer.email_confirm_html.greeting" %>

+

<%= t ".greeting" %>

-

<%= t "user_mailer.email_confirm_html.hopefully_you", :server_url => Settings.server_url, :new_address => @address %>

+

<%= t ".hopefully_you", :server_url => Settings.server_url, :new_address => @address %>

-

<%= t "user_mailer.email_confirm_html.click_the_link" %>

+

<%= t ".click_the_link" %>

<%= @url %>

diff --git a/app/views/user_mailer/email_confirm.text.erb b/app/views/user_mailer/email_confirm.text.erb index e4fff2b6d..66bd55307 100644 --- a/app/views/user_mailer/email_confirm.text.erb +++ b/app/views/user_mailer/email_confirm.text.erb @@ -1,7 +1,7 @@ -<%= t 'user_mailer.email_confirm_plain.greeting' %> +<%= t '.greeting' %> -<%= word_wrap(t 'user_mailer.email_confirm_plain.hopefully_you', :server_url => Settings.server_url, :new_address => @address) %> +<%= word_wrap(t '.hopefully_you', :server_url => Settings.server_url, :new_address => @address) %> -<%= t 'user_mailer.email_confirm_plain.click_the_link' %> +<%= t '.click_the_link' %> <%= @url %> diff --git a/app/views/user_mailer/lost_password.html.erb b/app/views/user_mailer/lost_password.html.erb index 7e61b6c49..f22480bb3 100644 --- a/app/views/user_mailer/lost_password.html.erb +++ b/app/views/user_mailer/lost_password.html.erb @@ -1,7 +1,7 @@ -

<%= t "user_mailer.lost_password_html.greeting" %>

+

<%= t ".greeting" %>

-

<%= t "user_mailer.lost_password_html.hopefully_you" %>

+

<%= t ".hopefully_you" %>

-

<%= t "user_mailer.lost_password_html.click_the_link" %>

+

<%= t ".click_the_link" %>

<%= @url %>

diff --git a/app/views/user_mailer/lost_password.text.erb b/app/views/user_mailer/lost_password.text.erb index 778fa6540..560ec1329 100644 --- a/app/views/user_mailer/lost_password.text.erb +++ b/app/views/user_mailer/lost_password.text.erb @@ -1,7 +1,7 @@ -<%= t 'user_mailer.lost_password_plain.greeting' %> +<%= t '.greeting' %> -<%= word_wrap(t 'user_mailer.lost_password_plain.hopefully_you') %> +<%= word_wrap(t '.hopefully_you') %> -<%= t 'user_mailer.lost_password_plain.click_the_link' %> +<%= t '.click_the_link' %> <%= @url %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8ceb04f8e..50dabce26 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1449,21 +1449,11 @@ en: welcome: "After you confirm your account, we'll provide you with some additional information to get you started." email_confirm: subject: "[OpenStreetMap] Confirm your email address" - email_confirm_plain: - greeting: "Hi," - hopefully_you: "Someone (hopefully you) would like to change their email address over at %{server_url} to %{new_address}." - click_the_link: "If this is you, please click the link below to confirm the change." - email_confirm_html: greeting: "Hi," hopefully_you: "Someone (hopefully you) would like to change their email address over at %{server_url} to %{new_address}." click_the_link: "If this is you, please click the link below to confirm the change." lost_password: subject: "[OpenStreetMap] Password reset request" - lost_password_plain: - greeting: "Hi," - hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account." - click_the_link: "If this is you, please click the link below to reset your password." - lost_password_html: greeting: "Hi," hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account." click_the_link: "If this is you, please click the link below to reset your password." -- 2.43.2