Language Change NPM Resource Changed PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar tkuschel
tkuschel
20 Jul 2025

Pull Request for Issue #45369 .

Summary of Changes

  1. In javascript, if the year size is entered greater than 9999, the current year is used.
  2. When entered a two-digit year number (already implemented): if the year is greater than 39, then 1900 is used for the decade, otherwise 2000. (November 2016 it was the year 29). Now use a constant TWODIGITYEAR.
  3. In the CalendarField, if the format() when using filterFormat fails, a meaningful error message is generated (Hardening).

Testing Instructions

Create/edit article, mistype date in any of the date fields (not using the date picker) on the Publishing tab.
Proper date: 2025-04-23 12:01:40
Mistyped date: 20225-04-23 12:01:40

Actual result BEFORE applying this Pull Request

Throws error:
Call to a member function format() on false

Expected result AFTER applying this Pull Request (and npm ci)

The current year is used.

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 tkuschel tkuschel - open - 20 Jul 2025
avatar tkuschel tkuschel - change - 20 Jul 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jul 2025
Category JavaScript Language & Strings Repository NPM Change Libraries
avatar tkuschel tkuschel - change - 20 Jul 2025
Labels Added: Language Change NPM Resource Changed PR-5.3-dev
avatar brianteeman
brianteeman - comment - 21 Jul 2025

Almost but not quite

Data Entry

image

After Save

image
avatar brianteeman
brianteeman - comment - 21 Jul 2025

For the farsi changes it needs to be tested by a native speaker but as far as I can tell it does not work as described in the PR. Instead of a fatal error you get an invalid date message - which is better than it is now but not as described

avatar tkuschel tkuschel - edited - 21 Jul 2025
avatar tkuschel tkuschel - change - 21 Jul 2025
The description was changed
avatar tkuschel
tkuschel - comment - 21 Jul 2025

@brianteeman : After checkout, did you make a
npm ci
in your test environment?
The invalid data message only appears if the javascript is not build into compressed form.

avatar brianteeman
brianteeman - comment - 21 Jul 2025

yes of course

avatar brianteeman
brianteeman - comment - 21 Jul 2025
chrome_3Zd10YWrT9.mp4
avatar tkuschel
tkuschel - comment - 21 Jul 2025

@brianteeman Can you tell me your test environment:

  1. Used Web browser,
  2. Server nginx, ...
  3. OS
  4. Which kind of message do you get / output?
    So I can look at it again.
avatar brianteeman
brianteeman - comment - 21 Jul 2025

did you test using arabic or were you pasting an english character date? From looking at your code you are assuming that the year is in the gregorian calendar. ie 1900 or 2000. ~The current year in the jalali calendar is 1404

avatar tkuschel
tkuschel - comment - 21 Jul 2025

I did not translate the date in the error message to jalaali. I know the year 1404. I'll look at the Farsi language, please be patient, as RTL is a little unfamiliar to me.

avatar brianteeman
brianteeman - comment - 21 Jul 2025

My gut feeling is that this PR is taking the wrong approach. I would just be outputting an error message stating that the input is incorrect and NOT trying to correct it.

avatar tkuschel
tkuschel - comment - 21 Jul 2025

Work in progress, do not test code. Should I close the PR and reopen when I am done?

avatar brianteeman
brianteeman - comment - 21 Jul 2025

You can close it or change it to a draft

avatar tkuschel tkuschel - change - 21 Jul 2025
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2025-07-21 12:40:38
Closed_By tkuschel
avatar tkuschel tkuschel - close - 21 Jul 2025

Add a Comment

Login with GitHub to post a comment