Bug 433297 - Locale-aware/romanized alphabetic categories for when using a language with a non-Latin alphabet
Summary: Locale-aware/romanized alphabetic categories for when using a language with a...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Menu (Kicker) (show other bugs)
Version: master
Platform: Other All
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords: usability
: 435045 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-20 08:04 UTC by Gary Wang
Modified: 2022-06-02 14:31 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Wang 2021-02-20 08:04:59 UTC
SUMMARY

Currently, the kickoff uses the first character in the application entry name to do the alphabetic indexing [1], makes non-English application also use its first character as an index/category. For CJK or other non-English users that have a lot of applications with non-English names, it'll be less useful and confused.

[1] https://github.com/KDE/plasma-workspace/blob/a5c7df39460eff7454f992a2307753bfb1eb095f/applets/kicker/plugin/rootmodel.cpp#L374-L390

For example, in a Chinese locale environment, there are some applications names:

 * System Settings // just showcase what will happen if there are also English application
 * 音乐播放器 // Audio player in English, Yinyue bofangqi in pinyin.
 * 视频播放器 // Video player in English, Shipin bofangqi in pinyin
 * 游戏中心 // Game center in English, Youxi zhongxin in pinyin
 * 手机助手 // Phone manager in English, Shouji zhushou in pinyin

There will be five indexes/categories in the current implementation, each index contains only one entry, like:

S --------
 * System Settings
视 --------
 * 视频播放器
手 --------
 * 手机助手
音 --------
 * 音乐播放器
游 --------
 * 游戏中心

If we could do locale-aware alphabetic indexing, it could look like this, with two indexes/categories:

S --------
 * System Settings
 * 视频播放器
 * 手机助手
Y --------
 * 音乐播放器
 * 游戏中心

ADDITIONAL INFORMATION

In ICU, there is an AlphabeticIndex API [2] that can be used to create locale-aware alphabetic indexes. I didn't find the exact same alternative in Qt, not sure if there is in KDE.

[2]: http://site.icu-project.org/design/alphabetic-index
Comment 1 Mikel Johnson 2021-02-20 10:25:56 UTC
Actually kickoff uses ListView's section group (https://doc.qt.io/qt-5/qml-qtquick-listview.html#section.criteria-prop)

Would be nice to get that fixed upstream, so everyone could enjoy the benefits

section.criteria: ViewSection.FirstCharacterRomanized or something like that
Comment 2 Gary Wang 2021-02-20 13:25:29 UTC
(In reply to Mikel Johnson from comment #1)
> Actually kickoff uses ListView's section group
> (https://doc.qt.io/qt-5/qml-qtquick-listview.html#section.criteria-prop)

Oh, seems I found the wrong one, but it seems both Kickoff, Kicker, and Application Dashboard are behave the same, is Application Dashboard also use the ListView's section group? And do I need to open two other bugs to report the Kicker and Application Dashboard behavior?

By the way, where can I found the source code of the Application Dashboard applet? And is there a place to look up which applets are in which source repo? Thanks a lot!

> Would be nice to get that fixed upstream, so everyone could enjoy the
> benefits
> 
> section.criteria: ViewSection.FirstCharacterRomanized or something like that

Agree. I'll try to report a bug to upstream later if no one already reported it :)
Comment 3 Mikel Johnson 2021-02-20 18:35:30 UTC
> Oh, seems I found the wrong one, but it seems both Kickoff, Kicker, and Application Dashboard are behave the same, is Application Dashboard also use the ListView's section group?

Application Dashboard uses the code from the plugin because there's no section group for GridView, so that can be fixed on our side

> Agree. I'll try to report a bug to upstream later if no one already reported it :)

Thanks :D be sure to post the link here once you do
Comment 4 Gary Wang 2021-02-21 07:13:45 UTC
> be sure to post the link here once you do

Here you go https://bugreports.qt.io/browse/QTBUG-91258 :)

btw since I don't know much about QML, so if you found anything that needs to be added to that bug report, please consider comment there :)
Comment 5 Shawn Rutledge 2021-02-22 07:58:10 UTC
I'm a bit surprised that Chinese people consider the first character of modern pinyin a better index character than the ancient symbols that are actually seen on the screen.  If a file clerk is organizing folders in a paper file cabinet, is there an implicit order that they always use?  Why should digital apps be different?  What's the convention in non-Qt contexts, e.g. in native contacts apps on phones?
Comment 6 Gary Wang 2021-02-22 10:11:56 UTC
(In reply to Shawn Rutledge from comment #5)
> I'm a bit surprised that Chinese people consider the first character of
> modern pinyin a better index character than the ancient symbols that are
> actually seen on the screen. 

Since there are a lot of Chinese characters than just 26 characters in English,
if you have a bunch of Chinese apps on the screen with a different name, they
could be very little chance to have a common first character, as the demo case
mentioned in SUMMARY.

> If a file clerk is organizing folders in a
> paper file cabinet, is there an implicit order that they always use?  Why
> should digital apps be different?  What's the convention in non-Qt contexts,
> e.g. in native contacts apps on phones?

No different, in Microsoft Windows start menu, Microsoft Launcher Android
app, and LineageOS default contact app, they both sort and category in the
first symbol in pinyin. And also, Chinese dictionaries also use the same way
to sort and category characters.
Comment 7 Shinjo Park 2021-05-17 15:52:37 UTC
Okay, confirmed the same issue for Korean. However we have DIFFERENT requirement from Chinese.

What I am seeing currently:
도 --------
 * 도움말 (Help Center)
둘 --------
 * 둘러보기 (Discover)
시 --------
 * 시스템 모니터 (System Monitor)
 * 시스템 설정 (System Settings)
에 --------
 * 에모지 선택기 (Emoji Selector)
와 --------
 * 와콤 태블릿 찾기 (Find Wacom Tablets)
정 --------
 * 정보 센터 (Information Center)

What I would expect:
ㄷ --------
 * 도움말
 * 둘러보기
ㅅ --------
 * 시스템 모니터
 * 시스템 설정
ㅇ --------
 * 에모지 선택기
 * 와콤 태블릿 찾기
ㅈ --------
 * 정보 센터

Difference is it is grouped by the initial of each Hangul character. As far as I know the contact grid of Sailfish OS does the right job for Korean: Decompose the composed letters in NFD, categorize with the first character of decomposed unicode code point sequence. See also: https://git.sailfishos.org/mer-core/nemo-qml-plugin-contacts/blob/master/src/seasidefilteredmodel.cpp#L133
Comment 8 Mikel Johnson 2021-08-28 09:40:05 UTC
*** Bug 435045 has been marked as a duplicate of this bug. ***
Comment 9 Fushan Wen 2022-05-18 08:18:03 UTC
Git commit c0cb9f9929cfca683313252ebe95a0ac2b62f6e8 by Fushan Wen, on behalf of Xuetian Weng.
Committed on 18/05/2022 at 08:17.
Pushed by fusionfuture into branch 'master'.

Improve kickoff's group for non-latin language.

Use icu transliterator to convert i18n'ed name into ascii for initial
character grouping. Since AppsModel does not use group(), just use group
to store this value for convenience.

Relevant qt feature request for having a new mode for section:
https://bugreports.qt.io/browse/QTBUG-91258

Strategy used by this code mainly focused on CJK language.
1. Japanese locale will group all Han script together.
   Katakana will be converted to hiragana.
2. Hangul will decompose and use consonant as group name.
3. Han will use icu "Han-Latin" transliteration to convert to pinyin.

M  +7    -0    applets/kicker/CMakeLists.txt
M  +56   -0    applets/kicker/plugin/appentry.cpp
M  +3    -0    applets/kicker/plugin/appentry.h
M  +7    -1    applets/kicker/plugin/appsmodel.cpp
M  +8    -2    applets/kicker/plugin/rootmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/c0cb9f9929cfca683313252ebe95a0ac2b62f6e8
Comment 10 Gary Wang 2022-05-19 04:46:00 UTC
> Improve kickoff's group for non-latin language.

Thanks for the fix! Does the fix also apply to the Application Dashboard applet since it also behaviors the same way as Kicker and Kickoff? If not, do I need to open a separated bug report for the Application Dashboard behavior?
Comment 11 Fushan Wen 2022-05-19 04:52:17 UTC
(In reply to Gary Wang from comment #10)
> > Improve kickoff's group for non-latin language.
> 
> Thanks for the fix! Does the fix also apply to the Application Dashboard
> applet since it also behaviors the same way as Kicker and Kickoff? If not,
> do I need to open a separated bug report for the Application Dashboard
> behavior?

Yes
Comment 12 Fushan Wen 2022-05-19 04:53:40 UTC
The group in Dashboard was also fixed.
Comment 13 Gary Wang 2022-05-19 04:55:06 UTC
(In reply to Fushan Wen from comment #11)
> (In reply to Gary Wang from comment #10)
> > Thanks for the fix! Does the fix also apply to the Application Dashboard
> > applet since it also behaviors the same way as Kicker and Kickoff? If not,
> > do I need to open a separated bug report for the Application Dashboard
> > behavior?
> 
> Yes
>
> The group in Dashboard was also fixed.

Thanks for clarifying!
Comment 14 Fushan Wen 2022-06-02 14:31:09 UTC
Git commit ed6895fe624a94ee5635a341167afaf931f5389f by Fushan Wen.
Committed on 02/06/2022 at 14:25.
Pushed by fusionfuture into branch 'master'.

applets/kickoff: add a page to show all sections in "All Applications"

This allows navigating to the first item in a specified section.

M  +24   -0    applets/kickoff/package/contents/ui/ApplicationsPage.qml
M  +36   -17   applets/kickoff/package/contents/ui/KickoffListView.qml
A  +60   -0    applets/kickoff/package/contents/ui/SectionView.qml     [License: GPL(v2.0+)]

https://invent.kde.org/plasma/plasma-desktop/commit/ed6895fe624a94ee5635a341167afaf931f5389f