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 cb6106b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where searching for unlinked files would include the current library's .bib file [#9735](https://github.com/JabRef/jabref/issues/9735)
- We fixed an issue where it was no longer possible to connect to a shared mysql database due to an exception [#9761](https://github.com/JabRef/jabref/issues/9761)
- We fixed the citation key generation for (`[authors]`, `[authshort]`, `[authorsAlpha]`, `authIniN`, `authEtAl`, `auth.etal`)[https://docs.jabref.org/setup/citationkeypatterns#special-field-markers] to handle `and others` properly. [koppor#626](https://github.com/koppor/jabref/issues/626)
- We fixed the Save/save as file type shows BIBTEX_DB instead of "Bibtex library" [#9372](https://github.com/JabRef/jabref/issues/9372)

### Removed

Expand Down
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 cb6106b

Please sign in to comment.