Make a '%' translatable. Use 'formatByteSize()' to convert to MiB
Following the "Correct percentages when searching text inside files" changes: Make a '%' translatable. Use 'formatByteSize()' to convert to MiB.
TEST PLAN
Go to a folder with a lot of big files and symlinks to big files (like the folder /usr/lib/x86_64-linux-gnu/
in Kubuntu 21.04), press Ctrl+S, search for files that have this text inside: "temp unit: " (with space, without quotes). Check that —instead of seeing e.g. percentages bigger than 100%— all shown percentages are correct and a quantity of MiB is shown when a percentage can not be calculated.
Follow these steps that the bug reporter wrote on https://bugs.kde.org/show_bug.cgi?id=419547:
- Open Krusader
- Go to the root in one panel
- Ctrl+S
- Make all settings as on screenshot: all default, but: a) search text is "temp unit: " (with space, without quotes) b) exception folder: "/home" (without quotes)
- Press Search button.
check that {this problem written by the bug reporter} does not happen: "After several seconds Krusader starts to show negative percentage values near currently searching file".