mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-13 16:45:18 +08:00
Improve error message whan importing CSV files with incorrect character encoding [SCI-815]
This commit is contained in:
parent
09ef3b3ad5
commit
cba064dfcc
2 changed files with 3 additions and 2 deletions
|
@ -74,7 +74,8 @@ class OrganizationsController < ApplicationController
|
|||
end
|
||||
end
|
||||
rescue ArgumentError, CSV::MalformedCSVError
|
||||
error = t("organizations.parse_sheet.errors.invalid_file")
|
||||
error = t('organizations.parse_sheet.errors.invalid_file',
|
||||
encoding: ''.encoding)
|
||||
format.html {
|
||||
flash[:alert] = error
|
||||
redirect_to session.delete(:return_to)
|
||||
|
|
|
@ -922,7 +922,7 @@ en:
|
|||
import_samples: "Import samples"
|
||||
do_not_include_column: "Do not include this column"
|
||||
errors:
|
||||
invalid_file: "The file you provided is invalid."
|
||||
invalid_file: "The file you provided is invalid. Make sure the file is encoded using %{encoding}."
|
||||
invalid_extension: "The file has invalid extension."
|
||||
empty_file: "You've selected empty file. There's not much to import."
|
||||
temp_file_failure: "We couldn't create temporary file. Please contact administrator."
|
||||
|
|
Loading…
Add table
Reference in a new issue