Uploaded image for project: 'PUBLIC - Liferay Alloy UI'
  1. PUBLIC - Liferay Alloy UI
  2. AUI-1892

As a developer, I should be able to pass strings to the header view from day/week view through the main configuration

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: master
    • Fix Version/s: None
    • Component/s: Scheduler
    • Labels:
      None

      Description

      Unlike what is said at AUI-1743, the strings to be displayed in the "Show x more" links are configurable for day and week views - one only needs to pass it through the headerViewConfig argument. To display these fields e.g. in Spanish at a day view, one should call it:

      var dayView = new Y.SchedulerDayView({
          headerViewConfig: {
              strings: {
                  allDay: 'Todo el día',
                  more: 'más',
                  show: 'Mostrar',
                  today: 'Hoy'
              }
          }   
      });
      

      (Compare with the way we do it for the month view:

      var monthView = new Y.SchedulerMonthView({
          strings: {
              allDay: 'Todo el día',
              more: 'más',
              show: 'Mostrar',
              today: 'Hoy'
          }   
      });
      

      However, this is quite counterintuitive and annoying. Worse yet, giving headerViewConfig of a week view will override important internal configuration, which will require the developer to give this internal configuration by hand:

      var weekView = new Y.SchedulerWeekView({
          headerViewConfig: {
              displayDaysInterval: A.DataType.DateMath.WEEK_LENGTH,
              strings: {
                  allDay: 'Todo el día',
                  more: 'más',
                  show: 'Mostrar',
                  today: 'Hoy'
              }
          }   
      });
      

      As a developer, I want to pass the strings through the strings argument from the main constructor:

      var dayView = new Y.SchedulerDayView({
          strings: {
              allDay: 'Todo el día',
              more: 'más',
              show: 'Mostrar',
              today: 'Hoy'
           }   
      });
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  5 years, 6 days ago

                  Packages

                  Version Package