Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the messages after importing unlinked local files to past passive tense. #9308

Merged
merged 5 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- 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)
- We changed the messages after importing unlinked local files to past passive tense. [koppor#548](https://github.com/koppor/jabref/issues/548)
- We fixed an issue where the wrong icon for a successful import of a bib entry was shown [koppor#548](https://github.com/koppor/jabref/issues/548)

### Fixed

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/jabref/gui/externalfiles/ImportHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ protected List<ImportFilesResultItemViewModel> call() {

if (!pdfEntriesInFile.isEmpty()) {
entriesToAdd.addAll(pdfEntriesInFile);
addResultToList(file, true, Localization.lang("Importing using extracted PDF data"));
addResultToList(file, true, Localization.lang("File was successfully imported as a new entry"));
} else {
entriesToAdd.add(createEmptyEntryWithLink(file));
addResultToList(file, false, Localization.lang("No metadata found. Creating empty entry with file link"));
addResultToList(file, false, Localization.lang("No metadata was found. An empty entry was created with file link"));
}
} else if (FileUtil.isBibFile(file)) {
var bibtexParserResult = contentImporter.importFromBibFile(file, fileUpdateMonitor);
Expand All @@ -131,10 +131,10 @@ protected List<ImportFilesResultItemViewModel> call() {
}

entriesToAdd.addAll(bibtexParserResult.getDatabaseContext().getEntries());
addResultToList(file, false, Localization.lang("Importing bib entry"));
addResultToList(file, true, Localization.lang("Bib entry was successfully imported"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason why this second value is now "true"? I am probably msissing some context here, but I was just wondering

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The icon for "successfully imported BibTex" was the red warning icon (the same as the icon for no data found). I assume it was a small bug and I changed the icon to the green check by changing the second parameter to true.

Original:
original import from bib 2

Updated:
bib entry was successfully imported

Copy link
Member

@Siedlerchr Siedlerchr Oct 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks a lot! Can you mention this as well in the changelog? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Siedlerchr, sorry I just saw your comment. Thanks for changing the CHANGELOG and approving my changes.

} else {
entriesToAdd.add(createEmptyEntryWithLink(file));
addResultToList(file, false, Localization.lang("No BibTeX data found. Creating empty entry with file link"));
addResultToList(file, false, Localization.lang("No BibTeX data was found. An empty entry was created with file link"));
}
} catch (IOException ex) {
LOGGER.error("Error importing", ex);
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2321,10 +2321,10 @@ Error\ importing.\ See\ the\ error\ log\ for\ details.=Error importing. See the

Error\ from\ import\:\ %0=Error from import\: %0
Error\ reading\ PDF\ content\:\ %0=Error reading PDF content\: %0
Importing\ bib\ entry=Importing bib entry
Importing\ using\ extracted\ PDF\ data=Importing using extracted PDF data
No\ BibTeX\ data\ found.\ Creating\ empty\ entry\ with\ file\ link=No BibTeX data found. Creating empty entry with file link
No\ metadata\ found.\ Creating\ empty\ entry\ with\ file\ link=No metadata found. Creating empty entry with file link
Bib\ entry\ was\ successfully\ imported=Bib entry was successfully imported
File\ was\ successfully\ imported\ as\ a\ new\ entry=File was successfully imported as a new entry
No\ BibTeX\ data\ was\ found.\ An\ empty\ entry\ was\ created\ with\ file\ link=No BibTeX data was found. An empty entry was created with file link
No\ metadata\ was\ found.\ An\ empty\ entry\ was\ created\ with\ file\ link=No metadata was found. An empty entry was created with file link
Processing\ file\ %0=Processing file %0
Export\ selected=Export selected

Expand Down