joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.75k stars 3.64k forks source link

Problem with new jalali calendar in joomla 3.7 beta #14411

Closed ghasemy50 closed 7 years ago

ghasemy50 commented 7 years ago

Steps to reproduce the issue

you can check all sections that have calendar in persian language. install Persian language and test a section that have calendar, like modules

Expected result

show jalali calendar correctly

Actual result

show jalali calendar not correctly

Additional comments

before release stable version of joomla 3.7 please resolve this problem. thank you

Bakual commented 7 years ago

@dgt41 Can you have a look? It looks indeed broken a lot.

dgrammatiko commented 7 years ago

the css part you mean or the functional?

Bakual commented 7 years ago

I think there is at least some functional stuff broken:

persian

dgrammatiko commented 7 years ago

Do they have in their language file the translate options?

@Bakual I mean

DATE_FORMAT_CALENDAR_DATE="%Y-%m-%d"
DATE_FORMAT_CALENDAR_DATETIME="%Y-%m-%d %H:%M:%S"
DATE_FORMAT_FILTER_DATE="Y-m-d"
DATE_FORMAT_FILTER_DATETIME="Y-m-d H:i:s"

Can you send me their 3.7.0 language file?

Bakual commented 7 years ago

I tested with the one available from the backend. I have no clue what they have in their 3.7.0. Maybe @infograf768 knows more.

But even if that is missing in their pack, shoudn't it then fall back to the english format? That's how our language strings usually work.

dgrammatiko commented 7 years ago

Ok found it: their missing the <calendar>jalali</calendar> in their xml file. After that everyhting works as usual. Can you ask them to release a new version of their language with the update values for the xml?

screen shot 2017-03-07 at 23 37 39

dgrammatiko commented 7 years ago

@zero-24 there is nothing wrong with the calendar, the error comes from their old localisation files, so no release-blocker here. Maybe force them to release an update with only the missing part of the xml to make sure that people won't get into this screen ever!

zero-24 commented 7 years ago

I have just removed the label and the milestone ;)

image

So we can close here if we hear back from Thomas / the TT ;)

dgrammatiko commented 7 years ago

It's getting late... I really like the idea that they would release a minor update to their language pack with only the missing part of the xml, but up to them and Thomas

Bakual commented 7 years ago

They will release it when 3.7.0 is released. That is standard procedure. Doesn't make much sense to release it now since nothing is broken on a released version yet. 😄

@ghasemy50 Can we close this issue as it is something that has to be done on language pack side?

ghasemy50 commented 7 years ago

thanks


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

ghasemy50 commented 7 years ago

i'm tested it ,but after save , date has been deleted from date field.

in previous versions of joomla , date field value was converted to gregorian , then it was saving.

i think now it is saving jalali date and have problem.


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

dgrammatiko commented 7 years ago

@ghasemy50 the new calendar is also doing the same, converts the date to gregorian just before the form submit. what was your component that failed?

ghasemy50 commented 7 years ago

jalali calendar problem all readonly fields are correctly work. but all date fields that have calendar box on save, not convert to gregorian date and after save are show field blank. thanks.

infograf768 commented 7 years ago

I really like the idea that they would release a minor update to their language pack with only the missing part of the xml, but up to them and Thomas

mig already asked them. will make sure a new pack is released to cover the issue in the mean while

dgrammatiko commented 7 years ago

@ghasemy50 I'm guessing that it fails due to missing strings in your language:

DATE_FORMAT_CALENDAR_DATE="%Y-%m-%d"
DATE_FORMAT_CALENDAR_DATETIME="%Y-%m-%d %H:%M:%S"
DATE_FORMAT_FILTER_DATE="Y-m-d"
DATE_FORMAT_FILTER_DATETIME="Y-m-d H:i:s"

PS. These are from en-GB, and should reflect the local settings for Persia.

infograf768 commented 7 years ago

@dgt41 i don't think so. will test later

ghasemy50 commented 7 years ago

i added it in fa-ir.ini file but not solved. this code not need to convert to jalali date. thanks


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

dgrammatiko commented 7 years ago

@ghasemy50 can you test this: https://gist.github.com/dgt41/c970c43037303da465996acc94f2c5c4

ghasemy50 commented 7 years ago

thanks , Where do I put it?


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

dgrammatiko commented 7 years ago

Just replace media/system/js/fields/calendar.min.js and try it

ghasemy50 commented 7 years ago

thank you very much, it's ok.


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

infograf768 commented 7 years ago

@Fedik @dgt41 I confirm the issue. After save whatever was entered in "Finish Publishing" and "Created date" displays the field empty.

infograf768 commented 7 years ago

Release Blocker!

dgrammatiko commented 7 years ago

@infograf768 can you try https://github.com/joomla/joomla-cms/issues/14411#issuecomment-285046173

infograf768 commented 7 years ago

On it

infograf768 commented 7 years ago

It solves the issue here. 👍 I am now uploading an improved Persian pack with the right xml

dgrammatiko commented 7 years ago

Excellent, I'll try to fix also https://github.com/joomla/joomla-cms/issues/14341 and then do a PR for both.

ghasemy50 commented 7 years ago

hi again just a tip: 'fa-ir.js' file in \media\system\js\fields\calendar-locales have a bad translate. exit parameter is translated to 'ستن' , good translate is 'بستن'. please correct it in joomla 3.7 stable , thank you

joomla-cms-bot commented 7 years ago

Set to "closed" on behalf of @infograf768 by The JTracker Application at issues.joomla.org/joomla-cms/14411