SUMMARY This was checked with people names in the German and English localization (LANG=C): To select images of one person alone (no other persons in the image), the second selection is the pseudo name "No other". In English this is sorted on top of all the other names. In German the equivalent term is "keine weiteren". But this is sorted not on top and not even below "K" but below "N". STEPS TO REPRODUCE 1. Have a KPA instance with German user interface. Most probably any language other than English will work as well. 2. Have a database with some images that are tagged with only one single person and others with tags for this person and others. The same would work for other categories than people. 3. From the home screen click the people category and select this person. 4a. From the home screen click on the people category again and select "No other" (en) / "keine weiteren" (de) ... 4b. Observe where in the list the respective term (pseudo name) is sorted. OBSERVED RESULT In the English UI "No others" is sorted on top of the list. In the German UI "keine weiteren" is sorted below "N". EXPECTED RESULT The pseudo name should always be placed on top of the list. [At least it should be sorted correctly below "K" and not "N".] ADDITIONAL INFO The same applies for the pseudo name "None" / "keine". I did a "git bisect" search: ---- 44d16fef5aac0568b38db571e9cba2c7e46bba9e is the first bad commit commit 44d16fef5aac0568b38db571e9cba2c7e46bba9e Author: Johannes Zarl-Zierl <johannes@zarl-zierl.at> Date: Sun Oct 8 14:57:01 2023 +0200 Add natural sort order to Browser::TreeFilter. This adds locale-specific numerical sort order to the category browser pages. ---- SOFTWARE/OS VERSIONS Linux/KDE Plasma: openSuse Leap 15.5 KPA: v5.11.0-151-ge304108a KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8
Hi Andreas, Thanks for filing the bug report! I can confirm that this issue is indeed caused by the newly introduced natural sort order feature...
Git commit 7452e018361908b6f6b6146a8dd8de75461346ce by Johannes Zarl-Zierl. Committed on 03/11/2023 at 21:53. Pushed by johanneszarl into branch 'master'. Fix sort order of "no other" and "none" This fixes a regression introduced by 44d16fef5aac0568b38db571e9cba2c7e46bba9e (natural sort order), causing "no other" or "none" and their localized versions to be sorted with the rest of the list items when natual sort order was active. M +13 -6 Browser/AbstractCategoryModel.cpp M +8 -0 Browser/TreeFilter.cpp M +7 -6 Browser/enums.h https://invent.kde.org/graphics/kphotoalbum/-/commit/7452e018361908b6f6b6146a8dd8de75461346ce
I can confirm the fix. Thanks! Yeah!
Thanks for checking!
Git commit 7c4b288689dfcb4a1aaba556f8eea211eb0f1380 by Johannes Zarl-Zierl. Committed on 05/11/2023 at 00:16. Pushed by johanneszarl into branch 'master'. Fix sort order on overview page. Similar to bug #476504, with natural sort order, non-category items on the browser overview page, like "Show Thumbnails" and others, would be sorted alongside category items. These entries should be sorted after categories. Expanding on the ideal laid out in 7452e018361908b6f6b6146a8dd8de75461346ce, use a SortPriorityRole to sort these entries in a stable and (hopefully) intuitive way: 1. Categories 2. search, geo position and exiv info (sorted according to localized name) 3. Untagged images 4. "Show Thumbnails" M +7 -2 Browser/AbstractCategoryModel.cpp M +22 -5 Browser/OverviewPage.cpp M +5 -5 Browser/TreeFilter.cpp M +1 -2 Browser/enums.h https://invent.kde.org/graphics/kphotoalbum/-/commit/7c4b288689dfcb4a1aaba556f8eea211eb0f1380
Created attachment 162868 [details] KPA with English UI and some custom categories (Tokens are the "A+" icon)
Created attachment 162869 [details] KPA with German UI and some custom categories (Tokens are the "A+" icon) I think the very last commit did not work out as intended (?): As far as I understand (I may be wrong), the categories in the main window should have been sorted in a consistent way: Categories first and then the other items - preferably always in the same order Notice the different positions of "Folder/Ordner" and "Tokens/Kürzel" in the two screenshots of the same DB with different LANG settings. KPA-Version: v5.11.0-166-g7c4b2886 Does this go back to the time when the default category names were translated? Most other of my databases have the term "Tokens" instead of "Kürzel" irrespective of LANG setting.
(In reply to Andreas Schleth from comment #7) > I think the very last commit did not work out as intended (?): > As far as I understand (I may be wrong), the categories in the main window > should have been sorted in a consistent way: Categories first and then the > other items - preferably always in the same order Yes, that was the intention. > Notice the different positions of "Folder/Ordner" and "Tokens/Kürzel" in the > two screenshots of the same DB with different LANG settings. There's more going on here. "Darsteller" and "andere Personen" should be sorted entirely different in either locale. > Does this go back to the time when the default category names were > translated? Most other of my databases have the term "Tokens" instead of > "Kürzel" irrespective of LANG setting. I don't think so. There's nothing special anymore about those names...
Git commit 152f0fd5a6063a61663a92754ff255345e3a8bab by Johannes Zarl-Zierl. Committed on 05/11/2023 at 21:35. Pushed by johanneszarl into branch 'master'. Use alphabetic sort order for categories on overview page Unit now, categories on the browser overview page would be sorted by their "row" value. To have a more intuitive order, change this to alphabetical sort order. M +6 -9 Browser/OverviewPage.cpp https://invent.kde.org/graphics/kphotoalbum/-/commit/152f0fd5a6063a61663a92754ff255345e3a8bab
Ok, I found the culprit: items on the overview page are sorted by their "row" property and not their name. I don't even know for sure where the row value comes from, TBH. I changed this now to use alphabetical sort order. Is this result stable for you as well?
Created attachment 162898 [details] Demo DB in English and German main window KPA v5.11.0-171-g314e3ca7 I think "Folder" and "Media Type" should be sorted with the non-category item at the end. Not necessarily in alphabetical order. Then, "Tokens" could be considered a non-category item as well, as it is always there without fail. It might be sensible to sort the non-category items according to importance. (I usually navigate on autopilot by screen position without reading the sub titles.) The single most important by far is "show thumbnails" - that should always be at the end to be easiest to find. I often use "Folder", "Tokens" and "Search", rarely "Exif Info" and "Media Type", almost never "untagged" and "Geo Position" - others may have different preferences.
Git commit e944761a8942382d199652772b3f6d2b1dd47fab by Johannes Zarl-Zierl. Committed on 06/11/2023 at 21:01. Pushed by johanneszarl into branch 'master'. Try to improve overview page sort order Old: 1. Categories 2. Geo Position, Exif Search, Regular Search (=items opening a special widget) 3. Untagged Images 4. Show Thumbnails New: 1. Regular Categories 2. Special Categories (Tokens, Media Type, Folder) 3. Geo Position, Exif Search, Regular Search (=items opening a special widget) 4. Untagged Images 5. Show Thumbnails M +15 -9 Browser/OverviewPage.cpp https://invent.kde.org/graphics/kphotoalbum/-/commit/e944761a8942382d199652772b3f6d2b1dd47fab
(In reply to Andreas Schleth from comment #11) > I think "Folder" and "Media Type" should be sorted with the non-category > item at the end. Not necessarily in alphabetical order. > Then, "Tokens" could be considered a non-category item as well, as it is > always there without fail. Having them apart from the regular categories makes sense. I've implemented this now, more or less. To me, the specific ordering of Folder, Media Type, Tokens is not that important, as long as it's consistent (and everybody will have their own idea about the best ordering). > It might be sensible to sort the non-category items according to importance. > (I usually navigate on autopilot by screen position without reading the sub > titles.) > > The single most important by far is "show thumbnails" - that should always > be at the end to be easiest to find. > I often use "Folder", "Tokens" and "Search", rarely "Exif Info" and "Media > Type", almost never "untagged" and "Geo Position" - others may have > different preferences. The last sentence is the key takeaway. One can't find the "right" ordering for everyone, apart from "Show Thumbnails" being the most important one. I did try to have the ordering make some sense, though: 1. regular category things 2. special category things 3. strange behaving things 4. things that switch to thumbnail view In any case, sorting this differently from what it was (by chance) before upsets the muscle memory. So it makes sense to try to invest some time to do it well (and avoid having to change it again a year down the line).