← Back to team overview

mahara-contributors team mailing list archive

[Bug 1455137] A change has been merged

 

Reviewed:  https://reviews.mahara.org/5613
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/e797169819c031a373e39935bb214ab39039fa0a
Submitter: Aaron Wells (aaronw@xxxxxxxxxxxxxxx)
Branch:    15.10_STABLE

commit e797169819c031a373e39935bb214ab39039fa0a
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date:   Mon Aug 24 18:24:27 2015 +1200

Straightening out the language string situation in the JS calendar (bug
1455137)

The main thing this fixes, is that it causes the JS calendar to use ONLY the
new lang strings pieform_calendar_dateformat & pieform_calendar_timeformat,
for its formatting. These strings are in strftime() format, and are converted
into the JQuery Datepicker/Timepicker format by PHP (if we change to a different
calendar plugin in the future, we can change the PHP conversion function).

This fixes the bug where translators could break the calendar by changing the
JS format strings so they no longer matched the PHP format strings.

As a side effect of this change, I've also made it so that the help strings
are derived from the format string, and are translatable.

behatnotneeded: Date field is already tested by resume_page.feature

Change-Id: I152962cc27f36f93b51ee0327ed942fb089f7f5b
(cherry picked from commit 287b679440f7e2309c17869e04de3940e5affa7d)

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1455137

Title:
  "Edit access" screen has trouble with jscalendar dates if you change
  calendar_dateFormat and/or strtimedatetimeshort

Status in Mahara:
  Fix Committed
Status in Mahara 1.10 series:
  Won't Fix
Status in Mahara 15.04 series:
  Won't Fix
Status in Mahara 15.10 series:
  Fix Committed

Bug description:
  This is a follow up on Bug #1376997 Date picker not working for certain languages
  The date picker works with the dd.mm.yy format when editing access ("shared by me" page).

  However if you are to change in langconfig.php the parameters to a french format:
  $string['calendar_dateFormat']= 'dd/mm/yy';
  $string['strftimedatetimeshort'] = '%%d/%%m/%%Y %%H:%%M';

  You can use the date picker and define a new access. However, you
  cannot edit a preexisting access besause it doesnt show up when you go
  to edit it. You are forced to redefine all your access if you want to
  modify anything.

  Theres also a problem when you try to define "Access start date/time"
  and "Access end date/time" in the Advanced option. It will take the
  dd/mm/yy format of the datepicker. However, you cannot choose a day
  higher then 12. You can on the other hand enter a mm/dd/yy format into
  the textbox manually to define the access.

  If the code itself is too complicated to fix, there should at least be
  a converter to show the chosen date format to the users.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1455137/+subscriptions


References