Skip to content

Issue #373 - Add a case-sensitive search checkbox - #47

Merged
ericbsd merged 1 commit into
masterfrom
ghostbsd/issues#373
Sep 4, 2026
Merged

Issue #373 - Add a case-sensitive search checkbox#47
ericbsd merged 1 commit into
masterfrom
ghostbsd/issues#373

Conversation

@ericbsd

@ericbsd ericbsd commented Sep 3, 2026

Copy link
Copy Markdown
Contributor
  • Added a "Case Sensitive" checkbox next to "Search Description" in the search toolbar. It is unchecked by default and follows the same sensitivity rules as the other search widgets.
  • search_packages() now takes a case_sensitive argument, passing -C to pkg search when checked and -i when unchecked. Previously no case flag was passed, so the result depended on the CASE_SENSITIVE_MATCH setting of pkg.
  • Regenerated po/software-station.pot and merged the catalogs. The new strings "Case Sensitive" and "Match the search case exactly" still need translation.

Closes ghostbsd/issues#373

Summary by Sourcery

Add explicit case-sensitivity control to package searches and update translation resources.

New Features:

  • Add a case-sensitive search option to the package search toolbar.

Bug Fixes:

  • Make package search matching explicitly case-sensitive or case-insensitive instead of relying on the system default.

Chores:

  • Regenerate translation templates and update localized catalogs for the new search option.

- Added a "Case Sensitive" checkbox next to "Search Description" in the
  search toolbar. It is unchecked by default and follows the same
  sensitivity rules as the other search widgets.
- search_packages() now takes a case_sensitive argument, passing -C to
  pkg search when checked and -i when unchecked. Previously no case flag
  was passed, so the result depended on the CASE_SENSITIVE_MATCH setting
  of pkg.
- Regenerated po/software-station.pot and merged the catalogs. The new
  strings "Case Sensitive" and "Match the search case exactly" still
  need translation.

Closes ghostbsd/issues#373
@ericbsd
ericbsd requested review from a team as code owners September 3, 2026 20:59
@sourcery-ai

sourcery-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The PR adds a default-off case-sensitive search option to the toolbar, propagates it into package searches, and explicitly selects pkg’s -C or -i matching mode instead of relying on the system setting; translation catalogs are regenerated for the new UI text.

Sequence diagram for case-sensitive package search

sequenceDiagram
    actor User
    participant SearchToolbar
    participant search_packages
    participant pkg

    User->>SearchToolbar: Enter search and choose Case Sensitive
    SearchToolbar->>search_packages: search_packages(search, descriptions, case_sensitive)
    alt case_sensitive is true
        search_packages->>pkg: pkg search -U -C -Q name search
    else case_sensitive is false
        search_packages->>pkg: pkg search -U -i -Q name search
    end
    pkg-->>search_packages: Matching package names
    search_packages-->>SearchToolbar: Search results
    SearchToolbar-->>User: Display results
Loading

File-Level Changes

Change Details Files
Adds an explicit case-sensitivity control to the search toolbar and wires it through the search flow.
  • Adds an unchecked “Case Sensitive” checkbox with explanatory tooltip beside description search.
  • Propagates the checkbox state to package searches using the existing widget sensitivity behavior.
  • Uses pkg search -C for exact-case matching and -i for case-insensitive matching, removing dependence on the pkg default setting.
software-station
Extends the package-search API and command construction to enforce the selected matching mode.
  • Adds a case_sensitive parameter defaulting to false.
  • Builds the pkg command with the corresponding case flag while preserving description-search behavior.
software_station_pkg.py
Regenerates and merges gettext catalogs for the new user-facing strings.
  • Updates the POT template and language catalogs with “Case Sensitive” and “Match the search case exactly” for translation.
po/software-station.pot
po/fr.po
po/pt_BR.po
po/ru.po
po/zh_CN.po

Assessment against linked issues

Issue Objective Addressed Explanation
ghostbsd/issues#373 Add a case-sensitive search checkbox to the Software Station search interface, unchecked by default.
ghostbsd/issues#373 Pass the appropriate case-sensitivity option to pkg search: -i when the checkbox is unchecked and -C when it is checked.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ericbsd
ericbsd merged commit 1eb4619 into master Sep 4, 2026
2 checks passed
@ericbsd
ericbsd deleted the ghostbsd/issues#373 branch September 4, 2026 02:56
@github-project-automation github-project-automation Bot moved this from In Review to Done in Development Tracker Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add case-sensitive search checkbox to Software Station

2 participants