diff --git a/src/main/java/edu/harvard/iq/dataverse/EditDatafilesPage.java b/src/main/java/edu/harvard/iq/dataverse/EditDatafilesPage.java index 83919537510..ecce1724778 100644 --- a/src/main/java/edu/harvard/iq/dataverse/EditDatafilesPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/EditDatafilesPage.java @@ -910,9 +910,13 @@ public void deleteMarkedAsDuplicateFiles() { } if (fileNames != null) { - String successMessage = getBundleString("file.deleted.upload.success"); + String successMessage = ""; + if(fileNames.contains(", ")){ + successMessage = getBundleString("file.deleted.upload.success.multiple"); + } else { + successMessage = getBundleString("file.deleted.upload.success.single"); + } logger.fine(successMessage); - successMessage = successMessage.replace("{0}", fileNames); JsfHelper.addFlashMessage(successMessage); } @@ -1003,12 +1007,14 @@ public void deleteFiles() { } if (fileNames != null) { - String successMessage = getBundleString("file.deleted.success"); - if (mode == FileEditMode.UPLOAD) { - successMessage = getBundleString("file.deleted.upload.success"); + String successMessage; + if (fileNames.contains(", ")) { + successMessage = getBundleString("file.deleted.upload.success.multiple"); + } else { + successMessage = getBundleString("file.deleted.upload.success.single"); } logger.fine(successMessage); - successMessage = successMessage.replace("{0}", fileNames); + JsfHelper.addFlashMessage(successMessage); } } diff --git a/src/main/java/propertyFiles/Bundle.properties b/src/main/java/propertyFiles/Bundle.properties index a59cf5f2394..4df8bb2c10a 100755 --- a/src/main/java/propertyFiles/Bundle.properties +++ b/src/main/java/propertyFiles/Bundle.properties @@ -1512,7 +1512,8 @@ file.delete.duplicate.single=Delete Duplicate File file.metadata=Metadata file.deleted.success=Files "{0}" will be permanently deleted from this version of this dataset once you click on the Save Changes button. file.deleted.replacement.success=The replacement file has been deleted. -file.deleted.upload.success=Files "{0}" won\u2019t be included in this upload. +file.deleted.upload.success.single=File has been deleted and won\u2019t be included in this upload. +file.deleted.upload.success.multiple=Files have been deleted and won\u2019t be included in this upload. file.editAccess=Edit Access file.restrict=Restrict file.unrestrict=Unrestrict @@ -2118,7 +2119,7 @@ dataset.file.exist=File {0} has the same content as {1} that already exists in t dataset.file.exist.test={0, choice, 1#File |2#Files |} {1} {0, choice, 1#has |2#have |} the same content as {2} that already {0, choice, 1#exist |2#exist |}in the dataset. dataset.files.duplicate=Files {0} have the same content as {1} that have already been uploaded. dataset.file.duplicate=File {0} has the same content as {1} that has already been uploaded. -dataset.file.inline.message= This file has the same content as {0}. There may be other existing files with this content. +dataset.file.inline.message= This file has the same content as {0}. dataset.file.upload=Succesful {0} is uploaded. dataset.file.uploadFailure=upload failure dataset.file.uploadFailure.detailmsg=the file {0} failed to upload!