Bug 517091 - UI elements are sometimes squashed together when using languages with non-Latin symbols (e.g. Arabic, Chinese, Japanese)
Summary: UI elements are sometimes squashed together when using languages with non-Lat...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (other bugs)
Version First Reported In: 6.6.2
Platform: Arch Linux Linux
: VHI grave
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 514542 519835 519978 (view as bug list)
Depends on:
Blocks:
 
Reported: 2026-03-04 16:05 UTC by Ye Jingchen
Modified: 2026-05-18 20:26 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.27
Sentry Crash Report:


Attachments
UI elements in a mess (33.04 KB, image/webp)
2026-03-04 16:05 UTC, Ye Jingchen
Details
stdout and stderr (78.42 KB, text/plain)
2026-03-04 16:07 UTC, Ye Jingchen
Details
discover output with LANGUAGE unset (103.97 KB, text/plain)
2026-03-05 12:08 UTC, Ye Jingchen
Details
discover 6.6.2 launched with LANG=ja_JP.UTF-8 (219.70 KB, image/png)
2026-03-19 12:26 UTC, Ryan Y
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ye Jingchen 2026-03-04 16:05:38 UTC
Created attachment 190348 [details]
UI elements in a mess

SUMMARY
When run as `LANG=zh_CN.UTF-8 LANGUAGE=zh_CN:en_US:C plasma-discover`, all UI elements like texts and images are all overlapped into the same place. The same also happens with `LANG=ja_JP.UTF-8 LANGUAGE=ja_JP:en_US:C plasma-discover`, but not with `LANG=en_US.UTF-8 LANGUAGE=en_US:C plasma-discover`.

STEPS TO REPRODUCE
1. Run `LANG=zh_CN.UTF-8 LANGUAGE=zh_CN:en_US:C plasma-discover`

OBSERVED RESULT
UI is a mess.

EXPECTED RESULT
Normal Discover home page.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.6.2
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.2
Kernel Version: 6.18.13-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 PRO 6850HS with Radeon Graphics
Memory: 16 GiB of RAM (14.9 GiB usable)
Graphics Processor: AMD Radeon Graphics

ADDITIONAL INFORMATION
Comment 1 Ye Jingchen 2026-03-04 16:07:17 UTC
Created attachment 190349 [details]
stdout and stderr

Output from `LANG=zh_CN.UTF-8 LANGUAGE=zh_CN:en_US:C plasma-discover 2>/tmp/discover.log`
Comment 2 Nate Graham 2026-03-04 21:46:00 UTC
Looks identical to what I reported in Bug 514542, but for Arabic.

Does the problem go away if you unset LANGUAGE (and make sure it's unset in the environment) and only run `LANG=zh_CN.UTF-8 plasma-discover`?
Comment 3 Ye Jingchen 2026-03-05 12:07:10 UTC
(In reply to Nate Graham from comment #2)
> Looks identical to what I reported in Bug 514542, but for Arabic.
> 
> Does the problem go away if you unset LANGUAGE (and make sure it's unset in
> the environment) and only run `LANG=zh_CN.UTF-8 plasma-discover`?

No, the UI is still a mess. I used these command to unset LANGUAGE, and printenv can confirm:

> yjc@yjc-hpeb ~ % env --unset=LANGUAGE LANG=zh_CN.UTF-8 printenv LANG
> zh_CN.UTF-8
> yjc@yjc-hpeb ~ % env --unset=LANGUAGE LANG=zh_CN.UTF-8 printenv LANGUAGE 
> 1 yjc@yjc-hpeb ~ % env --unset=LANGUAGE LANG=zh_CN.UTF-8 plasma-discover &> /tmp/discover-2.log
Comment 4 Ye Jingchen 2026-03-05 12:08:01 UTC
Created attachment 190383 [details]
discover output with LANGUAGE unset

console output with LANGUAGE unset.
Comment 5 Ryan Y 2026-03-19 12:26:18 UTC
Created attachment 190814 [details]
discover 6.6.2 launched with LANG=ja_JP.UTF-8

In my environment, if I launch Discover with LANGUAGE unset and with LANG=zh_CN.UTF-8, the problem goes away; but not with LANG=ja_JP.
The output is identical. The UI situation is a bit different, though.

My system info:
Operating System: Fedora Linux 43
KDE Plasma Version: 6.6.2
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Kernel Version: 6.19.8-200.fc43.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 12 GiB of RAM (11.4 GiB usable)
Graphics Processor 1: Intel® UHD Graphics 620
Graphics Processor 2: NVIDIA GeForce GTX 1650 with Max-Q Design
Comment 6 Ye Jingchen 2026-03-19 17:45:32 UTC
Upgraded to discover 6.6.3-1, and this problem persists. However when I tried the same thing in a new account, everything works find there. So is something in my main user account is wrong, for example QML cache?
Comment 7 Ye Jingchen 2026-03-19 17:48:31 UTC
(In reply to Ye Jingchen from comment #6)
> Upgraded to discover 6.6.3-1, and this problem persists. However when I
> tried the same thing in a new account, everything works find there. So is
> something in my main user account is wrong, for example QML cache?

Does not seem like it. I ran `mv qmlcache qmlcache.disable` in ~/.cache/discover before starting Discover, the UI still breaks.
Comment 8 Bug Janitor Service 2026-04-03 03:47:24 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Jumpei Ogawa 2026-04-03 10:48:45 UTC
Since the additional info is added, I change the status from NEEDSINFO to REPORTED.
(If I misunderstand the situation, feel free to revert the status.)
Comment 10 Thomas Bertels 2026-04-19 11:59:33 UTC
I cannot reproduce with either of:
LANGUAGE=ar_AR plasma-discover
LANG=ar_AR plasma-discover
LANGUAGE=ar_AR.UTF-8 plasma-discover
LANG=ar_AR.UTF-8 plasma-discover

But I can reproduce with either of:
LANG=ja_JP.UTF-8 plasma-discover
LANG=zh_CN.UTF-8 plasma-discover

And any combination with LANGUAGE or without ".UTF-8"

When this bug is reproduceable, the menu is shown on the left instead of the right.
Comment 11 Nate Graham 2026-04-21 16:15:20 UTC
Very strange. For me on KDE Linux I can reproduce the issue 100% with:
- LANGUAGE=ar_AR plasma-discover
- LANGUAGE=ar_AR.UTF-8 plasma-discover

But not any of the other ones.

Still, clearly *something* is going terribly wrong here with support for non-Latin characters. Raising priority given how billions of people in the world use languages with these characters.
Comment 12 Nate Graham 2026-04-21 19:49:44 UTC
*** Bug 514542 has been marked as a duplicate of this bug. ***
Comment 13 TraceyC 2026-05-06 20:00:42 UTC
*** Bug 519835 has been marked as a duplicate of this bug. ***
Comment 14 TraceyC 2026-05-06 20:01:11 UTC
Searchable logs from the duplicate report

user@fedora:~$ LANG=ja_JP.UTF-8 plasma-discover
org.kde.plasma.libdiscover: OdrsReviewsBackend: Fetch ratings: false
adding empty sources model QStandardItemModel(0x55f37d34c840)
qrc:/qt/qml/org/kde/discover/qml/DiscoverWindow.qml:119:5: QML Shortcut: Shortcut: Only binding to one of multiple key bindings associated with 15. Use 'sequences: [ <key> ]' to bind to all of them.
qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: Connection already associated with an application ID")
file:///usr/lib64/qt6/qml/org/kde/kirigami/controls/private/GlobalDrawerActionItem.qml:36:18: QML RowLayout: possible QQuickItem::polish() loop
file:///usr/lib64/qt6/qml/org/kde/kirigami/controls/private/GlobalDrawerActionItem.qml:36:18: QML RowLayout: RowLayout called polish() inside updatePolish() of RowLayout
file:///usr/lib64/qt6/qml/org/kde/kirigami/controls/private/GlobalDrawerActionItem.qml:36:18: QML RowLayout: possible QQuickItem::polish() loop
file:///usr/lib64/qt6/qml/org/kde/kirigami/controls/private/GlobalDrawerActionItem.qml:36:18: QML RowLayout: RowLayout called polish() inside updatePolish() of RowLayout
file:///usr/lib64/qt6/qml/org/kde/kirigami/controls/private/GlobalDrawerActionItem.qml:36:18: QML RowLayout: possible QQuickItem::polish() loop
file:///usr/lib64/qt6/qml/org/kde/kirigami/controls/private/GlobalDrawerActionItem.qml:36:18: QML RowLayout: RowLayout called polish() inside updatePolish() of RowLayout
file:///usr/lib64/qt6/qml/org/kde/kirigami/controls/private/GlobalDrawerActionItem.qml:36:18: QML RowLayout: possible QQuickItem::polish() loop
file:///usr/lib64/qt6/qml/org/kde/kirigami/controls/private/GlobalDrawerActionItem.qml:36:18: QML RowLayout: RowLayout called polish() inside updatePolish() of RowLayout
file:///usr/lib64/qt6/qml/org/kde/kirigami/controls/private/GlobalDrawerActionItem.qml:36:18: QML RowLayout: possible QQuickItem::polish() loop
file:///usr/lib64/qt6/qml/org/kde/kirigami/controls/private/GlobalDrawerActionItem.qml:36:18: QML RowLayout: RowLayout called polish() inside updatePolish() of RowLayout
No QSGTexture provided from updateSampledImage(). This is wrong.
No QSGTexture provided from updateSampledImage(). This is wrong.
No QSGTexture provided from updateSampledImage(). This is wrong.
No QSGTexture provided from updateSampledImage(). This is wrong.
No QSGTexture provided from updateSampledImage(). This is wrong.
No QSGTexture provided from updateSampledImage(). This is wrong.
Comment 15 Akseli Lahtinen 2026-05-11 13:25:10 UTC
*** Bug 519978 has been marked as a duplicate of this bug. ***
Comment 16 Akseli Lahtinen 2026-05-12 11:06:38 UTC
Looks like this is caused by TextMetrics not being able to handle non-latin characters properly.

In GlobalDrawerActionItem, removing `Layout.preferredWidth: metrics.width` from the MnemonicLabel fixes the issue.
Comment 17 Bug Janitor Service 2026-05-12 11:34:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/2098
Comment 18 Akseli Lahtinen 2026-05-12 11:34:43 UTC
(In reply to Akseli Lahtinen from comment #16)
> Looks like this is caused by TextMetrics not being able to handle non-latin
> characters properly.
> 
> In GlobalDrawerActionItem, removing `Layout.preferredWidth: metrics.width`
> from the MnemonicLabel fixes the issue.

I was wrong, it was just the height missing.
Comment 19 Akseli Lahtinen 2026-05-12 13:52:46 UTC
Git commit 64b13ba1bcbb6ec0d86cd92799ec45661044d46c by Akseli Lahtinen.
Committed on 12/05/2026 at 11:26.
Pushed by akselmo into branch 'master'.

GlobalDrawer: Use implicitWidth, set preferredHeight in item

In GlobalDrawer, using width here causes
undefined behavior since the item is inside a layout.
Use implicitWidth instead.

In GlobalDrawerItem, the preferredHeight can
fluctuate based on text height, for example when
text field is empty.
To make sure it is always same, use metrics.height
as the preferredHeight.
This is noticeable in languages where the glyph
heights can differ from each other.

M  +1    -1    src/controls/GlobalDrawer.qml
M  +1    -0    src/controls/private/GlobalDrawerActionItem.qml

https://invent.kde.org/frameworks/kirigami/-/commit/64b13ba1bcbb6ec0d86cd92799ec45661044d46c