Sakai
  1. Sakai
  2. SAK-3825

chef_dateselectionwidget makes assumptions about date format (I18N)

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.2, 2.3.x, 2.4.0, 2.4.1, 2.5.0, 2.5.2, 2.5.3
    • Fix Version/s: 2.5.5, 2.6.0
    • Labels:
      None
    • Environment:
      Linux, mysql

      Description

      chef_dateselectionwidget defined in VM_chef_library.vm makes assumptions about date formats in presenting date entry selectors as "month day year". In many regions, "day month year" is the format used. Affected tools are: announcement, assignment, calendar & content

        Issue Links

          Activity

          Hide
          John Leasia added a comment -
          Gonzalo - is this something you could work on with Joanne?
          Show
          John Leasia added a comment - Gonzalo - is this something you could work on with Joanne?
          Hide
          Gonzalo Silverio added a comment -
          Joanne,

          To go with recent work you have done in Schedule...
          Show
          Gonzalo Silverio added a comment - Joanne, To go with recent work you have done in Schedule...
          Hide
          Yuanyuan Joanne Sui added a comment -
          This issue is like SAK-3824, related to the hardcoded date format in Sakai. The date format is not only in the Schedule tool, but in many places else, because the TimeService has contained the hardcoded date format, and multiple tools have used that.
          John's comments on this are: "Doing all the date things as you say should be done after a design review/plan to make sure we are making the right changes. We can get to that maybe after schedule group work, maybe for 2.2 but I don't think (for us anyway) that it's critical. It might get to be so for some Sakai partners and then maybe they will take it on."
          So I'd like to hold this for a while, until we are ready for this.
          Show
          Yuanyuan Joanne Sui added a comment - This issue is like SAK-3824 , related to the hardcoded date format in Sakai. The date format is not only in the Schedule tool, but in many places else, because the TimeService has contained the hardcoded date format, and multiple tools have used that. John's comments on this are: "Doing all the date things as you say should be done after a design review/plan to make sure we are making the right changes. We can get to that maybe after schedule group work, maybe for 2.2 but I don't think (for us anyway) that it's critical. It might get to be so for some Sakai partners and then maybe they will take it on." So I'd like to hold this for a while, until we are ready for this.
          Hide
          Beth Kirschner added a comment -
          There is currently an effort to design a new I18N aware date/time widget (see http://bugs.sakaiproject.org/confluence/pages/viewpage.action?pageId=20034)
          Show
          Beth Kirschner added a comment - There is currently an effort to design a new I18N aware date/time widget (see http://bugs.sakaiproject.org/confluence/pages/viewpage.action?pageId=20034)
          Hide
          Beth Kirschner added a comment -
          Show
          Beth Kirschner added a comment - Here's a couple links that actually work (sorry): http://issues.sakaiproject.org/confluence/x/Fk0 http://issues.sakaiproject.org/confluence/x/Qk4
          Hide
          Stephen Marquard added a comment -
          Hi Beth,

          In the absence of a new widget for velocity tools, is there any easy way to get the mmm / dd order of the current velocity template reversed based on locale info ?

          We have this patch

          http://source.cet.uct.ac.za/svn/sakai/patches/branches/vula_2-5-x/patch-22-datewidget.diff

          which we have been maintaining since Sakai 2.1 and are keen to drop it.
          Show
          Stephen Marquard added a comment - Hi Beth, In the absence of a new widget for velocity tools, is there any easy way to get the mmm / dd order of the current velocity template reversed based on locale info ? We have this patch http://source.cet.uct.ac.za/svn/sakai/patches/branches/vula_2-5-x/patch-22-datewidget.diff which we have been maintaining since Sakai 2.1 and are keen to drop it.
          Hide
          Beth Kirschner added a comment -
          I've created a new (optional) parameter for the dateselectionwidget velocity macro to specify the date format. I've also created a new VelocityPortletPaneledAction.getDateFormatString() method which dynamically determines the date format based on the user's preferred language/locale.

          It looks like the velocity tools which use this date picker are: announcement, assignment, calendar, & content

          If I've missed any they will default to the US locale (e.g. no change in behavior). I'll close this issue when the above tools have been updated to use the new parameter and method.

          QA instructions:
          1. Change Language/Locale (Preferences -> Locale) to any non-US locale (e.g. "English (United Kingdom)" ) and verify the date picker modifies the month/date/year order appropriately (e.g. in the UK, the order is day/month/year).
          Show
          Beth Kirschner added a comment - I've created a new (optional) parameter for the dateselectionwidget velocity macro to specify the date format. I've also created a new VelocityPortletPaneledAction.getDateFormatString() method which dynamically determines the date format based on the user's preferred language/locale. It looks like the velocity tools which use this date picker are: announcement, assignment, calendar, & content If I've missed any they will default to the US locale (e.g. no change in behavior). I'll close this issue when the above tools have been updated to use the new parameter and method. QA instructions: 1. Change Language/Locale (Preferences -> Locale) to any non-US locale (e.g. "English (United Kingdom)" ) and verify the date picker modifies the month/date/year order appropriately (e.g. in the UK, the order is day/month/year).
          Hide
          Peter A. Knoop added a comment -
          Beth, i'm presuming this work is intended for 2.6, so I've set that as the Fix Version.
          Show
          Peter A. Knoop added a comment - Beth, i'm presuming this work is intended for 2.6, so I've set that as the Fix Version.
          Hide
          Beth Kirschner added a comment -
          The velocity date pickers are now localized (!) -- see above for QA instructions and details.
          Show
          Beth Kirschner added a comment - The velocity date pickers are now localized (!) -- see above for QA instructions and details.
          Hide
          Jean-François Lévêque added a comment -
          Works fine with sakai/trunk on Oracle. Checked adding entries within Schedule, Announcements, Resources and Assignments.
          Show
          Jean-François Lévêque added a comment - Works fine with sakai/trunk on Oracle. Checked adding entries within Schedule, Announcements, Resources and Assignments.
          Hide
          Jean-François Lévêque added a comment -
          There's a 2.5.x merging conflict with the first revision changes:
          svn merge --dry-run -c52912 https://source.sakaiproject.org/svn/velocity/trunk velocity/
          U velocity/tool/src/java/org/sakaiproject/cheftool/VelocityPortletPaneledAction.java
          C velocity/tool/src/templates/VM_chef_library.vm

          Could a 2.5.x patch be provided?
          Show
          Jean-François Lévêque added a comment - There's a 2.5.x merging conflict with the first revision changes: svn merge --dry-run -c52912 https://source.sakaiproject.org/svn/velocity/trunk velocity/ U velocity/tool/src/java/org/sakaiproject/cheftool/VelocityPortletPaneledAction.java C velocity/tool/src/templates/VM_chef_library.vm Could a 2.5.x patch be provided?
          Hide
          Beth Kirschner added a comment -
          There were 2.5.x merge conflicts in assignment and velocity -- everything else merged cleanly. I hand merged assignment and velocity changes, but do not currently have a server to test them on. Attached is a _complete_ set of diffs for SAK-3825 for Sakai 2.5.x.
          Show
          Beth Kirschner added a comment - There were 2.5.x merge conflicts in assignment and velocity -- everything else merged cleanly. I hand merged assignment and velocity changes, but do not currently have a server to test them on. Attached is a _complete_ set of diffs for SAK-3825 for Sakai 2.5.x.
          Hide
          Beth Kirschner added a comment -
          Oops -- the BasicEmailService patch definitely did not belong with this. I've uploaded a revised patch file that has this removed. I've also removed some file deletions from the content directory, just to play it safe (these obsolete files were removed in the trunk for clean-up but aren't required to be deleted).
          Show
          Beth Kirschner added a comment - Oops -- the BasicEmailService patch definitely did not belong with this. I've uploaded a revised patch file that has this removed. I've also removed some file deletions from the content directory, just to play it safe (these obsolete files were removed in the trunk for clean-up but aren't required to be deleted).
          Hide
          Jean-François Lévêque added a comment -
          2.5.x merge r58363
          Show
          Jean-François Lévêque added a comment - 2.5.x merge r58363
          Hide
          Nancy Wilkison added a comment -
          QA ENVIRONMENT -
          vista, firefox, ie7
          on 2.5.5-beta01 qa5 michigan server
          http://qa5-us.sakaiproject.org/portal
          Sakai QA Network qa5-us (svn tags/sakai-2.5.5-beta01) using Oracle - Built: 04/23/09 10:10 - Sakai sakai-2.5.5-beta01 - Server tartar

          QA SUMMARY -
          verify correct day, month, year format based on language.
          1 - qa5-us server as nancy (IOR), preferences language=English US
          announcement - shows month-day-year
          assignment - all show as month-day-year
          schedule - added assignment to schedule. details show due date month-day-year
          resources - added file. date added is month-day-year
          2 - same server as alice (student), preferences language=English UK
          checked tools announcement, assignment, calendar(schedule) & content (resources)
          announcement - below shows day-month-year
          assignment - all show as day-month-year
          schedule - details show due date day-month-year
          resources - day-month-year

          QA RESULTS -
          pass verified.
          Show
          Nancy Wilkison added a comment - QA ENVIRONMENT - vista, firefox, ie7 on 2.5.5-beta01 qa5 michigan server http://qa5-us.sakaiproject.org/portal Sakai QA Network qa5-us (svn tags/sakai-2.5.5-beta01) using Oracle - Built: 04/23/09 10:10 - Sakai sakai-2.5.5-beta01 - Server tartar QA SUMMARY - verify correct day, month, year format based on language. 1 - qa5-us server as nancy (IOR), preferences language=English US announcement - shows month-day-year assignment - all show as month-day-year schedule - added assignment to schedule. details show due date month-day-year resources - added file. date added is month-day-year 2 - same server as alice (student), preferences language=English UK checked tools announcement, assignment, calendar(schedule) & content (resources) announcement - below shows day-month-year assignment - all show as day-month-year schedule - details show due date day-month-year resources - day-month-year QA RESULTS - pass verified.
          Show
          Anthony Whyte added a comment - Included in 2.5.5-beta01. See https://source.sakaiproject.org/svn/sakai/branches/sakai-2.5.5/.externals_2-5-xto2-5-5 .

            People

            • Assignee:
              Beth Kirschner
              Reporter:
              Stephen Marquard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: