summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-02-27 07:46:35 +0000
committerGo MAEDA <maeda@farend.jp>2021-02-27 07:46:35 +0000
commit72d622dc9f38f9a429aee7d86667426cf57337ea (patch)
treed9be4925da6fd724733cd47ace5a482ea9b494c4
parent2f3222e0bdaacae4a2d17224d61a18cb060e9031 (diff)
downloadredmine-72d622dc9f38f9a429aee7d86667426cf57337ea.tar.gz
redmine-72d622dc9f38f9a429aee7d86667426cf57337ea.zip
Display more detailed error message when attempting to import malformed CSV file (#34762).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@20756 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/imports_controller.rb2
-rw-r--r--config/locales/ar.yml2
-rw-r--r--config/locales/az.yml2
-rw-r--r--config/locales/bg.yml2
-rw-r--r--config/locales/bs.yml2
-rw-r--r--config/locales/ca.yml2
-rw-r--r--config/locales/cs.yml2
-rw-r--r--config/locales/da.yml2
-rw-r--r--config/locales/de.yml2
-rw-r--r--config/locales/el.yml2
-rw-r--r--config/locales/en-GB.yml2
-rw-r--r--config/locales/en.yml2
-rw-r--r--config/locales/es-PA.yml2
-rw-r--r--config/locales/es.yml2
-rw-r--r--config/locales/et.yml2
-rw-r--r--config/locales/eu.yml2
-rw-r--r--config/locales/fa.yml2
-rw-r--r--config/locales/fi.yml2
-rw-r--r--config/locales/fr.yml2
-rw-r--r--config/locales/gl.yml2
-rw-r--r--config/locales/he.yml2
-rw-r--r--config/locales/hr.yml2
-rw-r--r--config/locales/hu.yml2
-rw-r--r--config/locales/id.yml2
-rw-r--r--config/locales/it.yml2
-rw-r--r--config/locales/ja.yml2
-rw-r--r--config/locales/ko.yml2
-rw-r--r--config/locales/lt.yml2
-rw-r--r--config/locales/lv.yml2
-rw-r--r--config/locales/mk.yml2
-rw-r--r--config/locales/mn.yml2
-rw-r--r--config/locales/nl.yml2
-rw-r--r--config/locales/no.yml2
-rw-r--r--config/locales/pl.yml2
-rw-r--r--config/locales/pt-BR.yml2
-rw-r--r--config/locales/pt.yml2
-rw-r--r--config/locales/ro.yml2
-rw-r--r--config/locales/ru.yml2
-rw-r--r--config/locales/sk.yml2
-rw-r--r--config/locales/sl.yml2
-rw-r--r--config/locales/sq.yml2
-rw-r--r--config/locales/sr-YU.yml2
-rw-r--r--config/locales/sr.yml2
-rw-r--r--config/locales/sv.yml2
-rw-r--r--config/locales/th.yml2
-rw-r--r--config/locales/tr.yml2
-rw-r--r--config/locales/uk.yml2
-rw-r--r--config/locales/vi.yml2
-rw-r--r--config/locales/zh-TW.yml2
-rw-r--r--config/locales/zh.yml2
-rw-r--r--test/fixtures/files/unclosed_quoted_field.csv2
-rw-r--r--test/functional/imports_controller_test.rb21
52 files changed, 73 insertions, 50 deletions
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb
index d295f5ebc..0e97e06c3 100644
--- a/app/controllers/imports_controller.rb
+++ b/app/controllers/imports_controller.rb
@@ -55,7 +55,7 @@ class ImportsController < ApplicationController
rescue CSV::MalformedCSVError, EncodingError => e
if e.is_a?(CSV::MalformedCSVError) && e.message !~ /Invalid byte sequence/
- flash.now[:error] = l(:error_invalid_csv_file_or_settings)
+ flash.now[:error] = l(:error_invalid_csv_file_or_settings, e.message)
else
flash.now[:error] = l(:error_invalid_file_encoding, :encoding => ERB::Util.h(@import.settings['encoding']))
end
diff --git a/config/locales/ar.yml b/config/locales/ar.yml
index c0129d5e5..dfe84b4a6 100644
--- a/config/locales/ar.yml
+++ b/config/locales/ar.yml
@@ -1139,7 +1139,7 @@ ar:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/az.yml b/config/locales/az.yml
index f5585b743..d13f339dc 100644
--- a/config/locales/az.yml
+++ b/config/locales/az.yml
@@ -1231,7 +1231,7 @@ az:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/bg.yml b/config/locales/bg.yml
index 13fcc7127..4beebba35 100644
--- a/config/locales/bg.yml
+++ b/config/locales/bg.yml
@@ -224,7 +224,7 @@ bg:
warning_attachments_not_saved: "%{count} файла не бяха записани."
error_password_expired: Вашата парола е с изтекъл срок или администраторът изисква да я смените.
error_invalid_file_encoding: Файлът няма валидно %{encoding} кодиране.
- error_invalid_csv_file_or_settings: Файлът не е CSV файл или не съответства на зададеното по-долу
+ error_invalid_csv_file_or_settings: Файлът не е CSV файл или не съответства на зададеното по-долу (%{value})
error_can_not_read_import_file: Грешка по време на четене на импортирания файл
error_attachment_extension_not_allowed: Файлове от тип %{extension} не са позволени
error_ldap_bind_credentials: Невалидни LDAP име/парола
diff --git a/config/locales/bs.yml b/config/locales/bs.yml
index aca92e785..81e861cd5 100644
--- a/config/locales/bs.yml
+++ b/config/locales/bs.yml
@@ -1152,7 +1152,7 @@ bs:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/ca.yml b/config/locales/ca.yml
index b1ea5494f..55ac719db 100644
--- a/config/locales/ca.yml
+++ b/config/locales/ca.yml
@@ -1134,7 +1134,7 @@ ca:
notice_import_finished: "%{count} element/s han sigut importats"
notice_import_finished_with_errors: "%{count} de %{total} elements no s'ha pogut importar"
error_invalid_file_encoding: "El fitxer no utilitza una codificació valida (%{encoding})"
- error_invalid_csv_file_or_settings: "El fitxer no es un CSV o no coincideix amb la configuració"
+ error_invalid_csv_file_or_settings: "El fitxer no es un CSV o no coincideix amb la configuració (%{value})"
error_can_not_read_import_file: "S'ha produït un error mentre es llegia el fitxer a importar"
permission_import_issues: "Importar assumptes"
label_import_issues: "Importar assumptes"
diff --git a/config/locales/cs.yml b/config/locales/cs.yml
index 707e7ddda..3ecc0f6e3 100644
--- a/config/locales/cs.yml
+++ b/config/locales/cs.yml
@@ -1139,7 +1139,7 @@ cs:
notice_import_finished_with_errors: "%{count} z %{total} položek nemohlo být naimportováno"
error_invalid_file_encoding: Soubor není platným souborem s kódováním %{encoding}
error_invalid_csv_file_or_settings: Soubor není CSV soubor nebo neodpovídá
- níže uvedenému nastavení
+ níže uvedenému nastavení (%{value})
error_can_not_read_import_file: Chyba při čtení souboru pro import
permission_import_issues: Import úkolů
label_import_issues: Import úkolů
diff --git a/config/locales/da.yml b/config/locales/da.yml
index 5b9f50ab4..5fffef571 100644
--- a/config/locales/da.yml
+++ b/config/locales/da.yml
@@ -1156,7 +1156,7 @@ da:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 618da6d5e..081abd849 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -1178,7 +1178,7 @@ de:
notice_import_finished: "%{count} Einträge wurden importiert"
notice_import_finished_with_errors: "%{count} von %{total} Einträgen konnten nicht importiert werden"
error_invalid_file_encoding: Die Datei ist keine gültige %{encoding}-kodierte Datei
- error_invalid_csv_file_or_settings: Die Datei ist keine CSV-Datei oder entspricht nicht den unten stehenden Einstellungen
+ error_invalid_csv_file_or_settings: Die Datei ist keine CSV-Datei oder entspricht nicht den unten stehenden Einstellungen (%{value})
error_can_not_read_import_file: Beim Einlesen der Datei ist ein Fehler aufgetreten
permission_import_issues: Tickets importieren
label_import_issues: Tickets importieren
diff --git a/config/locales/el.yml b/config/locales/el.yml
index b12d779e6..10034c67a 100644
--- a/config/locales/el.yml
+++ b/config/locales/el.yml
@@ -1139,7 +1139,7 @@ el:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml
index 3d1fd1716..2998bb192 100644
--- a/config/locales/en-GB.yml
+++ b/config/locales/en-GB.yml
@@ -1146,7 +1146,7 @@ en-GB:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 403b0f398..979417a32 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -221,7 +221,7 @@ en:
warning_attachments_not_saved: "%{count} file(s) could not be saved."
error_password_expired: "Your password has expired or the administrator requires you to change it."
error_invalid_file_encoding: "The file is not a valid %{encoding} encoded file"
- error_invalid_csv_file_or_settings: "The file is not a CSV file or does not match the settings below"
+ error_invalid_csv_file_or_settings: "The file is not a CSV file or does not match the settings below (%{value})"
error_can_not_read_import_file: "An error occurred while reading the file to import"
error_attachment_extension_not_allowed: "Attachment extension %{extension} is not allowed"
error_ldap_bind_credentials: "Invalid LDAP Account/Password"
diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml
index 8032f4cf5..4af7a25b7 100644
--- a/config/locales/es-PA.yml
+++ b/config/locales/es-PA.yml
@@ -1174,7 +1174,7 @@ es-PA:
notice_import_finished_with_errors: "%{count} de %{total} elementos no pudieron ser importados"
error_invalid_file_encoding: El archivo no utiliza %{encoding} válida
error_invalid_csv_file_or_settings: El archivo no es un archivo CSV o no coincide con la
- configuración
+ configuración (%{value})
error_can_not_read_import_file: Ocurrió un error mientras se leía el archivo a importar
permission_import_issues: Importar incidencias
label_import_issues: Importar incidencias
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 0e0888796..88a7add95 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -1172,7 +1172,7 @@ es:
notice_import_finished_with_errors: "%{count} de %{total} elementos no pudieron ser importados"
error_invalid_file_encoding: El archivo no utiliza %{encoding} válida
error_invalid_csv_file_or_settings: El archivo no es un archivo CSV o no coincide con la
- configuración
+ configuración (%{value})
error_can_not_read_import_file: Ocurrió un error mientras se leía el archivo a importar
permission_import_issues: Importar Peticiones
label_import_issues: Importar petición
diff --git a/config/locales/et.yml b/config/locales/et.yml
index 16ba8c3ec..e05bbd4dc 100644
--- a/config/locales/et.yml
+++ b/config/locales/et.yml
@@ -1144,7 +1144,7 @@ et:
notice_import_finished: "%{count} rida imporditud"
notice_import_finished_with_errors: "%{count} rida %{total}st ei õnnestunud importida"
error_invalid_file_encoding: "See fail ei ole õige %{encoding} kodeeringuga"
- error_invalid_csv_file_or_settings: "See fail kas ei ole CSV formaadis või ei klapi allolevate sätetega"
+ error_invalid_csv_file_or_settings: "See fail kas ei ole CSV formaadis või ei klapi allolevate sätetega (%{value})"
error_can_not_read_import_file: "Importfaili sisselugemisel ilmnes viga"
permission_import_issues: "Impordi teemasid"
label_import_issues: "Impordi teemad"
diff --git a/config/locales/eu.yml b/config/locales/eu.yml
index c6f43c331..f6b430551 100644
--- a/config/locales/eu.yml
+++ b/config/locales/eu.yml
@@ -1140,7 +1140,7 @@ eu:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/fa.yml b/config/locales/fa.yml
index 6e457e05d..8c1cff258 100644
--- a/config/locales/fa.yml
+++ b/config/locales/fa.yml
@@ -218,7 +218,7 @@ fa:
warning_attachments_not_saved: "%{count} پرونده نتوانست ذخیره شود."
error_password_expired: "گذرواژه‌ی شما منقضی شده است یا راه‌بر درخواست تغییر آن را داده است."
error_invalid_file_encoding: "این پرونده یک پرونده با کدگذاری %{encoding} نیست"
- error_invalid_csv_file_or_settings: "این پرونده یک پرونده CSV نیست یا با تنظیمات زیر همخوان نیست."
+ error_invalid_csv_file_or_settings: "این پرونده یک پرونده CSV نیست یا با تنظیمات زیر همخوان نیست. (%{value})"
error_can_not_read_import_file: "در هنگام خواندن پرونده برای ورود، خطایی رخ داد"
error_attachment_extension_not_allowed: "پسوند %{extension} برای پیوست یک پسوند مجاز نیست"
error_ldap_bind_credentials: "حساب/گذرواژه نامعتبر LDAP"
diff --git a/config/locales/fi.yml b/config/locales/fi.yml
index ad967fcd3..a6b351cca 100644
--- a/config/locales/fi.yml
+++ b/config/locales/fi.yml
@@ -1160,7 +1160,7 @@ fi:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 07c4610d3..e1f560714 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -234,7 +234,7 @@ fr:
warning_attachments_not_saved: "%{count} fichier(s) n'ont pas pu être sauvegardés."
error_password_expired: "Votre mot de passe a expiré ou nécessite d'être changé."
error_invalid_file_encoding: "Le fichier n'est pas un fichier %{encoding} valide"
- error_invalid_csv_file_or_settings: "Le fichier n'est pas un fichier CSV ou n'est pas conforme aux paramètres sélectionnés"
+ error_invalid_csv_file_or_settings: "Le fichier n'est pas un fichier CSV ou n'est pas conforme aux paramètres sélectionnés (%{value})"
error_can_not_read_import_file: "Une erreur est survenue lors de la lecture du fichier à importer"
error_attachment_extension_not_allowed: "L'extension %{extension} n'est pas autorisée"
error_ldap_bind_credentials: "Identifiant ou mot de passe LDAP incorrect"
diff --git a/config/locales/gl.yml b/config/locales/gl.yml
index 12d13b4a0..7cdd18bfa 100644
--- a/config/locales/gl.yml
+++ b/config/locales/gl.yml
@@ -1147,7 +1147,7 @@ gl:
notice_import_finished_with_errors: "%{count} dun total de %{total} elementos non puideron ser importados"
error_invalid_file_encoding: O ficheiro non é un ficheiro codificado %{encoding} válido
error_invalid_csv_file_or_settings: O ficheiro non é un arquivo CSV ou non coincide coas
- opcións de abaixo
+ opcións de abaixo (%{value})
error_can_not_read_import_file: Aconteceu un erro lendo o ficheiro a importar
permission_import_issues: Importar peticións
label_import_issues: Importar peticións
diff --git a/config/locales/he.yml b/config/locales/he.yml
index a6a5e0c56..1047b2e84 100644
--- a/config/locales/he.yml
+++ b/config/locales/he.yml
@@ -1144,7 +1144,7 @@ he:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/hr.yml b/config/locales/hr.yml
index 542f8596b..55b7413c0 100644
--- a/config/locales/hr.yml
+++ b/config/locales/hr.yml
@@ -1136,7 +1136,7 @@ hr:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/hu.yml b/config/locales/hu.yml
index edeb8d6c8..1e9515357 100644
--- a/config/locales/hu.yml
+++ b/config/locales/hu.yml
@@ -1158,7 +1158,7 @@
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/id.yml b/config/locales/id.yml
index 127e0e9c4..b095b183e 100644
--- a/config/locales/id.yml
+++ b/config/locales/id.yml
@@ -1141,7 +1141,7 @@ id:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/it.yml b/config/locales/it.yml
index 8aaee8776..5273b9ba0 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -1134,7 +1134,7 @@ it:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Importa segnalazioni
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index 91356fb91..0e3ef0d77 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -1162,7 +1162,7 @@ ja:
notice_import_finished: "%{count}件のデータをすべてインポートしました"
notice_import_finished_with_errors: "全%{total}件中%{count}件のデータがインポートできませんでした"
error_invalid_file_encoding: このファイルのエンコーディングは正しい%{encoding}ではありません
- error_invalid_csv_file_or_settings: このファイルはCSVファイルではないか、以下の設定と一致していません
+ error_invalid_csv_file_or_settings: このファイルはCSVファイルではないか、以下の設定と一致していません (%{value})
error_can_not_read_import_file: インポート元のファイルを読み込み中にエラーが発生しました
permission_import_issues: チケットのインポート
label_import_issues: チケットのインポート
diff --git a/config/locales/ko.yml b/config/locales/ko.yml
index be8b62ef0..606023a6a 100644
--- a/config/locales/ko.yml
+++ b/config/locales/ko.yml
@@ -1180,7 +1180,7 @@ ko:
notice_import_finished: "총 %{count} 건을 가져왔습니다"
notice_import_finished_with_errors: "총 %{total} 건 중 %{count} 건을 가져오지 못했습니다"
error_invalid_file_encoding: 이 파일은 정상적인 %{encoding} 파일이 아닙니다.
- error_invalid_csv_file_or_settings: 이 파일은 CSV 파일이 아니거나 아래 조건에 맞지 않습니다.
+ error_invalid_csv_file_or_settings: 이 파일은 CSV 파일이 아니거나 아래 조건에 맞지 않습니다. (%{value})
error_can_not_read_import_file: 가져오기 파일을 읽을 수 없습니다.
permission_import_issues: 일감 가져오기
label_import_issues: 일감 가져오기
diff --git a/config/locales/lt.yml b/config/locales/lt.yml
index be71963c9..db112a8cf 100644
--- a/config/locales/lt.yml
+++ b/config/locales/lt.yml
@@ -218,7 +218,7 @@ lt:
warning_attachments_not_saved: "%{count} byla(-ų) negali būti išsaugota."
error_password_expired: "Jūsų slaptažodžio galiojimo laikas baigėsi arba administratorius reikalauja jūsų jį pasikeisti"
error_invalid_file_encoding: "Failas nėra tinkamas %{encoding} koduotės failas"
- error_invalid_csv_file_or_settings: "Failas nėra CSV failas arba neatitinka žemiau esančių nustatymų"
+ error_invalid_csv_file_or_settings: "Failas nėra CSV failas arba neatitinka žemiau esančių nustatymų (%{value})"
error_can_not_read_import_file: "Iškilo klaida skaitant importuojamą failą"
error_attachment_extension_not_allowed: "Priedo plėtinys %{extension} negalimas"
error_ldap_bind_credentials: "Netinkamas LDAP Vartotojo vardas/Slaptažodis"
diff --git a/config/locales/lv.yml b/config/locales/lv.yml
index 711e76fed..6123c7232 100644
--- a/config/locales/lv.yml
+++ b/config/locales/lv.yml
@@ -1133,7 +1133,7 @@ lv:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/mk.yml b/config/locales/mk.yml
index c42637000..e0ccb957d 100644
--- a/config/locales/mk.yml
+++ b/config/locales/mk.yml
@@ -1139,7 +1139,7 @@ mk:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/mn.yml b/config/locales/mn.yml
index 0294fd3a8..3706781ce 100644
--- a/config/locales/mn.yml
+++ b/config/locales/mn.yml
@@ -1139,7 +1139,7 @@ mn:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index eee83d8ad..dc1605bfc 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -1116,7 +1116,7 @@ nl:
notice_import_finished: "%{count} items werden geïmporteerd"
notice_import_finished_with_errors: "%{count} van in totaal %{total} items kunnen niet geïmporteerd worden"
error_invalid_file_encoding: Het bestand is geen geldig geëncodeerd %{encoding} bestand
- error_invalid_csv_file_or_settings: Het bestand is geen CSV-bestand of voldoet niet aan onderstaande instellingen
+ error_invalid_csv_file_or_settings: Het bestand is geen CSV-bestand of voldoet niet aan onderstaande instellingen (%{value})
error_can_not_read_import_file: Er is een fout opgetreden bij het inlezen van het bestand
permission_import_issues: Issues importeren
label_import_issues: Issues importeren
diff --git a/config/locales/no.yml b/config/locales/no.yml
index ec8d2a69e..7237c1db4 100644
--- a/config/locales/no.yml
+++ b/config/locales/no.yml
@@ -1129,7 +1129,7 @@
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/pl.yml b/config/locales/pl.yml
index 45fd617c1..355fcbe6b 100644
--- a/config/locales/pl.yml
+++ b/config/locales/pl.yml
@@ -1152,7 +1152,7 @@ pl:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml
index 549b6b51a..254d3db31 100644
--- a/config/locales/pt-BR.yml
+++ b/config/locales/pt-BR.yml
@@ -1157,7 +1157,7 @@ pt-BR:
notice_import_finished_with_errors: "%{count} fora de %{total} não puderam ser importados"
error_invalid_file_encoding: O arquivo não é válido %{encoding} é a codificação do arquivo
error_invalid_csv_file_or_settings: O arquivo não é um arquivo CSV ou não corresponde às
- definições abaixo
+ definições abaixo (%{value})
error_can_not_read_import_file: Ocorreu um erro ao ler o arquivo para importação
permission_import_issues: Importar tarefas
label_import_issues: Importar tarefas
diff --git a/config/locales/pt.yml b/config/locales/pt.yml
index f03fae483..4a3c53ab2 100644
--- a/config/locales/pt.yml
+++ b/config/locales/pt.yml
@@ -1139,7 +1139,7 @@ pt:
notice_import_finished: "%{count} registos foram importados"
notice_import_finished_with_errors: "%{count} de %{total} registos não poderam ser importados"
error_invalid_file_encoding: 'O ficheiro não possui a codificação correcta: {encoding}'
- error_invalid_csv_file_or_settings: O ficheiro não é um ficheiro CSV ou não respeita as definições abaixo
+ error_invalid_csv_file_or_settings: O ficheiro não é um ficheiro CSV ou não respeita as definições abaixo (%{value})
error_can_not_read_import_file: Ocorreu um erro ao ler o ficheiro a importar
permission_import_issues: Importar tarefas
label_import_issues: Importar tarefas
diff --git a/config/locales/ro.yml b/config/locales/ro.yml
index f109471f7..b0ba10c9b 100644
--- a/config/locales/ro.yml
+++ b/config/locales/ro.yml
@@ -1134,7 +1134,7 @@ ro:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index fd96860be..42bcfd071 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -1238,7 +1238,7 @@ ru:
notice_import_finished: "%{count} элемент(а, ов) были импортированы"
notice_import_finished_with_errors: "%{count} из %{total} элемент(а, ов) не могут быть импортированы"
error_invalid_file_encoding: Кодировка файла не соответствует выбранной %{encoding}
- error_invalid_csv_file_or_settings: Файл не является файлом CSV или не соответствует представленным настройкам
+ error_invalid_csv_file_or_settings: Файл не является файлом CSV или не соответствует представленным настройкам (%{value})
error_can_not_read_import_file: Во время чтения файла для импорта произошла ошибка
permission_import_issues: Импорт задач
label_import_issues: Импорт задач
diff --git a/config/locales/sk.yml b/config/locales/sk.yml
index 168ee8bc8..25bbddfb2 100644
--- a/config/locales/sk.yml
+++ b/config/locales/sk.yml
@@ -1128,7 +1128,7 @@ sk:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/sl.yml b/config/locales/sl.yml
index b20226c14..d5436601b 100644
--- a/config/locales/sl.yml
+++ b/config/locales/sl.yml
@@ -1139,7 +1139,7 @@ sl:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/sq.yml b/config/locales/sq.yml
index 62c2a507a..b7fc2f393 100644
--- a/config/locales/sq.yml
+++ b/config/locales/sq.yml
@@ -1135,7 +1135,7 @@ sq:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml
index a526b657c..2c2c59fbe 100644
--- a/config/locales/sr-YU.yml
+++ b/config/locales/sr-YU.yml
@@ -1141,7 +1141,7 @@ sr-YU:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/sr.yml b/config/locales/sr.yml
index 7b461240f..67f1f8a76 100644
--- a/config/locales/sr.yml
+++ b/config/locales/sr.yml
@@ -1140,7 +1140,7 @@ sr:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/sv.yml b/config/locales/sv.yml
index edaa42711..da2b08ae4 100644
--- a/config/locales/sv.yml
+++ b/config/locales/sv.yml
@@ -1172,7 +1172,7 @@ sv:
notice_import_finished_with_errors: "%{count} av %{total} artiklar kunde inte importeras"
error_invalid_file_encoding: Filen är inte en %{encoding}-kodad fil
error_invalid_csv_file_or_settings: Filen är inte en CSV-fil eller stämmer inte med
- inställningarna nedan
+ inställningarna nedan (%{value})
error_can_not_read_import_file: Fel vid läsning av fil att importera
permission_import_issues: Importera ärenden
label_import_issues: Importera ärenden
diff --git a/config/locales/th.yml b/config/locales/th.yml
index c506745c3..9f699ddc0 100644
--- a/config/locales/th.yml
+++ b/config/locales/th.yml
@@ -1135,7 +1135,7 @@ th:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/tr.yml b/config/locales/tr.yml
index 0a9d3998e..a6c65fb12 100644
--- a/config/locales/tr.yml
+++ b/config/locales/tr.yml
@@ -1146,7 +1146,7 @@ tr:
notice_import_finished: "%{count} kayıt içeri aktarıldı"
notice_import_finished_with_errors: "%{total} kayıttan %{count} tanesi aktarılamadı"
error_invalid_file_encoding: Dosyanın karakter kodlaması geçerli bir %{encoding} kodlaması değil.
- error_invalid_csv_file_or_settings: Dosya CSV dosyası değil veya aşağıdaki ayarlara uymuyor
+ error_invalid_csv_file_or_settings: Dosya CSV dosyası değil veya aşağıdaki ayarlara uymuyor (%{value})
error_can_not_read_import_file: İçeri aktarılacak dosyayı okurken bir hata oluştu
permission_import_issues: İşleri içeri aktarma
label_import_issues: İşleri içeri aktar
diff --git a/config/locales/uk.yml b/config/locales/uk.yml
index 695328313..6fc172dac 100644
--- a/config/locales/uk.yml
+++ b/config/locales/uk.yml
@@ -1140,7 +1140,7 @@ uk:
notice_import_finished: "%{count} елементи(ів) було імпортовано"
notice_import_finished_with_errors: "%{count} з %{total} елементи(ів) неможливо імпортувати"
error_invalid_file_encoding: Кодування файлу не відповідає видраній(ому) %{encoding}
- error_invalid_csv_file_or_settings: Файл не є файлом CSV або не відповідає вибраним налаштуванням
+ error_invalid_csv_file_or_settings: Файл не є файлом CSV або не відповідає вибраним налаштуванням (%{value})
error_can_not_read_import_file: Під час читання файлу для імпорту виникла помилка
permission_import_issues: Імпорт задач
label_import_issues: Імпорт задач
diff --git a/config/locales/vi.yml b/config/locales/vi.yml
index b4bdb6da4..676a40da6 100644
--- a/config/locales/vi.yml
+++ b/config/locales/vi.yml
@@ -1191,7 +1191,7 @@ vi:
notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported"
error_invalid_file_encoding: The file is not a valid %{encoding} encoded file
error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the
- settings below
+ settings below (%{value})
error_can_not_read_import_file: An error occurred while reading the file to import
permission_import_issues: Import issues
label_import_issues: Import issues
diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml
index efac938d5..cc7cacd52 100644
--- a/config/locales/zh-TW.yml
+++ b/config/locales/zh-TW.yml
@@ -298,7 +298,7 @@
warning_attachments_not_saved: "%{count} 個附加檔案無法被儲存。"
error_password_expired: "您的密碼已經過期或是管理員要求您變更密碼."
error_invalid_file_encoding: "這個檔案不是一個有效的 %{encoding} 編碼檔案"
- error_invalid_csv_file_or_settings: "這個檔案不是一個 CSV 檔案,或是未符合下面所列之設定值"
+ error_invalid_csv_file_or_settings: "這個檔案不是一個 CSV 檔案,或是未符合下面所列之設定值 (%{value})"
error_can_not_read_import_file: "讀取匯入檔案時發生錯誤"
error_attachment_extension_not_allowed: "附件之附檔名不允許使用 %{extension}"
error_ldap_bind_credentials: "無效的 LDAP 帳號/密碼"
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 6dedbea18..f6446c39f 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1135,7 +1135,7 @@ zh:
notice_import_finished: 成功导入 %{count} 个项目
notice_import_finished_with_errors: 有 %{count} 个项目无法导入(共计 %{total} 个)
error_invalid_file_encoding: 这不是一个有效的 %{encoding} 编码文件
- error_invalid_csv_file_or_settings: 这不是一个CSV文件或者不符合以下设置
+ error_invalid_csv_file_or_settings: 这不是一个CSV文件或者不符合以下设置 (%{value})
error_can_not_read_import_file: 读取导入文件时发生错误
permission_import_issues: 问题导入
label_import_issues: 问题导入
diff --git a/test/fixtures/files/unclosed_quoted_field.csv b/test/fixtures/files/unclosed_quoted_field.csv
new file mode 100644
index 000000000..101d17f1d
--- /dev/null
+++ b/test/fixtures/files/unclosed_quoted_field.csv
@@ -0,0 +1,2 @@
+subject;description
+foo;"Unclosed quoted field \ No newline at end of file
diff --git a/test/functional/imports_controller_test.rb b/test/functional/imports_controller_test.rb
index 8a69c7dee..e4ef0d4c1 100644
--- a/test/functional/imports_controller_test.rb
+++ b/test/functional/imports_controller_test.rb
@@ -159,6 +159,27 @@ class ImportsControllerTest < Redmine::ControllerTest
assert_select 'div#flash_error', /not a valid Shift_JIS encoded file/
end
+ def test_post_settings_with_mailformed_csv_should_display_error
+ import = generate_import('unclosed_quoted_field.csv')
+
+ post(
+ :settings,
+ :params => {
+ :id => import.to_param,
+ :import_settings => {
+ :separator => ';',
+ :wrapper => '"',
+ :encoding => 'US-ASCII'
+ }
+ }
+ )
+ assert_response 200
+ import.reload
+ assert_nil import.total_items
+
+ assert_select 'div#flash_error', /The file is not a CSV file or does not match the settings below \([[:print:]]+\)/
+ end
+
def test_get_mapping_should_display_mapping_form
import = generate_import('import_iso8859-1.csv')
import.settings = {'separator' => ";", 'wrapper' => '"', 'encoding' => "ISO-8859-1"}