Commit 6defe730 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Merge branch 'nicolasdular/update-email-language-for-self-managed' into 'master'

Change unsubscribe language for email campaign

See merge request gitlab-org/gitlab!59121
parents 82c14bde b7701234
...@@ -193,8 +193,12 @@ module InProductMarketingHelper ...@@ -193,8 +193,12 @@ module InProductMarketingHelper
end end
end end
def in_product_marketing_progress(track, series) def in_product_marketing_progress(track, series, format: nil)
s_('InProductMarketing|This is email %{series} of 3 in the %{track} series.') % { series: series + 1, track: track.to_s.humanize } if Gitlab.com?
s_('InProductMarketing|This is email %{series} of 3 in the %{track} series.') % { series: series + 1, track: track.to_s.humanize }
else
s_('InProductMarketing|This is email %{series} of 3 in the %{track} series. To disable notification emails sent by your local GitLab instance, either contact your administrator or %{unsubscribe_link}.') % { series: series + 1, track: track.to_s.humanize, unsubscribe_link: unsubscribe_link(format) }
end
end end
def footer_links(format: nil) def footer_links(format: nil)
...@@ -220,11 +224,9 @@ module InProductMarketingHelper ...@@ -220,11 +224,9 @@ module InProductMarketingHelper
s_('InProductMarketing|%{strong_start}GitLab Inc.%{strong_end} 268 Bush Street, #350, San Francisco, CA 94104, USA').html_safe % strong_options(format) s_('InProductMarketing|%{strong_start}GitLab Inc.%{strong_end} 268 Bush Street, #350, San Francisco, CA 94104, USA').html_safe % strong_options(format)
end end
def unsubscribe(format: nil) def unsubscribe(track, series, format: nil)
parts = [ parts = Gitlab.com? ? unsubscribe_com(format) : unsubscribe_self_managed(track, series, format)
s_('InProductMarketing|If you no longer wish to receive marketing emails from us,'),
s_('InProductMarketing|you may %{unsubscribe_link} at any time.') % { unsubscribe_link: unsubscribe_link(format) }
]
case format case format
when :html when :html
parts.join(' ') parts.join(' ')
...@@ -235,6 +237,20 @@ module InProductMarketingHelper ...@@ -235,6 +237,20 @@ module InProductMarketingHelper
private private
def unsubscribe_com(format)
[
s_('InProductMarketing|If you no longer wish to receive marketing emails from us,'),
s_('InProductMarketing|you may %{unsubscribe_link} at any time.') % { unsubscribe_link: unsubscribe_link(format) }
]
end
def unsubscribe_self_managed(track, series, format)
[
s_('InProductMarketing|To opt out of these onboarding emails, %{unsubscribe_link}.') % { unsubscribe_link: unsubscribe_link(format) },
s_("InProductMarketing|If you don't want to receive marketing emails directly from GitLab, %{marketing_preference_link}.") % { marketing_preference_link: marketing_preference_link(track, series, format) }
]
end
def in_product_marketing_cta_text(track, series) def in_product_marketing_cta_text(track, series)
{ {
create: [ create: [
...@@ -314,9 +330,23 @@ module InProductMarketingHelper ...@@ -314,9 +330,23 @@ module InProductMarketingHelper
def unsubscribe_link(format) def unsubscribe_link(format)
unsubscribe_url = Gitlab.com? ? '%tag_unsubscribe_url%' : profile_notifications_url unsubscribe_url = Gitlab.com? ? '%tag_unsubscribe_url%' : profile_notifications_url
link(s_('InProductMarketing|unsubscribe'), unsubscribe_url, format) link(s_('InProductMarketing|unsubscribe'), unsubscribe_url, format)
end end
def marketing_preference_link(track, series, format)
params = {
utm_source: 'SM',
utm_medium: 'email',
utm_campaign: 'onboarding',
utm_term: "#{track}_#{series}"
}
preference_link = "https://about.gitlab.com/company/preference-center/?#{params.to_query}"
link(s_('InProductMarketing|update your preferences'), preference_link, format)
end
def link(text, link, format) def link(text, link, format)
case format case format
when :html when :html
......
...@@ -166,6 +166,10 @@ ...@@ -166,6 +166,10 @@
= about_link('mailers/in_product_marketing', 'gitlab-logo-gray-rgb.png', 200) = about_link('mailers/in_product_marketing', 'gitlab-logo-gray-rgb.png', 200)
%tr %tr
%td{ "aria-hidden" => "true", height: "30", style: "font-size: 0; line-height: 0;" } %td{ "aria-hidden" => "true", height: "30", style: "font-size: 0; line-height: 0;" }
%tr{ style: "background-color: #ffffff;" }
%td{ style: "color: #424242; padding: 10px 30px; text-align: center; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;font-size: 16px; line-height: 22px; border: 1px solid #dddddd" }
%p
= in_product_marketing_progress(@track, @series, format: :html).html_safe
%tr %tr
%td{ bgcolor: "#ffffff", height: "auto", style: "max-width: 600px; width: 100%; text-align: center; height: 200px; padding: 25px 15px; mso-line-height-rule: exactly; min-height: 40px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;", valign: "middle", width: "100%" } %td{ bgcolor: "#ffffff", height: "auto", style: "max-width: 600px; width: 100%; text-align: center; height: 200px; padding: 25px 15px; mso-line-height-rule: exactly; min-height: 40px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;", valign: "middle", width: "100%" }
= in_product_marketing_logo(@track, @series) = in_product_marketing_logo(@track, @series)
...@@ -183,10 +187,6 @@ ...@@ -183,10 +187,6 @@
%tr %tr
%td{ align: "center", style: "padding: 10px 20px 80px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;" } %td{ align: "center", style: "padding: 10px 20px 80px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;" }
.cta_link= cta_link(@track, @series, @group, format: :html) .cta_link= cta_link(@track, @series, @group, format: :html)
%tr{ style: "background-color: #ffffff;" }
%td{ style: "color: #424242; padding: 10px 30px; text-align: center; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;font-size: 16px; line-height: 22px; border: 1px solid #dddddd" }
%p
= in_product_marketing_progress(@track, @series)
%tr{ style: "background-color: #ffffff;" } %tr{ style: "background-color: #ffffff;" }
%td{ align: "center", style: "padding:75px 20px 25px;" } %td{ align: "center", style: "padding:75px 20px 25px;" }
= about_link('', 'gitlab_logo.png', 80) = about_link('', 'gitlab_logo.png', 80)
...@@ -202,4 +202,4 @@ ...@@ -202,4 +202,4 @@
%tr{ style: "background-color: #ffffff;" } %tr{ style: "background-color: #ffffff;" }
%td{ align: "left", style: "padding:20px 30px 20px 30px;" } %td{ align: "left", style: "padding:20px 30px 20px 30px;" }
%span.footernav{ style: "color: #6e49cb; font-size: 14px; line-height: 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; color:#424242;" } %span.footernav{ style: "color: #6e49cb; font-size: 14px; line-height: 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; color:#424242;" }
= unsubscribe(format: :html).html_safe = unsubscribe(@track, @series, format: :html).html_safe
...@@ -20,4 +20,4 @@ ...@@ -20,4 +20,4 @@
<%= address %> <%= address %>
<%= unsubscribe %> <%= unsubscribe(@track, @series) %>
---
title: Change unsubscribe language for email campaign on self managed
merge_request: 59121
author:
type: changed
...@@ -16580,6 +16580,9 @@ msgstr "" ...@@ -16580,6 +16580,9 @@ msgstr ""
msgid "InProductMarketing|How to build and test faster" msgid "InProductMarketing|How to build and test faster"
msgstr "" msgstr ""
msgid "InProductMarketing|If you don't want to receive marketing emails directly from GitLab, %{marketing_preference_link}."
msgstr ""
msgid "InProductMarketing|If you no longer wish to receive marketing emails from us," msgid "InProductMarketing|If you no longer wish to receive marketing emails from us,"
msgstr "" msgstr ""
...@@ -16688,12 +16691,18 @@ msgstr "" ...@@ -16688,12 +16691,18 @@ msgstr ""
msgid "InProductMarketing|This is email %{series} of 3 in the %{track} series." msgid "InProductMarketing|This is email %{series} of 3 in the %{track} series."
msgstr "" msgstr ""
msgid "InProductMarketing|This is email %{series} of 3 in the %{track} series. To disable notification emails sent by your local GitLab instance, either contact your administrator or %{unsubscribe_link}."
msgstr ""
msgid "InProductMarketing|Ticketmaster decreased their CI build time by 15X" msgid "InProductMarketing|Ticketmaster decreased their CI build time by 15X"
msgstr "" msgstr ""
msgid "InProductMarketing|Tired of wrestling with disparate tool chains, information silos and inefficient processes? GitLab's CI/CD is built on a DevOps platform with source code management, planning, monitoring and more ready to go. Find out %{ci_link}." msgid "InProductMarketing|Tired of wrestling with disparate tool chains, information silos and inefficient processes? GitLab's CI/CD is built on a DevOps platform with source code management, planning, monitoring and more ready to go. Find out %{ci_link}."
msgstr "" msgstr ""
msgid "InProductMarketing|To opt out of these onboarding emails, %{unsubscribe_link}."
msgstr ""
msgid "InProductMarketing|To understand and get the most out of GitLab, start at the beginning and %{project_link}. In GitLab, repositories are part of a project, so after you've created your project you can go ahead and %{repo_link}." msgid "InProductMarketing|To understand and get the most out of GitLab, start at the beginning and %{project_link}. In GitLab, repositories are part of a project, so after you've created your project you can go ahead and %{repo_link}."
msgstr "" msgstr ""
...@@ -16772,6 +16781,9 @@ msgstr "" ...@@ -16772,6 +16781,9 @@ msgstr ""
msgid "InProductMarketing|unsubscribe" msgid "InProductMarketing|unsubscribe"
msgstr "" msgstr ""
msgid "InProductMarketing|update your preferences"
msgstr ""
msgid "InProductMarketing|using a CI/CD template" msgid "InProductMarketing|using a CI/CD template"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment