From b90cf01a88df981f452a7f6b6d74e8fd0ccbf90b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 5 Jan 2023 12:09:59 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/views/notify/access_token_expired_email.html.haml | 12 ++++++++++-- app/views/notify/access_token_expired_email.text.erb | 10 +++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'app/views/notify') diff --git a/app/views/notify/access_token_expired_email.html.haml b/app/views/notify/access_token_expired_email.html.haml index 1e7c07c2282..9c3ef4cfdff 100644 --- a/app/views/notify/access_token_expired_email.html.haml +++ b/app/views/notify/access_token_expired_email.html.haml @@ -1,7 +1,15 @@ %p = _('Hi %{username}!') % { username: sanitize_name(@user.name) } %p - = _('One or more of your personal access tokens has expired.') + - if @token_names.empty? + = _('One or more of your personal access tokens has expired.') + - else + = _('The following personal access tokens have expired:') + + %p + %ul + - @token_names.each do |token| + %li= token %p - - pat_link_start = ''.html_safe % { url: @target_url } + - pat_link_start = ''.html_safe % { url: @target_url } = html_escape(_('You can create a new one or check them in your %{pat_link_start}personal access tokens%{pat_link_end} settings.')) % { pat_link_start: pat_link_start, pat_link_end: ''.html_safe } diff --git a/app/views/notify/access_token_expired_email.text.erb b/app/views/notify/access_token_expired_email.text.erb index 4dc67e85dc2..6f6a9d38192 100644 --- a/app/views/notify/access_token_expired_email.text.erb +++ b/app/views/notify/access_token_expired_email.text.erb @@ -1,5 +1,13 @@ <%= _('Hi %{username}!') % { username: sanitize_name(@user.name) } %> -<%= _('One or more of your personal access tokens has expired.') %> +<%- if @token_names.empty? -%> +<%= _('One or more of your personal access tokens have expired.') %> +<%- else -%> +<%= _('The following personal access tokens have expired:') %> + +<%- @token_names.each do |token| -%> + - <%= token %> +<%- end -%> +<%- end -%> <%= _('You can create a new one or check them in your personal access tokens settings %{pat_link}.') % { pat_link: @target_url } %> -- cgit v1.2.3