fixes import flash message [fixes SCI-2398]

This commit is contained in:
zmagod 2018-06-15 11:12:11 +02:00
parent 801d0a4a22
commit 6a6ff534c0
2 changed files with 3 additions and 2 deletions

View file

@ -236,7 +236,8 @@ class RepositoriesController < ApplicationController
if status[:status] == :ok if status[:status] == :ok
flash[:success] = t('repositories.import_records.success_flash', flash[:success] = t('repositories.import_records.success_flash',
number_of_rows: status[:nr_of_added]) number_of_rows: status[:nr_of_added],
total_nr: status[:total_nr])
render json: {}, status: :ok render json: {}, status: :ok
else else
flash[:alert] = flash[:alert] =

View file

@ -967,7 +967,7 @@ en:
import_records: import_records:
import: 'Import' import: 'Import'
no_header_name: 'No column name' no_header_name: 'No column name'
success_flash: "%{number_of_rows} new item(s) successfully imported." success_flash: "%{number_of_rows} of %{total_nr} new item(s) successfully imported."
partial_success_flash: "%{nr} of %{total_nr} successfully imported. Other rows contained errors." partial_success_flash: "%{nr} of %{total_nr} successfully imported. Other rows contained errors."
error_message: error_message:
items_limit: "The imported file contains too many rows. Max %{items_size} items allowed to upload at once." items_limit: "The imported file contains too many rows. Max %{items_size} items allowed to upload at once."