Bug 485373 - With alternate calendar Force date summary in Arabic to use Western Arabic Numerals
Summary: With alternate calendar Force date summary in Arabic to use Western Arabic Nu...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Calendar (show other bugs)
Version: 6.0.3
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Zayed Al-Saidi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-11 12:57 UTC by medin
Modified: 2024-04-21 18:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.5


Attachments
image1.png (35.67 KB, image/png)
2024-04-11 12:57 UTC, medin
Details
image2.png (39.96 KB, image/png)
2024-04-11 12:58 UTC, medin
Details
Status as of 20-April-24 (183.70 KB, image/png)
2024-04-20 18:30 UTC, Zayed Al-Saidi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2024-04-11 12:57:48 UTC
Created attachment 168389 [details]
image1.png

The current date summary in Arabic for Islamic Calendars uses only Eastern Arabic Numerals, see attached image1.png.

This system is mainly adopted in the East of the Arab world and some African countries like Egypt, Sudan, plus slight variations in Afghanistan Pakistan and Iran…

But in the Maghreb region (North Africa: Morocco, Algeria, Tunisia and Mauritania), the Western Arabic Numerals are the only form used to represent numbers.

Even some Gulf countries, and Egypt, Sudan and Pakistan started to increase the usage of the Western Arabic Numerals.

Example: Morocco’s Ministry of Endowments and Islamic Affairs, see image2.png.
Comment 1 medin 2024-04-11 12:58:16 UTC
Created attachment 168390 [details]
image2.png
Comment 2 Nate Graham 2024-04-11 17:45:01 UTC
Ultimately this is probably a bug in the locales themselves. The locales have the ability to determine what kinds of numerals they display. Beyond that unfortunately we can't easily override it or offer users the ability to do so. See Bug 340982.

*** This bug has been marked as a duplicate of bug 340982 ***
Comment 3 medin 2024-04-11 17:58:35 UTC
(In reply to Nate Graham from comment #2)
> Ultimately this is probably a bug in the locales themselves. The locales
> have the ability to determine what kinds of numerals they display. Beyond
> that unfortunately we can't easily override it or offer users the ability to
> do so. See Bug 340982.
> 
> *** This bug has been marked as a duplicate of bug 340982 ***


It's not the same problem.

I set my main Plasma language to en_ US UTF8, and I have 3 keyboard layouts: French, Arabic and Tifinagh, and when I select Arabic layout and type numbers I get the correct numerals. So why only digital clock shows those wrong ones inside alternate calendars?
Comment 4 medin 2024-04-11 23:08:36 UTC
It seems "numbers=arab" is used in "icu::Locale" for all 4 types of Islamic calendars, and that number format forces the Eastern Arabic Numerals.
https://invent.kde.org/plasma/kdeplasma-addons/-/blob/master/plasmacalendarplugins/alternatecalendar/provider/islamiccalendar.cpp?ref_type=heads
Comment 5 Nate Graham 2024-04-12 17:17:44 UTC
Ok, re-opening. Thanks for your patience.
Comment 6 Bug Janitor Service 2024-04-18 13:24:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/578
Comment 7 Bug Janitor Service 2024-04-18 14:17:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4242
Comment 8 Fushan Wen 2024-04-18 14:46:43 UTC
Git commit 5247518d09656fdce3f51278eb5f5ba09a8e7e80 by Fushan Wen.
Committed on 18/04/2024 at 14:31.
Pushed by fusionfuture into branch 'master'.

components/calendar: respect numbering system from local language

There are other numbering systems like "arab". Use
QLocale::toString(int) instead of QString::number(int) to respect the
local numbering system.

M  +3    -0    components/calendar/daysmodel.cpp
M  +1    -0    components/calendar/daysmodel.h
M  +1    -1    components/calendar/qml/DayDelegate.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/5247518d09656fdce3f51278eb5f5ba09a8e7e80
Comment 9 Bug Janitor Service 2024-04-18 14:51:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4243
Comment 10 Fushan Wen 2024-04-18 15:05:21 UTC
Git commit 2304a726c3a80e0819ee3f908200a930bd9834a6 by Fushan Wen.
Committed on 18/04/2024 at 14:50.
Pushed by fusionfuture into branch 'Plasma/6.0'.

components/calendar: respect numbering system from local language

There are other numbering systems like "arab". Use
QLocale::toString(int) instead of QString::number(int) to respect the
local numbering system.
(cherry picked from commit 5247518d09656fdce3f51278eb5f5ba09a8e7e80)

M  +3    -0    components/calendar/daysmodel.cpp
M  +1    -0    components/calendar/daysmodel.h
M  +1    -1    components/calendar/qml/DayDelegate.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/2304a726c3a80e0819ee3f908200a930bd9834a6
Comment 11 Fushan Wen 2024-04-19 00:19:26 UTC
Git commit 2882bb4650ca0ecc8537483bd6dccbd788a51e21 by Fushan Wen.
Committed on 18/04/2024 at 13:39.
Pushed by fusionfuture into branch 'master'.

alternatecalendar: respect numbering system from libicu
FIXED-IN: 6.0.5

M  +29   -17   plasmacalendarplugins/alternatecalendar/provider/islamiccalendar.cpp

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/2882bb4650ca0ecc8537483bd6dccbd788a51e21
Comment 12 Fushan Wen 2024-04-19 00:22:15 UTC
Git commit 3c3fca92bdba4a861daec32f6e75a43ec21cc65b by Fushan Wen.
Committed on 19/04/2024 at 00:19.
Pushed by fusionfuture into branch 'Plasma/6.0'.

alternatecalendar: respect numbering system from libicu
FIXED-IN: 6.0.5


(cherry picked from commit 2882bb4650ca0ecc8537483bd6dccbd788a51e21)

M  +29   -17   plasmacalendarplugins/alternatecalendar/provider/islamiccalendar.cpp

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/3c3fca92bdba4a861daec32f6e75a43ec21cc65b
Comment 13 Zayed Al-Saidi 2024-04-20 18:30:54 UTC
Created attachment 168720 [details]
Status as of 20-April-24

After I upgraded my testing environment to git20200420 on neon unstable, I noticed three issues (see the call-outs):
1- the time is not respecting my locale (it is displayed in Western Arabic numerals). Though, the date is displayed correctly.
2- The alternate calendar date is shown twice: one in the correct locale and the second in Western Arabic numerals, which is in the brackets. 
3-  The alternate date still does not follow the correct locale. In my locale is eastern Arabic numerals, while it is displayed in western Arabic numerals. Though, the date is displayed correctly. 

My locale is ar_OM.UTF-8
Comment 14 Zayed Al-Saidi 2024-04-20 18:32:43 UTC
(In reply to Zayed Al-Saidi from comment #13)
> Created attachment 168720 [details]
> Status as of 20-April-24
> 
> After I upgraded my testing environment to git20200420 on neon unstable, I
> noticed three issues (see the call-outs):
> 1- the time is not respecting my locale (it is displayed in Western Arabic
> numerals). Though, the date is displayed correctly.
> 2- The alternate calendar date is shown twice: one in the correct locale and
> the second in Western Arabic numerals, which is in the brackets. 
> 3-  The alternate date still does not follow the correct locale. In my
> locale is eastern Arabic numerals, while it is displayed in western Arabic
> numerals. Though, the date is displayed correctly. 
> 
> My locale is ar_OM.UTF-8

the second issue the the oppsite, the correct date is inside the brackets.
Comment 15 Nate Graham 2024-04-21 04:43:45 UTC
Those seem like different issues; please open new bug reports for them. Thanks.
Comment 16 Fushan Wen 2024-04-21 05:09:27 UTC
Cannot reproduce myself. git20200420 might still not have the patch in kdeplasma-addons
Comment 17 Fushan Wen 2024-04-21 08:41:32 UTC
The clock text not being localized is a different bug indeed.
Comment 18 Zayed Al-Saidi 2024-04-21 18:19:49 UTC
(In reply to Fushan Wen from comment #17)
> The clock text not being localized is a different bug indeed.

Yes, I found my system is messed up, and I re-install it again. I confirm everything is working correctly except his. 
I report a new bug for it. 
https://bugs.kde.org/show_bug.cgi?id=485915