Skip to content

Commit

Permalink
Fixes JabRef#9372
Browse files Browse the repository at this point in the history
Change default File Chooser to show supported files extensions
  • Loading branch information
morganteg committed Apr 28, 2023
1 parent a68aa47 commit 3b72050
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/org/jabref/gui/util/FileFilterConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ private FileFilterConverter() {
}

public static FileChooser.ExtensionFilter toExtensionFilter(FileType fileType) {
String description = Localization.lang("%0 file", fileType.toString());
String description = Localization.lang(
"%0 file (%1)",
fileType.getName(),
String.join(", ", fileType.getExtensionsWithAsteriskAndDot())
);
return new FileChooser.ExtensionFilter(description, fileType.getExtensionsWithAsteriskAndDot());
}

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1725,6 +1725,7 @@ Cannot\ cite\ entries\ without\ citation\ keys.\ Generate\ keys\ now?=Cannot cit
New\ technical\ report=New technical report
%0\ file=%0 file
%0\ file\ (%1)=%0 file (%1)
Custom\ layout\ file=Custom layout file
Protected\ terms\ file=Protected terms file
Style\ file=Style file
Expand Down

0 comments on commit 3b72050

Please sign in to comment.