From 6aaaf5dddbd636f10768765a6576dc043d7c1ba3 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 5 Nov 2012 09:54:58 +0000 Subject: [PATCH] Rework signup emails a bit Remove "lego" strings and try and reduce duplication between the text and HTML versions of the mails. --- app/helpers/notifier_helper.rb | 5 ++ app/views/notifier/signup_confirm.html.erb | 33 ++++++------ app/views/notifier/signup_confirm.text.erb | 60 +++++++++------------- config/locales/en.yml | 27 +++------- 4 files changed, 52 insertions(+), 73 deletions(-) create mode 100644 app/helpers/notifier_helper.rb diff --git a/app/helpers/notifier_helper.rb b/app/helpers/notifier_helper.rb new file mode 100644 index 000000000..4b2cd2a06 --- /dev/null +++ b/app/helpers/notifier_helper.rb @@ -0,0 +1,5 @@ +module NotifierHelper + def fp(text) + format_paragraph(text, 72, 0) + end +end diff --git a/app/views/notifier/signup_confirm.html.erb b/app/views/notifier/signup_confirm.html.erb index 74aae6af1..0c154c968 100644 --- a/app/views/notifier/signup_confirm.html.erb +++ b/app/views/notifier/signup_confirm.html.erb @@ -1,27 +1,24 @@ -

<%= t'notifier.signup_confirm_html.greeting' %>

+

<%= t("notifier.signup_confirm.greeting") %>

-<% if @url %> -

<%= t'notifier.signup_confirm_html.hopefully_you' %> - <%= SERVER_URL %>.

+

<%= t("notifier.signup_confirm.created", :site_url => SERVER_URL) %>

-

<%= t'notifier.signup_confirm_html.click_the_link' %>

+<% if @url -%> +

<%= t("notifier.signup_confirm.confirm") %>

-

<%= raw(link_to @url, @url) %>

-<% else %> -

<%= t'notifier.signup_confirm_html.created_account' %> - <%= SERVER_URL %>.

-

<%= t'notifier.signup_confirm_html.welcome' %>

-<% end %> +

<%= link_to @url, @url %>

+<% end -%> -

<%= raw(t'notifier.signup_confirm_html.introductory_video', :introductory_video_link => link_to(t('notifier.signup_confirm_html.video_to_openstreetmap'), "http://showmedo.com/videos/video?name=1800000&fromSeriesID=180")) %> - <%= raw(t'notifier.signup_confirm_html.more_videos', :more_videos_link => link_to(t('notifier.signup_confirm_html.more_videos_here'), "http://showmedo.com/videos/series?name=mS2P1ZqS6")) %>

+

<%= t("notifier.signup_confirm.welcome") %>

-

<%= raw(t'notifier.signup_confirm_html.get_reading') %>

+

<%= raw(t("notifier.signup_confirm_html.introductory_video", :introductory_video_link => link_to(t('notifier.signup_confirm_html.video_to_openstreetmap'), "http://showmedo.com/videos/video?name=1800000&fromSeriesID=180"))) %> + <%= raw(t("notifier.signup_confirm_html.more_videos", :more_videos_link => link_to(t('notifier.signup_confirm_html.more_videos_here'), "http://showmedo.com/videos/series?name=mS2P1ZqS6"))) %>

-

<%= raw(t'notifier.signup_confirm_html.ask_questions') %>

+

<%= raw(t("notifier.signup_confirm_html.get_reading")) %>

-

<%= raw(t'notifier.signup_confirm_html.wiki_signup') %>

+

<%= raw(t("notifier.signup_confirm_html.ask_questions")) %>

-

<%= raw(t'notifier.signup_confirm_html.user_wiki_page') %>

+

<%= raw(t("notifier.signup_confirm_html.wiki_signup")) %>

-

<%= raw(t'notifier.signup_confirm_html.current_user') %>

+

<%= raw(t("notifier.signup_confirm_html.user_wiki_page")) %>

+ +

<%= raw(t("notifier.signup_confirm_html.current_user")) %>

diff --git a/app/views/notifier/signup_confirm.text.erb b/app/views/notifier/signup_confirm.text.erb index 274d9f52f..76bc65808 100644 --- a/app/views/notifier/signup_confirm.text.erb +++ b/app/views/notifier/signup_confirm.text.erb @@ -1,56 +1,46 @@ -<%= t'notifier.signup_confirm_plain.greeting' %> +<%= fp(t("notifier.signup_confirm.greeting")) %> -<% if @url %> -<%= t'notifier.signup_confirm_plain.hopefully_you' %> +<%= fp(t("notifier.signup_confirm.created", :site_url => SERVER_URL)) %> -<%= SERVER_URL %> +<% if @url -%> +<%= fp(t("notifier.signup_confirm.confirm")) %> -<%= t'notifier.signup_confirm_plain.click_the_link_1' %> -<%= t'notifier.signup_confirm_plain.click_the_link_2' %> + <%= @url %> -<%= @url %> -<% else %> -<%= t'notifier.signup_confirm_plain.created_account' %> +<% end -%> +<%= fp(t("notifier.signup_confirm.welcome")) %> -<%= SERVER_URL %> +<%= fp(t("notifier.signup_confirm_plain.introductory_video")) %> -<%= t'notifier.signup_confirm_plain.welcome_1' %> -<%= t'notifier.signup_confirm_plain.welcome_2' %> -<% end %> + http://showmedo.com/videos/video?name=1800000&fromSeriesID=180 -<%= t'notifier.signup_confirm_plain.introductory_video' %> +<%= fp(t("notifier.signup_confirm_plain.more_videos")) %> - http://showmedo.com/videos/video?name=1800000&fromSeriesID=180 + http://showmedo.com/videos/series?name=mS2P1ZqS6 -<%= t'notifier.signup_confirm_plain.more_videos' %> +<%= fp(t("notifier.signup_confirm_plain.the_wiki")) %> - http://showmedo.com/videos/series?name=mS2P1ZqS6 + <%= t("notifier.signup_confirm_plain.the_wiki_url") %> -<%= t'notifier.signup_confirm_plain.the_wiki' %> +<%= fp(t("notifier.signup_confirm_plain.blog_and_twitter")) %> - <%= t'notifier.signup_confirm_plain.the_wiki_url' %> + http://blog.openstreetmap.org/ + http://twitter.com/openstreetmap -<%= t'notifier.signup_confirm_plain.blog_and_twitter' %> +<%= fp(t("notifier.signup_confirm_plain.opengeodata")) %> - http://blog.openstreetmap.org/ - http://twitter.com/openstreetmap + http://www.opengeodata.org/ -<%= t'notifier.signup_confirm_plain.opengeodata' %> +<%= fp(t("notifier.signup_confirm_plain.ask_questions")) %> - http://www.opengeodata.org/ + http://help.openstreetmap.org/ -<%= t'notifier.signup_confirm_plain.ask_questions' %> +<%= fp(t("notifier.signup_confirm_plain.wiki_signup")) %> - http://help.openstreetmap.org/ + <%= t("notifier.signup_confirm_plain.wiki_signup_url") %> -<%= t'notifier.signup_confirm_plain.wiki_signup' %> +<%= fp(t("notifier.signup_confirm_plain.user_wiki_page")) %> - <%= t'notifier.signup_confirm_plain.wiki_signup_url' %> +<%= fp(t("notifier.signup_confirm_plain.current_user")) %> -<%= t'notifier.signup_confirm_plain.user_wiki_1' %> -<%= t'notifier.signup_confirm_plain.user_wiki_2' %> - -<%= t'notifier.signup_confirm_plain.current_user_1' %> -<%= t'notifier.signup_confirm_plain.current_user_2' %> - -http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region + http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region diff --git a/config/locales/en.yml b/config/locales/en.yml index 9f6ea5ef5..aa3149e91 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1145,17 +1145,12 @@ en: loaded_successfully: loaded successfully with %{trace_points} out of a possible %{possible_points} points. signup_confirm: subject: "[OpenStreetMap] Welcome to OpenStreetMap" - signup_confirm_plain: greeting: "Hi there!" - hopefully_you: "Someone (hopefully you) would like to create an account over at" - created_account: "You have just created a new account over at" - # next two translations run-on : please word wrap appropriately - click_the_link_1: "If this is you, welcome! Please click the link below to confirm your" - click_the_link_2: "account and read on for more information about OpenStreetMap." - # next two translations run-on : please word wrap appropriately - welcome_1: "We would like to welcome you and provide you with some additional information" - welcome_2: "to get you started." - introductory_video: "You can watch an introductory video to OpenStreetMap here:" + created: "Someone (hopefully you) just created an account at %{site_url}." + confirm: "Before we do anything else, we need to confirm that this request came from you, so if it did then please click the link below to confirm your account:" + welcome: "We would like to welcome you and provide you with some additional information to get you started." + signup_confirm_plain: + introductory_video: "You can watch an introductory video to OpenStreetMap here:" more_videos: "There are more videos here:" the_wiki: "Get reading about OpenStreetMap on the wiki:" the_wiki_url: "http://wiki.openstreetmap.org/wiki/Beginners%27_Guide" @@ -1164,17 +1159,9 @@ en: ask_questions: "You can ask any questions you may have about OpenStreetMap at our question and answer site:" wiki_signup: "You may also want to sign up to the OpenStreetMap wiki at:" wiki_signup_url: "http://wiki.openstreetmap.org/index.php?title=Special:Userlogin&type=signup&returnto=Main_Page" - # next four translations are in pairs : please word wrap appropriately - user_wiki_1: "It is recommended that you create a user wiki page, which includes" - user_wiki_2: "category tags noting where you are, such as [[Category:Users_in_London]]." - current_user_1: "A list of current users in categories, based on where in the world" - current_user_2: "they are, is available from:" + user_wiki_page: "It is recommended that you create a user wiki page, which includes category tags noting where you are, such as [[Category:Users_in_London]]." + current_user: "A list of current users in categories, based on where in the world they are, is available from:" signup_confirm_html: - greeting: "Hi there!" - hopefully_you: "Someone (hopefully you) would like to create an account over at" - created_account: "You have just created a new account over at" - click_the_link: "If this is you, welcome! Please click the link below to confirm that account and read on for more information about OpenStreetMap" - welcome: "We would like to welcome you and provide you with some additional information to get you started." introductory_video: "You can watch an %{introductory_video_link}." video_to_openstreetmap: "introductory video to OpenStreetMap" more_videos: "There are %{more_videos_link}." -- 2.43.2