Skip to content

Rename "Create backup" preference to "Create backups" - #780

Open
koppor wants to merge 2 commits into
mainfrom
create-backups-label
Open

koppor wants to merge 2 commits into
mainfrom
create-backups-label

Conversation

@koppor

@koppor koppor commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Summary

The preferences checkbox now reads "Create backups", because JabRef keeps multiple backup versions per library.

Steps to test

  1. Open File > Preferences > General and scroll to "Saving".
  2. The checkbox next to the backup directory reads "Create backups".

Create backups

Related issues and pull requests

None.

AI usage

Claude Code (model claude-opus-5-5), AIL3.

AI CHECKLIST.md walkthrough

1. Code self-review

Nullability and control flow

  • [/] No == null / != null checks — JSpecify annotations (@NullMarked, @Nullable, @NonNull) used instead.
  • [/] No Objects.requireNonNull(...) — nullability expressed via JSpecify annotations.
  • [/] New classes annotated with @NullMarked (org.jspecify.annotations.NullMarked).
  • [/] Optional consumed with ifPresent / ifPresentOrElse / map / orElseThrow — never orElse(unusedValue) nor an isPresent() + get() block.
  • [/] StringUtil.isBlank(...) used instead of s == null || s.isBlank().

Exceptions

  • [/] No catch (Exception e) — only specific exceptions are caught.
  • [/] No throw new RuntimeException(...) / IllegalStateException(...) — these tear down the whole application.
  • [/] Logged exceptions are passed as the last logger argument (LOGGER.info("...", e)), not concatenated into the message string.

Style and idioms

  • [/] New BibEntry objects built with withers (withField, not setField).
  • [/] Modern Java used: List.of() / Map.of() / Set.of(), Path.of(), SequencedCollection / SequencedSet, text blocks.
  • [/] Regexes use a precompiled Pattern.compile(...) constant, not String.matches(...).
  • [/] Background work uses org.jabref.logic.util.BackgroundTask, not new Thread().
  • No commented-out code, no trivial comments restating the code, no AI-disclosure comments in source.
  • [/] Markdown Javadoc (///) uses Markdown syntax, not JavaDoc inline tags: `code` instead of {@code}, [ClassName] instead of {@link}.

User-facing text

  • All user-facing text localized (Localization.lang in Java, % prefix in FXML).
  • Sentence case (not Title Case); no trailing !; labels do not end with :.
  • [/] Variance expressed with placeholders ("...: %0"), not string concatenation.

Security

  • [/] User-controlled data (request params, entry fields, file contents) is HTML-escaped before being written into any text/html response — including exception/error messages, not just the success body (XSS).

Tests

  • [/] Behavior changes in org.jabref.model / org.jabref.logic have added or updated tests.
  • [/] Tests assert object contents (assertEquals), use plain JUnit asserts (not AssertJ), have no @DisplayName, do not catch exceptions (let them propagate so JUnit reports setup/teardown failures directly), and use @TempDir instead of manual temp directories.
  • [/] Fetcher tests hit the live endpoints — the remote API is not mocked or stubbed (automated-review suggestions to mock it are rejected on purpose).

2. Verification commands

  • [/] ./gradlew :jablib:check (or ./gradlew check for all modules).
  • [/] ./gradlew checkstyleMain checkstyleTest checkstyleJmh.
  • [/] ./gradlew modernizer.
  • [/] ./gradlew --no-configuration-cache :rewriteDryRun reports no changes (run ./gradlew rewriteRun to fix).
  • [/] ./gradlew javadoc.
  • [/] npx markdownlint-cli2 "docs/**/*.md" "*.md" (only if Markdown changed).
  • [/] npm ci && npm run textlint reports no misspellings (only if Markdown changed).
  • [/] Only if formatting is still off after rewriteRun: docker run -v $(pwd):/github/workspace ghcr.io/leventebajczi/intellij-format:master "*.java" "" ".idea/codeStyles/Project.xml".

3. Documentation

  • CHANGELOG.md entry added if the change is visible to the user (end-user wording, no extra blank lines, sorted in next to existing entries about the same component/feature). Link the issue if one exists; link the PR only when no issue exists. Use TODO as the placeholder when neither is known yet — never a fake number. No entry for fixes to changes that were themselves introduced after the last release (feature only in ## [Unreleased]) — update the existing unreleased entry instead if needed.
  • Searched jabref/issues and jabref-koppor/issues for a related issue; linked only on a confident match, otherwise kept TODO (no closes/fixes for merely-similar issues).
  • [/] Requirement added to docs/requirements/<area>.md if the change is a new feature or significant bug fix (skip for refactors, minor fixes, and internal changes).
  • [/] Developer documentation under docs/ updated if behavior or architecture changed.

4. Pull request

  • PR body built from .github/PULL_REQUEST_TEMPLATE.md, every section filled.
  • All checklist items kept and marked [x], [ ], or [/].
  • "Steps to test" is a numbered list with a cropped screenshot of the result for every visible change; no video (only allowed when another program is involved, e.g. drag and drop or push to an external application).
  • All HTML comments removed from the PR body.
  • PR created with gh pr create --body-file <file> (not --body).
  • [/] If CHANGELOG.md used a TODO placeholder (no issue confidently identified yet — an existing issue link always stays), the PR was opened as draft, the placeholder was replaced with the real PR-number link after PR creation, committed and pushed, and only then was the PR marked ready for review. If an issue is identified or created later, the link is switched to the issue.

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • If AI tools were used, I disclosed them in the "AI usage" section and reviewed, understood, and take full ownership of all AI-generated code
  • I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • I added screenshots in the PR description (if change is visible to the user)
  • I added one sentence (max 20 words) to CHANGELOG.md describing the change from the user's point of view (if the change is visible to the user)
  • [/] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

🤖 Generated with Claude Code

JabRef keeps several backup versions, so the plural fits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@koppor koppor added this to the 1 - soon-upstream milestone Sep 23, 2026
@koppor
koppor marked this pull request as ready for review September 23, 2026 13:32
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Rename backup preference to “Create backups”

🐞 Bug fix 🕐 Less than 5 minutes

Grey Divider

AI Description

• Renames the backup preference to reflect retention of multiple backup versions.
• Updates the English localization entry to match the revised interface label.
High-Level Assessment

The current approach is optimal: updating both the localization lookup and its English resource keeps JabRef’s source-string localization convention consistent. Changing only the displayed resource value would leave a misleading singular key.

Files changed (2) +2 / -2

Bug fix (2) +2 / -2
GeneralTab.javaPluralize the backup preference label +1/-1

Pluralize the backup preference label

• Changes the Saving preferences checkbox label from “Create backup” to “Create backups” to accurately describe multiple retained backup versions.

jabgui/src/main/java/org/jabref/gui/preferences/general/GeneralTab.java

JabRef_en.propertiesUpdate the English backup localization entry +1/-1

Update the English backup localization entry

• Replaces the singular localization key and value with the plural “Create backups” wording used by the preferences interface.

jablib/src/main/resources/l10n/JabRef_en.properties

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Users see an outdated backup label ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
GeneralTab changes the preference text to Create backups, but the user-visible change is not
recorded in the unreleased changelog. The checkbox label is therefore changed without the required
release-note entry for users reviewing upcoming changes.
Code

jabgui/src/main/java/org/jabref/gui/preferences/general/GeneralTab.java[126]

+                        .checkWithField(Localization.lang("Create backups"), viewModel.createBackupProperty(),
Evidence
The PR changes a visible Preferences checkbox from singular to plural, while the current Unreleased
changelog sections contain no entry for this change. The checklist requires every user-visible
released change to have one appropriately formatted changelog entry.

AGENTS.md: Add and Format CHANGELOG Entries Only for User-Visible Released Changes: AGENTS.md: Add and Format CHANGELOG Entries Only for User-Visible Released Changes
jabgui/src/main/java/org/jabref/gui/preferences/general/GeneralTab.java[126-126]
CHANGELOG.md[13-22]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The user-facing preference label changed from `Create backup` to `Create backups`, but `CHANGELOG.md` has no corresponding entry under the appropriate Unreleased section.
## Fix Focus Areas
- CHANGELOG.md[13-22]
## Recommended Fix
Add one concise entry under the matching `Unreleased` section, beginning with `We changed`, describing the visible label change, and link the pull request because no issue is provided.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Translated settings lose their label 🐞 Bug ≡ Correctness
Description
GeneralTab.buildView() now requests the Create backups localization key, while the non-English
bundles still define only Create backup. When a non-English locale is active, the missing lookup
falls back to the English key text instead of the translated label, affecting the General
preferences checkbox.
Code

jabgui/src/main/java/org/jabref/gui/preferences/general/GeneralTab.java[126]

+                        .checkWithField(Localization.lang("Create backups"), viewModel.createBackupProperty(),
Evidence
The changed Java code requests Create backups, and the English bundle defines that new key. Other
locale bundles still use the old key; for example, the German bundle defines only Create backup,
so the new lookup cannot retrieve its German translation.

jablib/src/main/resources/l10n/JabRef_de.properties[2977-2977]
jablib/src/main/resources/l10n/JabRef_en.properties[2990-2990]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The preferences UI now looks up `Create backups`, but the localized property files still contain the old `Create backup` key. Non-English users therefore receive the untranslated fallback text instead of their localized backup label.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preferences/general/GeneralTab.java[126-126]
- jablib/src/main/resources/l10n/JabRef_*.properties[1-9999]
## Recommended Fix
Rename the corresponding `Create backup` entry to `Create backups` in every localization bundle, preserving each existing translation and ensuring the new key is available for all supported locales.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Finding overflow, which tucks the rest behind 'View more'

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

.checkbox(Localization.lang("Autosave local libraries"), viewModel.autosaveLocalLibrariesProperty(),
autosave -> autosave.help(HelpFile.AUTOSAVE))
.checkWithField(Localization.lang("Create backup"), viewModel.createBackupProperty(),
.checkWithField(Localization.lang("Create backups"), viewModel.createBackupProperty(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Translated settings lose their label 🐞 Bug ≡ Correctness

GeneralTab.buildView() now requests the Create backups localization key, while the non-English
bundles still define only Create backup. When a non-English locale is active, the missing lookup
falls back to the English key text instead of the translated label, affecting the General
preferences checkbox.
Agent Prompt
## Issue description
The preferences UI now looks up `Create backups`, but the localized property files still contain the old `Create backup` key. Non-English users therefore receive the untranslated fallback text instead of their localized backup label.

## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preferences/general/GeneralTab.java[126-126]
- jablib/src/main/resources/l10n/JabRef_*.properties[1-9999]

## Recommended Fix
Rename the corresponding `Create backup` entry to `Create backups` in every localization bundle, preserving each existing translation and ensuring the new key is available for all supported locales.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🤖 Generated with Claude Code

Not done: only JabRef_en.properties lives here; other bundles come from Crowdin, English fallback intended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant