diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /app/views/notify | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/group_was_exported_email.html.haml | 9 | ||||
-rw-r--r-- | app/views/notify/group_was_exported_email.text.erb | 6 | ||||
-rw-r--r-- | app/views/notify/group_was_not_exported_email.html.haml | 10 | ||||
-rw-r--r-- | app/views/notify/group_was_not_exported_email.text.erb | 7 | ||||
-rw-r--r-- | app/views/notify/issues_csv_email.html.haml | 9 | ||||
-rw-r--r-- | app/views/notify/issues_csv_email.text.erb | 4 | ||||
-rw-r--r-- | app/views/notify/note_design_email.html.haml | 1 | ||||
-rw-r--r-- | app/views/notify/note_design_email.text.erb | 1 | ||||
-rw-r--r-- | app/views/notify/unknown_sign_in_email.html.haml | 14 | ||||
-rw-r--r-- | app/views/notify/unknown_sign_in_email.text.haml | 10 |
10 files changed, 63 insertions, 8 deletions
diff --git a/app/views/notify/group_was_exported_email.html.haml b/app/views/notify/group_was_exported_email.html.haml new file mode 100644 index 00000000000..a2f34537662 --- /dev/null +++ b/app/views/notify/group_was_exported_email.html.haml @@ -0,0 +1,9 @@ +%p + = _('Group %{group_name} was exported successfully.') % { group_name: @group.name } + +%p + = _('The group export can be downloaded from:') + = link_to download_export_group_url(@group), rel: 'nofollow', download: '' do + #{@group.full_name} export +%p + = _('The download link will expire in 24 hours.') diff --git a/app/views/notify/group_was_exported_email.text.erb b/app/views/notify/group_was_exported_email.text.erb new file mode 100644 index 00000000000..02571459af0 --- /dev/null +++ b/app/views/notify/group_was_exported_email.text.erb @@ -0,0 +1,6 @@ +<%= _('Group %{group_name} was exported successfully.') % { group_name: @group.name } %> + +<%= _('The group export can be downloaded from:') %> +<%= download_export_group_url(@group) %> + +<%= _('The download link will expire in 24 hours.') %> diff --git a/app/views/notify/group_was_not_exported_email.html.haml b/app/views/notify/group_was_not_exported_email.html.haml new file mode 100644 index 00000000000..58fc34d41a3 --- /dev/null +++ b/app/views/notify/group_was_not_exported_email.html.haml @@ -0,0 +1,10 @@ +%p + = _("Group %{group_name} couldn't be exported.") % { group_name: @group.name } + +%p + = _('The errors we encountered were:') + + %ul + - @errors.each do |error| + %li + #{error} diff --git a/app/views/notify/group_was_not_exported_email.text.erb b/app/views/notify/group_was_not_exported_email.text.erb new file mode 100644 index 00000000000..92bd79b7b85 --- /dev/null +++ b/app/views/notify/group_was_not_exported_email.text.erb @@ -0,0 +1,7 @@ +<%= _("Group %{group_name} couldn't be exported.") % { group_name: @group.name } %> + +<%= _('The errors we encountered were:') %> + +<% @errors.each do |error| -%> + - <%= error %> +<% end -%> diff --git a/app/views/notify/issues_csv_email.html.haml b/app/views/notify/issues_csv_email.html.haml index b777ca1e57d..77502a45f02 100644 --- a/app/views/notify/issues_csv_email.html.haml +++ b/app/views/notify/issues_csv_email.html.haml @@ -1,9 +1,6 @@ --# haml-lint:disable NoPlainNodes %p{ style: 'font-size:18px; text-align:center; line-height:30px;' } - Your CSV export of #{ pluralize(@written_count, 'issue') } from project - %a{ href: project_url(@project), style: "color:#3777b0; text-decoration:none; display:block;" } - = @project.full_name - has been added to this email as an attachment. + - project_link = link_to(@project.full_name, project_url(@project), style: "color:#3777b0; text-decoration:none; display:block;") + = _('Your CSV export of %{issues_count} from project %{project_link} has been added to this email as an attachment.').html_safe % { issues_count: pluralize(@written_count, 'issue'), project_link: project_link } - if @truncated %p - This attachment has been truncated to avoid exceeding a maximum allowed attachment size of 15MB. #{ @written_count } of #{ @issues_count } issues have been included. Consider re-exporting with a narrower selection of issues. + = _('This attachment has been truncated to avoid exceeding the maximum allowed attachment size of 15MB. %{written_count} of %{issues_count} issues have been included. Consider re-exporting with a narrower selection of issues.') % { written_count: @written_count, issues_count: @issues_count } diff --git a/app/views/notify/issues_csv_email.text.erb b/app/views/notify/issues_csv_email.text.erb index 5d4128e3ae9..a1d2a4691bc 100644 --- a/app/views/notify/issues_csv_email.text.erb +++ b/app/views/notify/issues_csv_email.text.erb @@ -1,5 +1,5 @@ -Your CSV export of <%= pluralize(@written_count, 'issue') %> from project <%= @project.full_name %> (<%= project_url(@project) %>) has been added to this email as an attachment. +<%= _('Your CSV export of %{written_count} from project %{project_name} (%{project_url}) has been added to this email as an attachment.') % { written_count: pluralize(@written_count, 'issue'), project_name: @project.full_name, project_url: project_url(@project) } %> <% if @truncated %> -This attachment has been truncated to avoid exceeding a maximum allowed attachment size of 15MB. <%= @written_count %> of <%= @issues_count %> issues have been included. Consider re-exporting with a narrower selection of issues. + <%= _('This attachment has been truncated to avoid exceeding the maximum allowed attachment size of 15MB. %{written_count} of %{issues_count} issues have been included. Consider re-exporting with a narrower selection of issues.') % { written_count: @written_count, issues_count: @issues_count} %> <% end %> diff --git a/app/views/notify/note_design_email.html.haml b/app/views/notify/note_design_email.html.haml new file mode 100644 index 00000000000..5e69f01a486 --- /dev/null +++ b/app/views/notify/note_design_email.html.haml @@ -0,0 +1 @@ += render 'note_email' diff --git a/app/views/notify/note_design_email.text.erb b/app/views/notify/note_design_email.text.erb new file mode 100644 index 00000000000..413d9e6e9ac --- /dev/null +++ b/app/views/notify/note_design_email.text.erb @@ -0,0 +1 @@ +<%= render 'note_email' %> diff --git a/app/views/notify/unknown_sign_in_email.html.haml b/app/views/notify/unknown_sign_in_email.html.haml new file mode 100644 index 00000000000..a4123fada1b --- /dev/null +++ b/app/views/notify/unknown_sign_in_email.html.haml @@ -0,0 +1,14 @@ +%p + = _('Hi %{username}!') % { username: sanitize_name(@user.name) } +%p + = _('A sign-in to your account has been made from the following IP address: %{ip}.') % { ip: @ip } +%p + - password_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: 'https://docs.gitlab.com/ee/user/profile/#changing-your-password' } + = _('If you recently signed in and recognize the IP address, you may disregard this email.') + = _('If you did not recently sign in, you should immediately %{password_link_start}change your password%{password_link_end}.').html_safe % { password_link_start: password_link_start, password_link_end: '</a>'.html_safe } + = _('Passwords should be unique and not used for any other sites or services.') + +- unless @user.two_factor_enabled? + %p + - mfa_link_start = '<a href="https://docs.gitlab.com/ee/user/profile/account/two_factor_authentication.html" target="_blank">'.html_safe + = _('To further protect your account, consider configuring a %{mfa_link_start}two-factor authentication%{mfa_link_end} method.').html_safe % { mfa_link_start: mfa_link_start, mfa_link_end: '</a>'.html_safe } diff --git a/app/views/notify/unknown_sign_in_email.text.haml b/app/views/notify/unknown_sign_in_email.text.haml new file mode 100644 index 00000000000..f3efc4c4fcd --- /dev/null +++ b/app/views/notify/unknown_sign_in_email.text.haml @@ -0,0 +1,10 @@ += _('Hi %{username}!') % { username: sanitize_name(@user.name) } + += _('A sign-in to your account has been made from the following IP address: %{ip}') % { ip: @ip } + += _('If you recently signed in and recognize the IP address, you may disregard this email.') += _('If you did not recently sign in, you should immediately change your password: %{password_link}.') % { password_link: 'https://docs.gitlab.com/ee/user/profile/#changing-your-password' } += _('Passwords should be unique and not used for any other sites or services.') + +- unless @user.two_factor_enabled? + = _('To further protect your account, consider configuring a two-factor authentication method: %{mfa_link}.') % { mfa_link: 'https://docs.gitlab.com/ee/user/profile/account/two_factor_authentication.html' } |