Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add datepicker translations

weronka018f1562ac7d
diff --git a/saleor/static/js/dashboard.js b/saleor/static/js/dashboard.js
index 20822762f8..ea33ab0cc3 100644
--- a/saleor/static/js/dashboard.js
+++ b/saleor/static/js/dashboard.js
@@ -188,6 +188,26 @@ $('.switch-actions').on('change', function() {
}
});
$('.datepicker').pickadate({
+ // The title label to use for the month nav buttons
+ labelMonthNext: gettext('Next month'),
+ labelMonthPrev: gettext('Previous month'),
+
+ // The title label to use for the dropdown selectors
+ labelMonthSelect: gettext('Select a month'),
+ labelYearSelect: gettext('Select a year'),
+
+ // Months and weekdays
+ monthsFull: [ gettext('January'), gettext('February'), gettext('March'), gettext('April'), gettext('May'), gettext('June'), gettext('July'), gettext('August'), gettext('September'), gettext('October'), gettext('November'), gettext('December') ],
+ monthsShort: [ gettext('Jan'), gettext('Feb'), gettext('Mar'), gettext('Apr'), gettext('May'), gettext('Jun'), gettext('Jul'), gettext('Aug'), gettext('Sep'), gettext('Oct'), gettext('Nov'), gettext('Dec') ],
+ weekdaysFull: [ gettext('Sunday'), gettext('Monday'), gettext('Tuesday'), gettext('Wednesday'), gettext('Thursday'), gettext('Friday'), gettext('Saturday') ],
+ weekdaysShort: [ gettext('Sun'), gettext('Mon'), gettext('Tue'), gettext('Wed'), gettext('Thu'), gettext('Fri'), gettext('Sat') ],
+
+ // Materialize modified
+ weekdaysLetter: [ gettext('S'), gettext('M'), gettext('T'), gettext('W'), gettext('T'), gettext('F'), gettext('S') ],
+ today: gettext('Today'),
+ clear: gettext('Clear'),
+ close: gettext('Clear'),
+
format: 'd mmmm yyyy',
formatSubmit: 'yyyy-mm-dd',
selectMonths: true,
@@ -196,6 +216,7 @@ $('.datepicker').pickadate({
$(document.activeElement).blur();
}
});
+
function initSelects() {
$('select:not(.browser-default):not([multiple])').material_select();
$('select[multiple]:not(.browser-default)').select2({width: '100%'});
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index 17a7bf81e5..23106eb564 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -200,6 +200,7 @@
<div id="base-modal-fixed" class="modal modal-fixed-footer"></div>
<!-- Core Scripts - Include with every page -->
+ <script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>
{% render_bundle 'vendor' 'js' %}
{% render_bundle 'dashboard' 'js' %}
<script src="{% static "versatileimagefield/js/versatileimagefield.js" %}"></script>