FullCalendar : slots are not translated

Created on 17 July 2018, over 6 years ago
Updated 14 January 2024, 10 months ago

On "/admin/bat/calendar/all" page, the slots names are not translated (excepted "Month"!?)

To translate them, I changed the "bat_fullcalendar.module" file like that:

function bat_fullcalendar_configure($user_settings) {
[...]
    $config = array(
      'schedulerLicenseKey' => $schedulerlicensekey,
      'themeSystem' => 'standard',
      'unitType' => '',
      'eventType' => '',
      'grouping_entity_type' => '',
      'grouping_ids' => '',
      'collapse_childrens' => 0,
      'eventGranularity' => $user_setting['eventGranularity'],
      'locale' => $language->language,
      'slotWidth' => FALSE,
      'calendarHeight' => 500,
      'editable' => TRUE,
      'selectable' => TRUE,
      'eventStartEditable' => TRUE,
      'eventDurationEditable' => TRUE,
      'headerLeft' => 'prev, today, datepicker, next',
      'headerCenter' => 'title',
      'headerRight' => $calendar_views,
      'views' => $calendar_views,
      'defaultView' => $default_view,
-      'viewsTimelineDayButtonText' => ':15 slots',
+      'viewsTimelineDayButtonText' => t(':15 slots'),
      'viewsTimelineDaySlotDuration' => '00:15',
      'viewsTimelineDaySlotLabelFormat' => FALSE,
      'viewsTimelineDayTitleFormat' => '',
-      'viewsTimelineSevenDayButtonText' => '7 days',
+      'viewsTimelineSevenDayButtonText' => t('7 days'),
      'viewsTimelineSevenDayDuration' => array('days' => 7),
      'viewsTimelineSevenDaySlotDuration' => '01:00',
      'viewsTimelineSevenDayTitleFormat' => '',
      'viewsTimelineSevenDaySlotLabelFormat' => FALSE,
-      'viewsTimelineTenDayButtonText' => '10 days',
+      'viewsTimelineTenDayButtonText' => t('10 days'),
      'viewsTimelineTenDayDuration' => array('days' => 10),
      'viewsTimelineTenDaySlotDuration' => '01:00',
      'viewsTimelineTenDaySlotLabelFormat' => FALSE,
      'viewsTimelineTenDayTitleFormat' => '',
-      'viewsTimelineThirtyDayButtonText' => '30 days',
+      'viewsTimelineThirtyDayButtonText' => t('30 days'),
      'viewsTimelineThirtyDayDuration' => array('days' => 30),
      'viewsTimelineThirtyDaySlotDuration' => '01:00',
      'viewsTimelineThirtyDaySlotLabelFormat' => FALSE,
      'viewsTimelineThirtyDayTitleFormat' => '',
-      'viewsTimeline365DayButtonText' => '1 year',
+      'viewsTimeline365DayButtonText' => t('1 year'),
      'viewsTimeline365DayDuration' => array('days' => 365),
      'viewsTimeline365DaySlotLabelFormat' => FALSE,
      'viewsTimeline365DayTitleFormat' => '',
-      'viewsAgendaOneDayButtonText' => 'day',
+      'viewsAgendaOneDayButtonText' => t('day'),
      'viewsAgendaOneDayDuration' => array('days' => 1),
-      'viewsAgendaSevenDayButtonText' => 'week',
+      'viewsAgendaSevenDayButtonText' => t('week'),
      'viewsAgendaSevenDayDuration' => array('days' => 7),
      'resourceAreaWidth' => '25%',
[...]

Regards,
Detroz

🐛 Bug report
Status

Closed: outdated

Version

1.33

Component

Code

Created by

🇧🇪Belgium detroz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024