Move journal abbreaviation actions to the "Cleanup entries" dialog#14850
Move journal abbreaviation actions to the "Cleanup entries" dialog#14850koppor merged 65 commits intoJabRef:mainfrom
Conversation
…rnals.AbbreviationType
…eanup and AbbreviateJournalCleanup instead of UndoableAbbreviator and UndoableUnabbreviator
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||||
|
Our abbreviations are somehow wrong. I did abbreviate and then unabbreviate. diff --git a/chocolate/Chocolate.bib b/chocolate/Chocolate.bib
index 98de469..86fb9d9 100644
--- a/chocolate/Chocolate.bib
+++ b/chocolate/Chocolate.bib
@@ -96,7 +96,7 @@
@Article{Tan_2021,
author = {Tan, Terence Yew Chin and Lim, Xin Yi and Yeo, Julie Hsiao Hui and Lee, Shaun Wen Huey and Lai, Nai Ming},
date = {2021-08},
- journaltitle = {Nutrients},
+ journaltitle = {Nutrition},
title = {The Health Effects of Chocolate and Cocoa: A Systematic Review},
doi = {10.3390/nu13092909},
issn = {2072-6643},See https://doi.org/10.3390/nu13092909 --> https://www.mdpi.com/2072-6643/13/9/2909 --> Note that this happens when abbreviating already: @Article{Tan_2021,
author = {Tan, Terence Yew Chin and Lim, Xin Yi and Yeo, Julie Hsiao Hui and Lee, Shaun Wen Huey and Lai, Nai Ming},
date = {2021-08},
- journaltitle = {Nutrients},
+ journaltitle = {Nutrition},
title = {The Health Effects of Chocolate and Cocoa: A Systematic Review},
doi = {10.3390/nu13092909},
issn = {2072-6643},
number = {9},
pages = {2909},
volume = {13},
+ fjournal = {Nutrition},
publisher = {MDPI AG},
readstatus = {skimmed},
} |
|
I tested it on the main branch, the same issue is also present. |
Maybe, you can dig down at github.com/JabRef/abbrv.jabref.org - where this abbreviation comes from. |
|
Roundtrip is not working (yet). Meaning: First abbreviate then unabbreviate - ampersands not kept. I am working on it. diff --git a/chocolate/Chocolate.bib b/chocolate/Chocolate.bib
index 98de469..86fb9d9 100644
--- a/chocolate/Chocolate.bib
+++ b/chocolate/Chocolate.bib
@@ -27,7 +27,7 @@
@Article{Ding_2006,
author = {Ding, Eric L and Hutfless, Susan M and Ding, Xin and Girotra, Saket},
date = {2006-01},
- journaltitle = {Nutrition \& Metabolism},
+ journaltitle = {Nutrition & Metabolism},
title = {Chocolate and Prevention of Cardiovascular Disease: A Systematic Review},
doi = {10.1186/1743-7075-3-2},
issn = {1743-7075},
@@ -52,7 +52,7 @@
@Article{Katz_2011,
author = {Katz, David L. and Doughty, Kim and Ali, Ather},
date = {2011-11},
- journaltitle = {Antioxidants \& Redox Signaling},
+ journaltitle = {Antioxidants & Redox Signaling},
title = {Cocoa and Chocolate in Human Health and Disease},
doi = {10.1089/ars.2010.3697},
issn = {1557-7716},
@@ -96,7 +96,7 @@
@Article{Tan_2021,
author = {Tan, Terence Yew Chin and Lim, Xin Yi and Yeo, Julie Hsiao Hui and Lee, Shaun Wen Huey and Lai, Nai Ming},
date = {2021-08},
- journaltitle = {Nutrients},
+ journaltitle = {Nutrition},
title = {The Health Effects of Chocolate and Cocoa: A Systematic Review},
doi = {10.3390/nu13092909},
issn = {2072-6643},
@@ -150,7 +150,7 @@
@Article{Hooper_2012,
author = {Hooper, Lee and Kay, Colin and Abdelhamid, Asmaa and Kroon, Paul A and Cohn, Jeffrey S and Rimm, Eric B and Cassidy, Aedín},
date = {2012-03},
- journaltitle = {The American Journal of Clinical Nutrition},
+ journaltitle = {American Journal of Clinical Nutrition},
title = {Effects of chocolate, cocoa, and flavan-3-ols on cardiovascular health: a systematic review and meta-analysis of randomized trials},
doi = {10.3945/ajcn.111.023457},
issn = {0002-9165},
@@ -207,7 +207,7 @@
@Article{LunaOstos_2024,
author = {Luna Ostos, Luisa Marcela and Roche, Lindsey and Coroama, Vlad and Finkbeiner, Matthias},
date = {2024-01},
- journaltitle = {The International Journal of Life Cycle Assessment},
+ journaltitle = {International Journal of Life Cycle Assessment},
title = {Social life cycle assessment in the chocolate industry: A Colombian case study with Luker Chocolate},
doi = {10.1007/s11367-023-02261-y},
issn = {1614-7502}, |
This abbreviation seems to be coming from one of those lines |
|
FindAbbreviationFuzzyMatched finds most similar abbreaviation and returns it, "Nutrition" is similar to "Nutrients", so "Nutrition" is returned. |
|
@BOgdAnSAM-sudo You could improve the tests in a follow-up PR. See 39b064a for the "template" |
I'll do it today or tomorrow. |
Head branch was pushed to by a user without write access
Thank you! Base on |

User description
Closes #11791.
Moved the functionality of
org.jabref.gui.journals.UndoableAbbreviatorandorg.jabref.gui.journals.UndoableUnabbreviatortoorg.jabref.logic.cleanup.AbbreviateJournalCleanupandorg.jabref.logic.cleanup.UnabbreviateJournalCleanuprespectivly. Added "Journal-related" tab to "Clean up entries" dialog. Added the journal abbreviations actions to the "Cleanup entries" dialog.Some code was used from #12835.
Before
After
Steps to test
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)Proposed user documentation changes JabRef/user-documentation#613.
PR Type
Enhancement
Description
Moved journal abbreviation actions from Quality menu to Cleanup dialog
Added new "Journal-related" tab with abbreviation/unabbreviation options
Refactored
UndoableAbbreviatorandUndoableUnabbreviatorto cleanup jobsMoved
AbbreviationTypefrom GUI to logic package for better separationUpdated cleanup worker to support journal field abbreviation operations
Diagram Walkthrough
File Walkthrough
22 files
Add journal abbreviation repository to GUI initializationRemove journal abbreviation menu actions from standard actionsAdd journal abbreviation repository parameter to cleanup actionAdd journal-related panel to cleanup dialog tabsAdd journal abbreviation repository to cleanup view modelNew panel for journal abbreviation cleanup optionsNew view model for journal cleanup preferencesAdd journal abbreviation repository to single entry cleanupPass journal abbreviation repository to cleanup actionAdd journal abbreviation repository field and initializationRemove journal abbreviation menu items and update cleanup actionAdd journal abbreviation repository to toolbar cleanup buttonRemove deprecated abbreviate action classRemove deprecated unabbreviator classRemove abbreviation and unabbreviation key bindingsNew cleanup job for journal abbreviationAdd journal abbreviation cleanup step enumsIntegrate journal abbreviation cleanup jobsNew cleanup job for journal unabbreviationMove abbreviation type from GUI to logic packageExclude journal abbreviation from default cleanup jobsNew FXML layout for journal cleanup panel7 files
Update test to use different key bindingUpdate tests to use merge entries instead of abbreviateUpdate test to use different key bindingRefactor tests to use new cleanup job classesAdd comprehensive tests for abbreviate journal cleanupUpdate cleanup worker test with journal abbreviation repositoryAdd comprehensive tests for unabbreviate journal cleanup9 files
Add German translation for journal-related tabAdd English translation for journal-related tabAdd Spanish translation for journal-related tabAdd French translation for journal-related tabAdd Italian translation for journal-related tabAdd Polish translation for journal-related tabAdd Portuguese translation for journal-related tabAdd Chinese translation for journal-related tabDocument journal abbreviation feature relocation2 files