Skip to content

Commit

Permalink
#4813 more message updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Jul 28, 2020
1 parent f87c9d9 commit 0f41e9d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
18 changes: 12 additions & 6 deletions src/main/java/edu/harvard/iq/dataverse/EditDatafilesPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/propertyFiles/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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!
Expand Down

0 comments on commit 0f41e9d

Please sign in to comment.