Summary: | Search is not language agnostic | ||
---|---|---|---|
Product: | [Plasma] krunner | Reporter: | Mikhail Shchemelev <mikhail.schemelev> |
Component: | general | Assignee: | Alexander Lohnau <alexander.lohnau> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | nate, plasma-bugs |
Priority: | NOR | ||
Version: | 5.20.1 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Other | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/commit/6f54d49ade5f11f1a5d8f4944e61e0ede7380267 | Version Fixed In: | 5.21 |
Sentry Crash Report: |
Description
Mikhail Shchemelev
2020-10-24 19:28:25 UTC
Currently only the translated strings are used to compare the trigger words. So allowing both English+Native locale should be the way to go. Just like the activity runner (there activity and the translated version are trigger words). In that case the parsing logic for this runner would need to be rewritten, because the way it is currently done would not scale well. (In reply to Alexander Lohnau from comment #1) > Currently only the translated strings are used to compare the trigger words. > So allowing both English+Native locale should be the way to go. Just like > the activity runner (there activity and the translated version are trigger > words). > > In that case the parsing logic for this runner would need to be rewritten, > because the way it is currently done would not scale well. Sadly i'm not familiar with implementation details of krunner engine. Can it be implemented by simply adding bilingual keyword sets into translation file? Or is there some additional work that is needed to make that work? As a matter of fact, this is how it is done in gnome (they are affected too). Their greek translators have added both greek and english keywords into gnome-shell po file. I did a patch for their russian translation, but their russian translation team is somewhat inactive now. >Can it be implemented by simply adding bilingual keyword sets into translation file? Or is there some additional work that is needed to make that work?
It will need to be adjusted in the individual plugin where the match logic happens. But there are some things that need to be adjusted first to make sure the runner is future-proof.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/521 Git commit 6f54d49ade5f11f1a5d8f4944e61e0ede7380267 by Alexander Lohnau. Committed on 27/12/2020 at 21:56. Pushed by alex into branch 'master'. Rewrite match logic of PowerDevil runner - Support partial matches - Allow both translated and non-translated trigger words - Avoid duplicating the translated strings. This can become useful in case we also want to add the non-translated trigger words to the syntaxes (once they get displayed somewhere ;)) - Get rid of QRegExp usage Related: bug 428193 FIXED-IN: 5.21 M +101 -83 runners/powerdevil/PowerDevilRunner.cpp M +16 -2 runners/powerdevil/PowerDevilRunner.h https://invent.kde.org/plasma/plasma-workspace/commit/6f54d49ade5f11f1a5d8f4944e61e0ede7380267 |