From 8a9027d9306a547a2aee64248ea9c937871b9e16 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Fri, 23 Feb 2024 14:29:45 +0100 Subject: [PATCH] Dev Added missing translation to calendar --- application/core/QuestionTypes/Date/RenderDate.php | 2 +- .../extensions/DateTimePickerWidget/DateTimePicker.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/application/core/QuestionTypes/Date/RenderDate.php b/application/core/QuestionTypes/Date/RenderDate.php index c14b6569437..63c67ecf6e6 100644 --- a/application/core/QuestionTypes/Date/RenderDate.php +++ b/application/core/QuestionTypes/Date/RenderDate.php @@ -94,7 +94,7 @@ public function setMinDate() $this->minDate = '{' . $this->getQuestionAttribute('date_min') . '}'; } } else { - $this->minDate = '1900-01-01'; // Why 1900 ? + $this->minDate = '1900-01-01'; // We need some default value } } diff --git a/application/extensions/DateTimePickerWidget/DateTimePicker.php b/application/extensions/DateTimePickerWidget/DateTimePicker.php index e651f054f05..f4c1d2ad957 100644 --- a/application/extensions/DateTimePickerWidget/DateTimePicker.php +++ b/application/extensions/DateTimePickerWidget/DateTimePicker.php @@ -193,11 +193,9 @@ private function getLocalizationOptionsString() $locale = $this->getValue('locale', $this->pluginOptions, 'en'); $tooltips = $this->getConvertedTempusOptions($this->getTranslatedTooltips()); foreach ($tooltips as $key => $tooltip) { - $localeScript .= " $key: '$tooltip', - "; + $localeScript .= " $key: '$tooltip',\n"; } - $localeScript .= " dayViewHeaderFormat: { month: 'long', year: 'numeric' }, - locale: '$locale'"; + $localeScript .= " dayViewHeaderFormat: { month: 'long', year: 'numeric' },\nlocale: '$locale'"; return "{ $localeScript @@ -399,6 +397,7 @@ private function getTranslatedTooltips() 'clear' => gT('Clear selection'), 'prevMonth' => gT('Previous month'), 'nextMonth' => gT('Next month'), + "selectMonth" => gT('Select month'), 'selectYear' => gT('Select year'), 'prevYear' => gT('Previous year'), 'nextYear' => gT('Next year'),