diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-12-31 11:39:43 +0300 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-07 06:16:58 +0300 |
commit | e2698d5d7455d91fa94f9bbf1fc838f8cb142700 (patch) | |
tree | 900a7abd2983a5a31843c25a13ce06898c1e02d6 /app/views/notify | |
parent | 63e9969ca3ac57839b78d9cc44bcf32bc9a45248 (diff) |
Improve email messages
Also refactored cleanup view to use the same localized string
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/import_issues_csv_email.html.haml | 10 | ||||
-rw-r--r-- | app/views/notify/import_issues_csv_email.text.erb | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/app/views/notify/import_issues_csv_email.html.haml b/app/views/notify/import_issues_csv_email.html.haml index a6a797a5fb7..f30d2b5f078 100644 --- a/app/views/notify/import_issues_csv_email.html.haml +++ b/app/views/notify/import_issues_csv_email.html.haml @@ -7,12 +7,12 @@ has been completed. %p{ style: text_style } - #{pluralize(@results[:success], 'issue')} imported successfully. + #{pluralize(@results[:success], 'issue')} imported. -- if @results[:errors].present? +- if @results[:error_lines].present? %p{ style: text_style } - Errors found on line #{'number'.pluralize(@results[:errors].size)}: #{@results[:errors].join(', ')}. + Errors found on line #{'number'.pluralize(@results[:error_lines].size)}: #{@results[:error_lines].join(', ')}. Please check if these lines have an issue title. -- unless @results[:valid_file] +- if @results[:parse_error] %p{ style: text_style } - Error parsing CSV file. + Error parsing CSV file. Please make sure it has the correct format: a delimited text file that uses a comma to separate values. diff --git a/app/views/notify/import_issues_csv_email.text.erb b/app/views/notify/import_issues_csv_email.text.erb index 54a1762c4ec..1117f90714d 100644 --- a/app/views/notify/import_issues_csv_email.text.erb +++ b/app/views/notify/import_issues_csv_email.text.erb @@ -1,11 +1,11 @@ Your CSV import for project <%= @project.full_name %> (<%= project_url(@project) %>) has been completed. -<%= pluralize(@results[:success], 'issue') %> imported successfully. +<%= pluralize(@results[:success], 'issue') %> imported. -<% if @results[:errors].present? %> -Errors found on line <%= 'number'.pluralize(@results[:errors].size) %>: <%= @results[:errors].join(', ') %>. +<% if @results[:error_lines].present? %> +Errors found on line <%= 'number'.pluralize(@results[:error_lines].size) %>: <%= @results[:error_lines].join(', ') %>. Please check if these lines have an issue title. <% end %> -<% unless @results[:valid_file] %> -Error parsing CSV file. +<% if @results[:parse_error] %> +Error parsing CSV file. Please make sure it has the correct format: a delimited text file that uses a comma to separate values. <% end %> |