Skip to content

Commit

Permalink
Add file path in the Delete dialog text. (#9284)
Browse files Browse the repository at this point in the history
Instead of absolute file path, only the file name is showed in the dialog title. The file's absolute path is added in the dialog text.

Fixes koppor#534.
  • Loading branch information
Racheal7 authored Oct 25, 2022
1 parent 7f2b602 commit 945a540
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where a message about changed metadata would occur on saving although nothing changed. [#9159](https://github.com/JabRef/jabref/issues/9159)
- When adding or editing a subgroup it is placed w.r.t. to alphabetical ordering rather than at the end. [koppor#577](https://github.com/koppor/jabref/issues/577)
- We modified the Directory of Open Access Books (DOAB) fetcher so that it will now also fetch the ISBN when possible. [#8708](https://github.com/JabRef/jabref/issues/8708)
- We modified the "Delete file" dialog and add the full file path to the dialog text. The file path in the title was changed to file name only. [koppor#534](https://github.com/koppor/jabref/issues/534)
- Download from URL now automatically fills with URL from clipboard. [koppor#535](https://github.com/koppor/jabref/issues/535)

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ public boolean delete() {
ButtonType removeFromEntry = new ButtonType(Localization.lang("Remove from entry"), ButtonData.YES);
ButtonType deleteFromEntry = new ButtonType(Localization.lang("Delete from disk"));
Optional<ButtonType> buttonType = dialogService.showCustomButtonDialogAndWait(AlertType.INFORMATION,
Localization.lang("Delete '%0'", file.get().toString()),
Localization.lang("Delete the selected file permanently from disk, or just remove the file from the entry? Pressing Delete will delete the file permanently from disk."),
Localization.lang("Delete '%0'", file.get().getFileName().toString()),
Localization.lang("Delete '%0' permanently from disk, or just remove the file from the entry? Pressing Delete will delete the file permanently from disk.", file.get().toString()),
removeFromEntry, deleteFromEntry, ButtonType.CANCEL);

if (buttonType.isPresent()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,7 @@ To\ improve\ the\ user\ experience,\ we\ would\ like\ to\ collect\ anonymous\ st
This\ file\ was\ found\ automatically.\ Do\ you\ want\ to\ link\ it\ to\ this\ entry?=This file was found automatically. Do you want to link it to this entry?
Names\ are\ not\ in\ the\ standard\ %0\ format.=Names are not in the standard %0 format.
Delete\ the\ selected\ file\ permanently\ from\ disk,\ or\ just\ remove\ the\ file\ from\ the\ entry?\ Pressing\ Delete\ will\ delete\ the\ file\ permanently\ from\ disk.=Delete the selected file permanently from disk, or just remove the file from the entry? Pressing Delete will delete the file permanently from disk.
Delete\ '%0'\ permanently\ from\ disk,\ or\ just\ remove\ the\ file\ from\ the\ entry?\ Pressing\ Delete\ will\ delete\ the\ file\ permanently\ from\ disk.=Delete '%0' permanently from disk, or just remove the file from the entry? Pressing Delete will delete the file permanently from disk.
Delete\ '%0'=Delete '%0'
Delete\ from\ disk=Delete from disk
Remove\ from\ entry=Remove from entry
Expand Down

0 comments on commit 945a540

Please sign in to comment.