Uploaded image for project: 'Magnolia Standard Templating Kit (closed)'
  1. Magnolia Standard Templating Kit (closed)
  2. MGNLSTK-1325

Can't display calendar when locale is ja

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 2.7.2
    • 2.7
    • templates

      – Repro Steps. –
      1. set the magnolia locale to ja (Japanese)
      2. display calendar.
      i.e.) display demo-project/news-and-events/events-overview.html

      – Problem –
      Calendar is not displayed correctry.

      The following Exception occured.

      ERROR ndering.engine.ModeDependentRenderExceptionHandler: Error while rendering [/demo-project/news-and-events/events-overview/extras/extras1/extrasItem0] with template [standard-templating-kit:components/extras/stkExtrasCalendar]: RenderException: java.lang.StringIndexOutOfBoundsException: String index out of range: 2
      info.magnolia.rendering.engine.RenderException: java.lang.StringIndexOutOfBoundsException: String index out of range: 2

      – Workaround –
      1. edited /templating-kit/components/features/calendar
      2. change

      <th ${cmsfn.createHtmlAttribute('class', cssClass)}><abbr title="${date?string('EEEE')}">${date?string('EE')?substring(0,2)}</abbr></th>

      to

      <th ${cmsfn.createHtmlAttribute('class', cssClass)}><abbr title="${date?string('EEEE')}">${date?string('EE')}</abbr></th>

      *omit substring method

      – Reason –
      When locale is ja, 'EE' format of Date outputs only one character. i.e. '月'

        Acceptance criteria

              czimmermann Christopher Zimmermann
              mosao Masao Suda
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: