Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight search match in results #42

Open
nijel opened this issue Apr 26, 2012 · 4 comments · Fixed by #269
Open

Highlight search match in results #42

nijel opened this issue Apr 26, 2012 · 4 comments · Fixed by #269
Labels
enhancement Adding or requesting a new feature.

Comments

@nijel
Copy link
Member

nijel commented Apr 26, 2012

It is difficult to spot matching words in case string is too long, so the matched phrase should be highlighted.

  • Right now only full search phrase is highlighted even though it is searched by words.
  • The highlighter does not understand the search syntax, so it looks for source:literal in all strings instead of looking for literal in the source string.
ChrisOelmueller referenced this issue in ChrisOelmueller/weblate May 3, 2013
So far this only knows about source strings.
@ChrisOelmueller
Copy link
Contributor

Any idea how to handle highlights in target string textarea? Not exactly having html around there...

ChrisOelmueller added a commit to ChrisOelmueller/weblate that referenced this issue May 3, 2013
ChrisOelmueller added a commit to ChrisOelmueller/weblate that referenced this issue May 3, 2013
Not profiled in any way. Hopefully not as bad as using `re.findall` to
spot variations and then using `str.replace`.
@nijel
Copy link
Member Author

nijel commented May 3, 2013

In target the only option would be probably to use some fancy editor like CodeMirror. Though I'm not sure if it's worth of if...

@nijel
Copy link
Member Author

nijel commented May 3, 2013

Merged #269 which partially implements this - what is missing is using whoosh for fulltext highlighting (possibly through whoosh.highlight.highlight). Also target string highlighting, but that's most likely different topic as it would need some enhanced editor...

@nijel nijel added this to the 3.11 milestone Dec 18, 2019
@nijel nijel modified the milestones: 3.11, 4.0 Feb 9, 2020
@nijel nijel removed this from the 4.0 milestone Feb 20, 2020
@KadAnna
Copy link

KadAnna commented Nov 2, 2022

I am for this, whenever I search how some term has been translated - some of our strings are really long, so it is hard to spot the searched term. Thanks!

@nijel nijel changed the title Highlight search results Highlight search match in results Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants