Uploaded image for project: 'Apache Roller'
  1. Apache Roller
  2. ROL-2073

Move hard-coded date / timestamp formatting to ApplicationResources

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.1.2
    • Fix Version/s: 5.2.0
    • Component/s: Themes and Macros
    • Labels:
      None

      Description

      There're some hard-coded date / timestamp formatting as follows:

      In _day.vm or day.vm of templates:

      $utils.formatDate($day, "EEEE MMM dd, yyyy")
      $utils.formatDate($entry.pubTime, "hh:mma MMM dd, yyyy")
      

      In CalendarTag#doStartTag():

      // formatter Month-Year title of calendar
      SimpleDateFormat formatTitle = new SimpleDateFormat("MMMM yyyy", mLocale);
      

      In Japanese locale, it produces following expressions:

      1. 水曜日 4 22, 2015
      2. Posted at 02:15午後 4 22, 2015 by kyle in Technology | 投稿されたコメント [0]
      3. 4月 2015

      They looks pretty weird to Japanese people. I think Japanese people prefer following expressions instead:

      1. 2015年4月22日 (水)
      2. Posted at 2015年4月22日 午後 02:15 (this may better to move the fragment entirely, not only the date, but it might be too much for default templates)
      3. 2015年4月

      And I think these strange expressions may effect badly to first impression of Japanese people who just installed Roller so give it a try. so I'd like to move these expressions to ApplicationResources so that allow templates to show locale specific expressions. any thoughts?

        Attachments

        1. ROL-2073-update1.patch
          11 kB
          Kohei Nozaki
        2. ROL-2073.patch
          3 kB
          Kohei Nozaki

          Activity

            People

            • Assignee:
              roller_unassigned Roller Unassigned
              Reporter:
              xkylex Kohei Nozaki
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: