I was browsing through the list of files and folders in a project and I wanted to search for folders starting with plasma to translate first but the quick search is also filtering the names of the files so if there's a file called kcm_disks.po inside a folder called plasma-disks it doesn't appear. Thank you.
I also find this annoying. I think the problem is that the search *only* looks at the filenames, not the folder names. One solution would be checkboxes for searching in either files or folders, but I think a better solution would be to just prefix the file names with the names of the folder(s) when doing the search (and separating (sub)folders by / characters). So for the file foo/bar/baz.po a search for either ‘foo’, ‘bar’ or ‘baz’ should display the file. Since the search string is a regexp, we can easily modify the search to search in just the folder or the file name. Example: ark/ark.po ark/ark_json_.po arkade/foo.po keditbookmarks/keditbookmarks.po A search for ‘ark’ would match all four files. A search for ‘^ark’ would match the first three files. A search for ‘ark/’ would match the first two files.
A possibly relevant merge request was started @ https://invent.kde.org/sdk/lokalize/-/merge_requests/162
Git commit d61f228f94b690589d496bd9d924e023797cb0ec by Albert Astals Cid, on behalf of Finley Watson. Committed on 21/10/2024 at 20:56. Pushed by aacid into branch 'master'. Search across full relative paths of files and dirs in Project Overview When using the search in Project Overview, if any part of the relative path from the project root to the file / dir matches, then the item is included in the search results: for a project with a tree containing 'foo/bar.po', searching 'foo' will display 'foo/bar.po' and so will searching 'bar' or 'o/b' etc. This works into subdirectories, and also supports wildcards e.g. 'fo*.po' for our example above. There are two other changes as well: enable alternating row colours because this is standard for other parts of Lokalize, and collapse directories when the search string is fewer than 3 characters, since we were already expanding directories by default for 3 or more chars. M +19 -14 src/project/projecttab.cpp M +9 -0 src/project/projecttab.h M +18 -31 src/project/projectwidget.cpp M +33 -5 src/project/projectwidget.h https://invent.kde.org/sdk/lokalize/-/commit/d61f228f94b690589d496bd9d924e023797cb0ec