RTC NPM Resource Changed bug PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
14 Feb 2025

When the calendar is being displayed with an RTL language the data in the calendar is correctly ordered RTL. However the names od the days is incorrect as this remains LTR

This PR adds a conditional check for RTL and reverses the string of days so that it is displayed correctly

Note that JS is not my thing and it looks like there is code for this already at line 140 but it is not working? Maybe a js expert can see why.

Pull Request for Issue #44818 .

Testing Instructions

Install an RTL language which uses the gregorian calendar OR edit administrator\language\en-GB\langmetadata.xml and set rtl to 1

as this is a js change you will need to apply the pr and then npm run build:js or use a prebuilt package

Actual result BEFORE applying this Pull Request

image

Expected result AFTER applying this Pull Request

image

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar brianteeman brianteeman - open - 14 Feb 2025
avatar brianteeman brianteeman - change - 14 Feb 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2025
Category JavaScript Repository NPM Change
avatar brianteeman brianteeman - change - 14 Feb 2025
The description was changed
avatar brianteeman brianteeman - edited - 14 Feb 2025
avatar fgsw
fgsw - comment - 14 Feb 2025

Prebuilt packages are not available for download, also not the custom update server:

prebuilt-joomla-fail
avatar richard67
richard67 - comment - 14 Feb 2025

Prebuilt packages are not available for download, also not the custom update server:

Seems there is an issue with a full disk. Will notify some people.

avatar fgsw
fgsw - comment - 15 Feb 2025

Later created Pull Request have now available Prebuilt packages (this one still not).

avatar richard67
richard67 - comment - 15 Feb 2025

I‘ve restarted the drone build, so new packages should be available soon.

avatar richard67
richard67 - comment - 15 Feb 2025

Packages are available now.

avatar richard67
richard67 - comment - 15 Feb 2025

Normally I would say this PR is a bug fix so it has to go into 5.2-dev ... but as it comes too late for 5.2.4 it would go into 5.2.5, which will be released just 2 weeks before 5.3.0 stable, so I think it doesn't really matter.

avatar fgsw fgsw - test_item - 15 Feb 2025 - Tested successfully
avatar fgsw
fgsw - comment - 15 Feb 2025

I have tested this item ✅ successfully on 0c4cb29


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44900.

avatar richard67
richard67 - comment - 15 Feb 2025

Install an RTL language which uses the gregorian calendar

@brianteeman I've tested with Urdu, which uses Gregorian calendar, and to see that nothing is broken I've tested also with Persian (Farsi), which uses the Jalali calendar. In both cases the day order changes with your PR. As I don't speak or read Farsi or Urdu I have to investigate if your PR is right. But maybe your testing instruction only forgot to mention Jalali calendar?

avatar richard67
richard67 - comment - 15 Feb 2025

For Urdu (Pakistan) ur-PK, which uses the Gregorian calendar, the PR works as described, i.e. only the direction of weekday headings has changed:
2025-02-15_test-pr-44900_urdu

For Farsi (Persian, Iran) fa-IR, which uses the Jalali calendar, the PR not only changes the direction but also the week start:
2025-02-15_test-pr-44900_persian

As I don't understand Farsi, I can't say right now which one is right.

avatar richard67
richard67 - comment - 15 Feb 2025

Possibly the code added by this PR should not be added after but before line 654?
No, forget it.

avatar richard67
richard67 - comment - 15 Feb 2025

I've found https://www.parstimes.com/persian/calendar/ , but the day names or abbreviations in the calendar for today look completely different to me:
2025-02-15_test-pr-44900_persian-www

avatar richard67
richard67 - comment - 15 Feb 2025

I've emailed the Persian translation coordinator. I did not get an answer yet, but right now it looks as if this PR fixes the issue also for Persian, i.e. the PR is right. At least that's the feedback I got up to now from discussion in Mattermost.

If that is confirmed, this PR will get a successful test from me.

avatar brianteeman
brianteeman - comment - 17 Feb 2025

I would still like a js person to review this especially because of

Note that JS is not my thing and it looks like there is code for this already at line 140 but it is not working? Maybe a js expert can see why.

avatar brianteeman
brianteeman - comment - 25 Apr 2025

I've emailed the Persian translation coordinator. I did not get an answer yet, but right now it looks as if this PR fixes the issue also for Persian, i.e. the PR is right. At least that's the feedback I got up to now from discussion in Mattermost.

If that is confirmed, this PR will get a successful test from me.

am i wasting my time here

avatar richard67
richard67 - comment - 26 Apr 2025

I've emailed the Persian translation coordinator. I did not get an answer yet, but right now it looks as if this PR fixes the issue also for Persian, i.e. the PR is right. At least that's the feedback I got up to now from discussion in Mattermost.
If that is confirmed, this PR will get a successful test from me.

am i wasting my time here

@brianteeman No, just leave the PR open. I did not get a reply from them. I will try again and try to find other testers. Give me a bit time. I'm optimistic we can get this ready for 5.3.x, if not 5.3.1 then 5.3.2.

Update: I just see it has already 1 good test (which I've restored after branch update because still valid).

avatar richard67 richard67 - change - 26 Apr 2025
Labels Added: NPM Resource Changed bug PR-5.3-dev
avatar richard67 richard67 - alter_testresult - 26 Apr 2025 - fgsw: Tested successfully
avatar richard67
richard67 - comment - 26 Apr 2025

Ok, I have found out what the issue with the Persian calendar is:

The translators have worked around the issue in their joomla.ini file.

Currently that is:

; Days of the Week
SAT="ی"
SATURDAY="یکشنبه"
SUN="ش"
SUNDAY="شنبه"
MON="ج"
MONDAY="جمعه"
TUE="پ"
TUESDAY="پنجشنبه"
WED="چ"
WEDNESDAY="چهارشنبه"
THU="س"
THURSDAY="سه شنبه"
FRI="د"
FRIDAY="دوشنبه"

When throwing that into a translator or check at https://en.wikipedia.org/wiki/Names_of_the_days_of_the_week you will see that they have used for Sunday the translation of Saturday, for Monday the translation of Friday, for Tuesday the translation of Thursday, Wednesday ir right, for Thursday they have used the translation of Tuesday, for Friday the translation of Monday and for Saturday the one of Sunday.

That means they have worked around the reverse order and also the wrong start of the week and weekend days in their langmetadata.xml.

Or in short words: This PR here is right (as my test for Urdu ur-PK has shown), but it will need a fix in their translations when this PR gets merged and released because it breaks their ugly workaround.

@tecpromotion Do you have a contact to the Persian translators? I had tried the email address from the translation downloads but did not get any answer when I had asked for their advice before.

avatar richard67 richard67 - test_item - 26 Apr 2025 - Tested successfully
avatar richard67
richard67 - comment - 26 Apr 2025

I have tested this item ✅ successfully on 7319a4b

I've successfully tested with Urdu (ur-PK) and with German (de-DE), the latter patched to RTL in the langmetadata.xml.

The different week start day (Monday in de-DE, Sunday in the others) was also correctly handled.

The issues I've discovered for the Persian calendar are caused by a wrong workaround in their translation, see my previous comment.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44900.

avatar richard67 richard67 - change - 26 Apr 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 26 Apr 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44900.

avatar richard67
richard67 - comment - 26 Apr 2025

In the Persian (fa-IR) langmetadata.xml, the <weekEnd>0,6</weekEnd> should be changed to <weekEnd>5</weekEnd> because due to their current law only Friday is weekend. The <firstDay>6</firstDay> is correct, their working week starts on Saturday.

In the Persian (fa-IR) joomla.ini file, the week days should be changed
from

; Days of the Week
SAT="ی"
SATURDAY="یکشنبه"
SUN="ش"
SUNDAY="شنبه"
MON="ج"
MONDAY="جمعه"
TUE="پ"
TUESDAY="پنجشنبه"
WED="چ"
WEDNESDAY="چهارشنبه"
THU="س"
THURSDAY="سه شنبه"
FRI="د"
FRIDAY="دوشنبه"

to

; Days of the Week
SAT="ش"
SATURDAY="شنبه"
SUN="ی"
SUNDAY="یکشنبه"
MON="د"
MONDAY="دوشنبه"
TUE="س"
TUESDAY="سه شنبه"
WED="چ"
WEDNESDAY="چهارشنبه"
THU="پ"
THURSDAY="پنجشنبه"
FRI="ج"
FRIDAY="جمعه"
avatar rdeutz
rdeutz - comment - 14 May 2025

@dgrammatiko could you have a look here?

Note that JS is not my thing and it looks like there is code for this already at line 140 but it is not working? Maybe a js expert can see why.

avatar bembelimen bembelimen - change - 19 May 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-05-19 08:23:52
Closed_By bembelimen
Labels Added: RTC
avatar bembelimen bembelimen - close - 19 May 2025
avatar bembelimen bembelimen - merge - 19 May 2025
avatar bembelimen
bembelimen - comment - 19 May 2025

Thx

avatar brianteeman
brianteeman - comment - 19 May 2025

thanks

avatar trisha918
trisha918 - comment - 1 Jun 2025

Hi there,

I'm part of the JoomlaFarsi Persian team.
We have solved the issue with the weekday names in the calendar, and we also fixed the problem related to leap years.

We are testing that, and it will be published in the next update.

avatar richard67
richard67 - comment - 1 Jun 2025

@trisha918 That‘s good news. You can find information on what needs to be changed in my previous comment: #44900 (comment) .

avatar trisha918
trisha918 - comment - 1 Jun 2025

@trisha918 That‘s good news. You can find information on what needs to be changed in my previous comment: #44900 (comment) .

Yes , we know about that and we fixed that,

Add a Comment

Login with GitHub to post a comment