Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorHeinrich Lee Yu <hleeyu@gmail.com>2018-12-31 11:39:43 +0300
committerHeinrich Lee Yu <hleeyu@gmail.com>2019-01-07 06:16:58 +0300
commite2698d5d7455d91fa94f9bbf1fc838f8cb142700 (patch)
tree900a7abd2983a5a31843c25a13ce06898c1e02d6 /app/views
parent63e9969ca3ac57839b78d9cc44bcf32bc9a45248 (diff)
Improve email messages
Also refactored cleanup view to use the same localized string
Diffstat (limited to 'app/views')
-rw-r--r--app/views/notify/import_issues_csv_email.html.haml10
-rw-r--r--app/views/notify/import_issues_csv_email.text.erb10
-rw-r--r--app/views/projects/cleanup/_show.html.haml2
-rw-r--r--app/views/projects/issues/import_csv/_modal.html.haml5
4 files changed, 13 insertions, 14 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 %>
diff --git a/app/views/projects/cleanup/_show.html.haml b/app/views/projects/cleanup/_show.html.haml
index cecc139b183..888be4ee282 100644
--- a/app/views/projects/cleanup/_show.html.haml
+++ b/app/views/projects/cleanup/_show.html.haml
@@ -24,6 +24,6 @@
= _("No file selected")
= f.file_field :bfg_object_map, accept: 'text/plain', class: "hidden js-object-map-input", required: true
.form-text.text-muted
- = _("The maximum file size allowed is %{max_attachment_size}mb") % { max_attachment_size: Gitlab::CurrentSettings.max_attachment_size }
+ = _("The maximum file size allowed is %{size}.") % { size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) }
= f.submit _('Start cleanup'), class: 'btn btn-success'
diff --git a/app/views/projects/issues/import_csv/_modal.html.haml b/app/views/projects/issues/import_csv/_modal.html.haml
index 03a6c79ff74..bef34c93e63 100644
--- a/app/views/projects/issues/import_csv/_modal.html.haml
+++ b/app/views/projects/issues/import_csv/_modal.html.haml
@@ -1,7 +1,7 @@
.issues-import-modal.modal
.modal-dialog
.modal-content
- = form_tag [:import_csv, @project.namespace.becomes(Namespace), @project, :issues], multipart: true do
+ = form_tag import_csv_namespace_project_issues_path, multipart: true do
.modal-header
%h3
= _('Import issues')
@@ -18,8 +18,7 @@
= file_field_tag :file, accept: 'text/csv', required: true
%p.text-secondary
= _('It must have a header row and at least two columns: the first column is the issue title and the second column is the issue description. The separator is automatically detected.')
- %p.text-secondary
- = _('The maximum file size allowed is %{size}.') % {size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes)}
+ = _('The maximum file size allowed is %{size}.') % { size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) }
.modal-footer
%button{ type: 'submit', class: 'btn btn-success', title: _('Import issues') }
= _('Import issues')