Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

fix: search through all translations of words#28

Merged
Dzheremi2 merged 4 commits intoDzheremi2:masterfrom
JoseBritto:master
Aug 10, 2025
Merged

fix: search through all translations of words#28
Dzheremi2 merged 4 commits intoDzheremi2:masterfrom
JoseBritto:master

Conversation

@JoseBritto
Copy link
Contributor

Hi,

Thanks for this amazing application. Noticed that the search bar only searches for the first translation of each word.

This PR:

  • Searches through all entries in translations array
  • Ignores leading and trailing whitespace for search string

I'm not well versed with python, so I couldn't think of a way to do this without using for and if.

@JoseBritto JoseBritto changed the title fix: search through all translations for a word while ignoring leading and trailing spaces fix: search through all translations of words Jul 28, 2025
@Dzheremi2
Copy link
Owner

Thank you for your contribution. I'll test this PR out when I finally be with a PC, in 1 day approximately.

Copy link
Owner

@Dzheremi2 Dzheremi2 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Also you've mentioned an accent insensitive search in #29, this is a nice idea and as you already have the code done, you can add that to this PR. But I think that this accent insensitive search should be an optinal feature (add a setting for it) for such cases when user needs to destinguish accented words from non-accented ones.

@Dzheremi2 Dzheremi2 added the feature-request New feature or request label Jul 29, 2025
@JoseBritto
Copy link
Contributor Author

Hi. Thanks. I'll get that code into here. I like the idea of having it as an option. I'll need to look into how to do that. I'll get some time today or tomorrow evening.

@JoseBritto
Copy link
Contributor Author

Hi. This should be ready for review. I'm not sure about the string that should appear in the settings page. Let me know if this needs changes.

Copy link
Owner

@Dzheremi2 Dzheremi2 left a comment

Choose a reason for hiding this comment

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

Just tested out and it works just fine. LGTM!

I'll merge it on August 9th or 10th.

@Dzheremi2 Dzheremi2 merged commit 5e5abb8 into Dzheremi2:master Aug 10, 2025
2 checks passed
@Dzheremi2 Dzheremi2 linked an issue Aug 10, 2025 that may be closed by this pull request
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature-request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Use accent insensitive search

2 participants