From d997b8f5eec5ca3f74ee5b9ab4537492bc146bf8 Mon Sep 17 00:00:00 2001 From: Thais Kusuki Date: Mon, 7 Oct 2019 23:29:11 -0300 Subject: [PATCH] Change translations from enterprise_mailer to lazy lookup --- app/views/enterprise_mailer/welcome.html.haml | 13 ++++++------- config/locales/en.yml | 18 ++++++++---------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/app/views/enterprise_mailer/welcome.html.haml b/app/views/enterprise_mailer/welcome.html.haml index 2067c9aac0..0eca1b19c0 100644 --- a/app/views/enterprise_mailer/welcome.html.haml +++ b/app/views/enterprise_mailer/welcome.html.haml @@ -1,18 +1,17 @@ %h3 - = "#{t(:email_welcome)}!" + = "#{t(".email_welcome")}!" %p.lead %strong = @enterprise.name - = "#{t(:email_registered)} #{ Spree::Config.site_name }!" + = "#{t(".email_registered")} #{ Spree::Config.site_name }!" %p - = t :email_userguide_html, link: link_to(t(:userguide), ContentConfig.user_guide_link) + = t(".email_userguide_html", link: link_to(t(".userguide"), ContentConfig.user_guide_link)) +%p + = t(".email_admin_html", link: link_to(t(".admin_panel"), spree.admin_url)) %p - = t :email_admin_html, link: link_to(t(:admin_panel), spree.admin_url) - -%p - = t :email_community_html, link: link_to(t(:join_community), ContentConfig.community_forum_url) + = t(".email_community_html", link: link_to(t(".join_community"), ContentConfig.community_forum_url)) = render 'shared/mailers/signoff' diff --git a/config/locales/en.yml b/config/locales/en.yml index ba0d11c373..fad1407539 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -136,6 +136,14 @@ en: subject: "Please confirm the email address for %{enterprise}" welcome: subject: "%{enterprise} is now on %{sitename}" + email_welcome: "Welcome" + email_registered: "is now part of" + email_userguide_html: "The User Guide with detailed support for setting up your Producer or Hub is here: %{link}" + userguide: "Open Food Network User Guide" + email_admin_html: "You can manage your account by logging into the %{link} or by clicking on the cog in the top right hand side of the homepage, and selecting Administration." + admin_panel: "Admin Panel" + email_community_html: "We also have an online forum for community discussion related to OFN software and the unique challenges of running a food enterprise. You are encouraged to join in. We are constantly evolving and your input into this forum will shape what happens next. %{link}" + join_community: "Join the community" invite_manager: subject: "%{enterprise} has invited you to be a manager" producer_mailer: @@ -1476,17 +1484,7 @@ en: products_at: "at %{distributor}" products_elsewhere: "Products found elsewhere" - email_welcome: "Welcome" email_confirmed: "Thank you for confirming your email address." - email_registered: "is now part of" - email_userguide_html: "The User Guide with detailed support for setting up your Producer or Hub is here: -%{link}" - userguide: "Open Food Network User Guide" - email_admin_html: "You can manage your account by logging into the %{link} or by clicking on the cog in the top right hand side of the homepage, and selecting Administration." - admin_panel: "Admin Panel" - email_community_html: "We also have an online forum for community discussion related to OFN software and the unique challenges of running a food enterprise. You are encouraged to join in. We are constantly evolving and your input into this forum will shape what happens next. -%{link}" - join_community: "Join the community" email_confirmation_activate_account: "Before we can activate your new account, we need to confirm your email address." email_confirmation_greeting: "Hi, %{contact}!" email_confirmation_profile_created: "A profile for %{name} has been successfully created!