diff options
Diffstat (limited to 'app/views/notify/repository_push_email.html.haml')
-rw-r--r-- | app/views/notify/repository_push_email.html.haml | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/app/views/notify/repository_push_email.html.haml b/app/views/notify/repository_push_email.html.haml index 93806e6de8e..ee219914513 100644 --- a/app/views/notify/repository_push_email.html.haml +++ b/app/views/notify/repository_push_email.html.haml @@ -2,29 +2,30 @@ = stylesheet_link_tag 'mailers/highlighted_diff_email' %h3 - #{@message.author_name} #{@message.action_name} #{@message.ref_type} #{@message.ref_name} - at #{link_to(@message.project_name_with_namespace, project_url(@message.project))} + = s_('Notify|%{author_name} %{action_name} %{ref_type} %{ref_name} at %{project_link}').html_safe % {author_name: @message.author_name, action_name: @message.action_name, ref_type: @message.ref_type, ref_name: @message.ref_name, project_link: link_to(@message.project_name_with_namespace, strip_tags(project_url(@message.project)))} - if @message.compare - if @message.reverse_compare? %p - %strong WARNING: - The push did not contain any new commits, but force pushed to delete the commits and changes below. + %strong + = _('WARNING:') + = s_('Notify|The push did not contain any new commits, but force pushed to delete the commits and changes below.') %h4 - = @message.reverse_compare? ? "Deleted commits:" : "Commits:" + = @message.reverse_compare? ? _("Deleted commits:") : _("Commits:") %ul - @message.commits.each do |commit| %li %strong= link_to(commit.short_id, project_commit_url(@message.project, commit)) %div - %span by #{commit.author_name} - %i at #{commit.committed_date.to_s(:iso8601)} + = html_escape(s_('Notify|%{committed_by_start} by %{author_name} %{committed_by_end} %{committed_at_start} at %{committed_date} %{committed_at_end}')) % {committed_by_start: '<span>'.html_safe, author_name: commit.author_name, committed_by_end: '</span>'.html_safe, committed_at_start: '<i>'.html_safe, committed_date: commit.committed_date.to_s(:iso8601), committed_at_end: '</i>'.html_safe} %pre.commit-message = commit.safe_message - %h4 #{pluralize @message.diffs_count, "changed file"}: + %h4 + - changed_files = n_('%d changed file', '%d changed files', @message.diffs_count) % @message.diffs_count + = s_('Notify|%{changed_files}:') % {changed_files: changed_files} %ul - @message.diffs.each do |diff_file| @@ -47,9 +48,11 @@ - unless @message.disable_diffs? - if @message.compare_timeout - %h5 The diff was not included because it is too large. + %h5 + = s_('Notify|The diff was not included because it is too large.') - else - %h4 Changes: + %h4 + = _('Changes:') - @message.diffs.each do |diff_file| - file_hash = hexdigest(diff_file.file_path) %li{ id: file_hash } @@ -57,7 +60,7 @@ - if diff_file.deleted_file? %strong< = diff_file.old_path - deleted + = s_('deleted') - elsif diff_file.renamed_file? %strong< = diff_file.old_path @@ -68,7 +71,7 @@ %strong< = diff_file.new_path - if diff_file.too_large? - The diff for this file was not included because it is too large. + = s_('Notify|The diff for this file was not included because it is too large.') - else %hr - blob = diff_file.blob @@ -76,5 +79,5 @@ %table.code.white = render partial: "projects/diffs/email_line", collection: diff_file.highlighted_diff_lines, as: :line, locals: { diff_file: diff_file } - else - No preview for this file type + = s_('Notify|No preview for this file type') %br |