Bug 477594 - Date string of Digital Clock hover window and multi-timezone in main window doesn't follow locale setting like date in panel
Summary: Date string of Digital Clock hover window and multi-timezone in main window d...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock (show other bugs)
Version: 5.27.80
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 475599 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-11-27 06:23 UTC by Celeste Liu
Modified: 2024-02-22 01:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments
Hover window (67.59 KB, image/png)
2023-11-27 06:23 UTC, Celeste Liu
Details
main window (245.71 KB, image/png)
2023-11-27 06:24 UTC, Celeste Liu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Celeste Liu 2023-11-27 06:23:43 UTC
Created attachment 163523 [details]
Hover window

STEPS TO REPRODUCE
1. Enable Digital Clock in plasmashell
2. Set the date format to the long date and use a locale with its own date format, such as zh_CN
3. set multi-timezone in digital clock settings
4. See the date string in the panel, hover window, and main window

OBSERVED RESULT

The date string in the panel and left-top corner of the main window follows the locale setting, use Chinese. But the date string in the hover window and multi-timezone of the main window use English date format.

EXPECTED RESULT

All of them should follow the locale setting, and use Chinese.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Kernel Version: 6.6.2-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800H with Radeon Graphics
Memory: 27.3 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: 82JW
System Version: Lenovo Legion R70002021

ADDITIONAL INFORMATION
Comment 1 Celeste Liu 2023-11-27 06:24:10 UTC
Created attachment 163524 [details]
main window
Comment 2 Celeste Liu 2023-11-27 06:27:42 UTC
Addition Information: I patched plasma-workspace with https://invent.kde.org/plasma/plasma-workspace/-/commit/5a32ea2b636c3ef2b4215fafcb78bc17dd93190c manually to make long date format work.
Comment 4 Celeste Liu 2023-11-27 06:38:51 UTC
Ok, it can fix this problem, I will submit a MR.
Comment 5 Bug Janitor Service 2023-11-27 06:53:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3606
Comment 6 Fushan Wen 2024-02-14 02:26:31 UTC
Git commit b2116d1f0a28f522c12d11df3077e095afc9cb11 by Fushan Wen, on behalf of Celeste Liu.
Committed on 14/02/2024 at 02:26.
Pushed by fusionfuture into branch 'master'.

applets/digitalclock: make tooltip and multi-timezone follow locale date format

https://invent.kde.org/plasma/plasma-workspace/-/commit/5a32ea2b636c3ef2b4215fafcb78bc17dd93190c move Qt.formatDate usage to Qt6 new way, but left code in Tooltip
and timezone. This commit pass Qt.locale to Qt.formatDate in tooltip and
multi-timezone, make sure them follow locale date format.
FIXED-IN: 6.0

Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com>

M  +4    -4    applets/digital-clock/package/contents/ui/Tooltip.qml
M  +1    -1    applets/digital-clock/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/b2116d1f0a28f522c12d11df3077e095afc9cb11
Comment 7 Fushan Wen 2024-02-14 02:30:59 UTC
Git commit 445521687302fb6f52f8b8aee0dd5383c5f28f81 by Fushan Wen, on behalf of Celeste Liu.
Committed on 14/02/2024 at 02:29.
Pushed by fusionfuture into branch 'Plasma/6.0'.

applets/digitalclock: make tooltip and multi-timezone follow locale date format

https://invent.kde.org/plasma/plasma-workspace/-/commit/5a32ea2b636c3ef2b4215fafcb78bc17dd93190c move Qt.formatDate usage to Qt6 new way, but left code in Tooltip
and timezone. This commit pass Qt.locale to Qt.formatDate in tooltip and
multi-timezone, make sure them follow locale date format.
FIXED-IN: 6.0

Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com>
(cherry picked from commit b2116d1f0a28f522c12d11df3077e095afc9cb11)

M  +4    -4    applets/digital-clock/package/contents/ui/Tooltip.qml
M  +1    -1    applets/digital-clock/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/445521687302fb6f52f8b8aee0dd5383c5f28f81
Comment 8 Fushan Wen 2024-02-22 01:15:43 UTC
*** Bug 475599 has been marked as a duplicate of this bug. ***