From 63509238dbfdbb78fd07e0197ccb11b1ef022989 Mon Sep 17 00:00:00 2001 From: Rebecca Date: Sun, 23 Oct 2022 17:57:47 +1100 Subject: [PATCH 1/4] Changed messages after importing unlinked files to passive. --- CHANGELOG.md | 1 + .../java/org/jabref/gui/externalfiles/ImportHandler.java | 8 ++++---- src/main/resources/l10n/JabRef_en.properties | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ed74a68e2c..7bc8c2f9626 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 changed the messages after importing unlinked local files to passive. [koppor#548](https://github.com/koppor/jabref/issues/548) ### Fixed diff --git a/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java b/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java index 873ae09cb59..9fdcd91463a 100644 --- a/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java +++ b/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java @@ -119,10 +119,10 @@ protected List call() { if (!pdfEntriesInFile.isEmpty()) { entriesToAdd.addAll(pdfEntriesInFile); - addResultToList(file, true, Localization.lang("Importing using extracted PDF data")); + addResultToList(file, true, Localization.lang("File 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 found. Created an empty entry with file link")); } } else if (FileUtil.isBibFile(file)) { var bibtexParserResult = contentImporter.importFromBibFile(file, fileUpdateMonitor); @@ -131,10 +131,10 @@ protected List call() { } entriesToAdd.addAll(bibtexParserResult.getDatabaseContext().getEntries()); - addResultToList(file, false, Localization.lang("Importing bib entry")); + addResultToList(file, false, Localization.lang("Successfully imported bib entry")); } 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 found. Created an empty entry with file link")); } } catch (IOException ex) { LOGGER.error("Error importing", ex); diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index 2ac871e6ecc..9417632f55b 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -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 +Successfully\ imported\ bib\ entry=Successfully imported bib entry +File\ successfully\ imported\ as\ a\ new\ entry=File successfully imported as a new entry +No\ BibTeX\ data\ found.\ Created\ an\ empty\ entry\ with\ file\ link=No BibTeX data found. Created an empty entry with file link +No\ metadata\ found.\ Created\ an\ empty\ entry\ with\ file\ link=No metadata found. Created an empty entry with file link Processing\ file\ %0=Processing file %0 Export\ selected=Export selected From b840ddc00ba29ed41fd77749d69fdc1834e54644 Mon Sep 17 00:00:00 2001 From: Rebecca Date: Sun, 23 Oct 2022 22:10:21 +1100 Subject: [PATCH 2/4] Changed icon for successfully import bib entry to "check" icon. --- src/main/java/org/jabref/gui/externalfiles/ImportHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java b/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java index 9fdcd91463a..23fb29ebe3f 100644 --- a/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java +++ b/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java @@ -131,7 +131,7 @@ protected List call() { } entriesToAdd.addAll(bibtexParserResult.getDatabaseContext().getEntries()); - addResultToList(file, false, Localization.lang("Successfully imported bib entry")); + addResultToList(file, true, Localization.lang("Successfully imported bib entry")); } else { entriesToAdd.add(createEmptyEntryWithLink(file)); addResultToList(file, false, Localization.lang("No BibTeX data found. Created an empty entry with file link")); From bea347a59b569194e5eaf4241ed265028e171c0e Mon Sep 17 00:00:00 2001 From: Rebecca Date: Sun, 23 Oct 2022 23:20:28 +1100 Subject: [PATCH 3/4] Changed messages after importing to past passive tense. Modified CHANGLOG.md to reflect the change. --- CHANGELOG.md | 2 +- .../java/org/jabref/gui/externalfiles/ImportHandler.java | 8 ++++---- src/main/resources/l10n/JabRef_en.properties | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bc8c2f9626..1097365986d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,7 +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 changed the messages after importing unlinked local files to passive. [koppor#548](https://github.com/koppor/jabref/issues/548) +- We changed the messages after importing unlinked local files to past passive tense. [koppor#548](https://github.com/koppor/jabref/issues/548) ### Fixed diff --git a/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java b/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java index 23fb29ebe3f..38fd37299af 100644 --- a/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java +++ b/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java @@ -119,10 +119,10 @@ protected List call() { if (!pdfEntriesInFile.isEmpty()) { entriesToAdd.addAll(pdfEntriesInFile); - addResultToList(file, true, Localization.lang("File successfully imported as a new entry")); + 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. Created an 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); @@ -131,10 +131,10 @@ protected List call() { } entriesToAdd.addAll(bibtexParserResult.getDatabaseContext().getEntries()); - addResultToList(file, true, Localization.lang("Successfully imported bib entry")); + addResultToList(file, true, Localization.lang("Bib entry was successfully imported")); } else { entriesToAdd.add(createEmptyEntryWithLink(file)); - addResultToList(file, false, Localization.lang("No BibTeX data found. Created an 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); diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index 9417632f55b..96e3e0cd7b4 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -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 -Successfully\ imported\ bib\ entry=Successfully imported bib entry -File\ successfully\ imported\ as\ a\ new\ entry=File successfully imported as a new entry -No\ BibTeX\ data\ found.\ Created\ an\ empty\ entry\ with\ file\ link=No BibTeX data found. Created an empty entry with file link -No\ metadata\ found.\ Created\ an\ empty\ entry\ with\ file\ link=No metadata found. Created an 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 From 904750260a1b1c052a3bab917128bdbf41bc870c Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 28 Oct 2022 18:04:53 +0200 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d0c2283f35..8511216f92d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - 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