<commit_before><div id="{$trackercalendar.id|escape}"></div>
{jq}
	var data = {{$trackercalendar|json_encode}};
	$('#' + data.id).each(function () {
		var cal = this;
		var storeEvent = function(event) {
			var request = {
				itemId: event.id,
				trackerId: data.trackerId,
			}, end = event.end;

			if (! end) {
				end = event.start;
			}

			request['fields~' + data.begin] = event.start.getTime() / 1000;
			request['fields~' + data.end] = end.getTime() / 1000;

			$.post($.service('tracker', 'update_item'), request);
		};

		$(this).fullCalendar({
			timeFormat: {
				'': data.timeFormat
			},
			header: {
				left: 'prevYear,prev,next,nextYear today',
				center: 'title',
				right: data.views
			},
			editable: true,
			timezone: '{{$prefs.server_timezone}}',
			events: $.service('tracker_calendar', 'list', {
				trackerId: data.trackerId,
				beginField: data.begin,
				endField: data.end,
				resourceField: data.resource,
				coloringField: data.coloring,
				filters: data.body,
			}),
			resources: data.resourceList,
			year: data.viewyear,
			month: data.viewmonth-1,
			day: data.viewday,
			minTime: data.minHourOfDay,
			maxTime: data.maxHourOfDay,
			monthNames: [ "{tr}January{/tr}", "{tr}February{/tr}", "{tr}March{/tr}", "{tr}April{/tr}", "{tr}May{/tr}", "{tr}June{/tr}", "{tr}July{/tr}", "{tr}August{/tr}", "{tr}September{/tr}", "{tr}October{/tr}", "{tr}November{/tr}", "{tr}December{/tr}"], 
			monthNamesShort: [ "{tr}Jan.{/tr}", "{tr}Feb.{/tr}", "{tr}Mar.{/tr}", "{tr}Apr.{/tr}", "{tr}May{/tr}", "{tr}June{/tr}", "{tr}July{/tr}", "{tr}Aug.{/tr}", "{tr}Sep.{/tr}", "{tr}Oct.{/tr}", "{tr}Nov.{/tr}", "{tr}Dec.{/tr}"], 
			dayNames: ["{tr}Sunday{/tr}", "{tr}Monday{/tr}", "{tr}Tuesday{/tr}", "{tr}Wednesday{/tr}", "{tr}Thursday{/tr}", "{tr}Friday{/tr}", "{tr}Saturday{/tr}"],
			dayNamesShort: ["{tr}Sun{/tr}", "{tr}Mon{/tr}", "{tr}Tue{/tr}", "{tr}Wed{/tr}", "{tr}Thu{/tr}", "{tr}Fri{/tr}", "{tr}Sat{/tr}"],
			buttonText: {
				today:    "{tr}today{/tr}",
				month:    "{tr}month{/tr}",
				week:     "{tr}week{/tr}",
				day:      "{tr}day{/tr}"
			},
			allDayText: "{tr}all-day{/tr}",
			firstDay: data.firstDayofWeek,
			slotMinutes: {{$prefs.calendar_timespan}},
			defaultView: data.dView,
			eventAfterRender : function( event, element, view ) {
				element.popover({trigger: 'hover focus', title: event.title, content: event.description, html: true, container: 'body'});
			},
			eventClick: function(event) {
				if (data.url) {
					var lOp='';
					var actualURL = '';
					var html = $.parseHTML( event.description ) || [];

					// Store useful data values to the URL for Wiki Argument Variable 
					// use and to javascript session storage for JQuery use
					actualURL = data.url;
					actualURL += actualURL.indexOf("?") === -1 ? "?" : "&";
					actualURL += "trackerid=" + event.trackerId;
					if( data.trkitemid == 'y' ) {
						actualURL = actualURL + "&itemId=" + event.id;
					}
					else {
						actualURL = actualURL + "&itemid=" + event.id;
					}<commit_msg>[FIX] trackercalendar plugin: add support for translation on resource day, month and week buttons (thanks marclaporte)<commit_after><div id="{$trackercalendar.id|escape}"></div>
{jq}
	var data = {{$trackercalendar|json_encode}};
	$('#' + data.id).each(function () {
		var cal = this;
		var storeEvent = function(event) {
			var request = {
				itemId: event.id,
				trackerId: data.trackerId,
			}, end = event.end;

			if (! end) {
				end = event.start;
			}

			request['fields~' + data.begin] = event.start.getTime() / 1000;
			request['fields~' + data.end] = end.getTime() / 1000;

			$.post($.service('tracker', 'update_item'), request);
		};

		$(this).fullCalendar({
			timeFormat: {
				'': data.timeFormat
			},
			header: {
				left: 'prevYear,prev,next,nextYear today',
				center: 'title',
				right: data.views
			},
			editable: true,
			timezone: '{{$prefs.server_timezone}}',
			//theme: true, TODO: add support of jQuery UI theme to the plugin's PHP
			events: $.service('tracker_calendar', 'list', {
				trackerId: data.trackerId,
				beginField: data.begin,
				endField: data.end,
				resourceField: data.resource,
				coloringField: data.coloring,
				filters: data.body,
			}),
			resources: data.resourceList,
			year: data.viewyear,
			month: data.viewmonth-1,
			day: data.viewday,
			minTime: data.minHourOfDay,
			maxTime: data.maxHourOfDay,
			monthNames: [ "{tr}January{/tr}", "{tr}February{/tr}", "{tr}March{/tr}", "{tr}April{/tr}", "{tr}May{/tr}", "{tr}June{/tr}", "{tr}July{/tr}", "{tr}August{/tr}", "{tr}September{/tr}", "{tr}October{/tr}", "{tr}November{/tr}", "{tr}December{/tr}"], 
			monthNamesShort: [ "{tr}Jan.{/tr}", "{tr}Feb.{/tr}", "{tr}Mar.{/tr}", "{tr}Apr.{/tr}", "{tr}May{/tr}", "{tr}June{/tr}", "{tr}July{/tr}", "{tr}Aug.{/tr}", "{tr}Sep.{/tr}", "{tr}Oct.{/tr}", "{tr}Nov.{/tr}", "{tr}Dec.{/tr}"], 
			dayNames: ["{tr}Sunday{/tr}", "{tr}Monday{/tr}", "{tr}Tuesday{/tr}", "{tr}Wednesday{/tr}", "{tr}Thursday{/tr}", "{tr}Friday{/tr}", "{tr}Saturday{/tr}"],
			dayNamesShort: ["{tr}Sun{/tr}", "{tr}Mon{/tr}", "{tr}Tue{/tr}", "{tr}Wed{/tr}", "{tr}Thu{/tr}", "{tr}Fri{/tr}", "{tr}Sat{/tr}"],
			buttonText: {
				resourceDay:    "{tr}resource day{/tr}",
				resourceMonth:    "{tr}resource month{/tr}",
				resourceWeek:    "{tr}resource week{/tr}",
				today:    "{tr}today{/tr}",
				month:    "{tr}month{/tr}",
				week:     "{tr}week{/tr}",
				day:      "{tr}day{/tr}"
			},
			allDayText: "{tr}all-day{/tr}",
			firstDay: data.firstDayofWeek,
			slotMinutes: {{$prefs.calendar_timespan}},
			defaultView: data.dView,
			eventAfterRender : function( event, element, view ) {
				element.popover({trigger: 'hover focus', title: event.title, content: event.description, html: true, container: 'body'});
			},
			eventClick: function(event) {
				if (data.url) {
					var lOp='';
					var actualURL = '';
					var html = $.parseHTML( event.description ) || [];

					// Store useful data values to the URL for Wiki Argument Variable 
					// use and to javascript session storage for JQuery use
					actualURL = data.url;
					actualURL += actualURL.indexOf("?") === -1 ? "?" : "&";
					actualURL += "trackerid=" + event.trackerId;
					if( data.trkitemid == 'y' ) {
						actualURL = actualURL + "&itemId=" + event.id;
					}
					else {
						actualURL = actualURL + "&itemid=" + event.id;
					}
{'fraction_non_alphanumeric': 0.23016496465043204, 'fraction_numerical': 0.003142183817753339, 'mean_word_length': 3.563440860215054, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5515291', 'n_tokens_mistral': 2823, 'n_tokens_neox': 2342, 'n_words': 447}