Skip to content
Snippets Groups Projects

Issue #3424008: Translations handling for 2.x version

3 files
+ 114
0
Compare changes
  • Side-by-side
  • Inline
Files
3
js/locale.js 0 → 100644
+ 71
0
(function ($, Drupal, drupalSettings) {
Drupal.behaviors.jqueryUiDatepickerLocale = {
attach: function attach(context, settings) {
$.datepicker.regional['drupal-locale'] = $.extend({
closeText: Drupal.t('Done'),
prevText: Drupal.t('Prev'),
nextText: Drupal.t('Next'),
currentText: Drupal.t('Today'),
monthNames: [
Drupal.t('January', {}, { context: 'Long month name' }),
Drupal.t('February', {}, { context: 'Long month name' }),
Drupal.t('March', {}, { context: 'Long month name' }),
Drupal.t('April', {}, { context: 'Long month name' }),
Drupal.t('May', {}, { context: 'Long month name' }),
Drupal.t('June', {}, { context: 'Long month name' }),
Drupal.t('July', {}, { context: 'Long month name' }),
Drupal.t('August', {}, { context: 'Long month name' }),
Drupal.t('September', {}, { context: 'Long month name' }),
Drupal.t('October', {}, { context: 'Long month name' }),
Drupal.t('November', {}, { context: 'Long month name' }),
Drupal.t('December', {}, { context: 'Long month name' })
],
monthNamesShort: [
Drupal.t('Jan', {}, { context: 'Abbreviated month name' }),
Drupal.t('Feb', {}, { context: 'Abbreviated month name' }),
Drupal.t('Mar', {}, { context: 'Abbreviated month name' }),
Drupal.t('Apr', {}, { context: 'Abbreviated month name' }),
Drupal.t('May', {}, { context: 'Abbreviated month name' }),
Drupal.t('Jun', {}, { context: 'Abbreviated month name' }),
Drupal.t('Jul', {}, { context: 'Abbreviated month name' }),
Drupal.t('Aug', {}, { context: 'Abbreviated month name' }),
Drupal.t('Sep', {}, { context: 'Abbreviated month name' }),
Drupal.t('Oct', {}, { context: 'Abbreviated month name' }),
Drupal.t('Nov', {}, { context: 'Abbreviated month name' }),
Drupal.t('Dec', {}, { context: 'Abbreviated month name' })
],
dayNames: [
Drupal.t('Sunday'),
Drupal.t('Monday'),
Drupal.t('Tuesday'),
Drupal.t('Wednesday'),
Drupal.t('Thursday'),
Drupal.t('Friday'),
Drupal.t('Saturday')
],
dayNamesShort: [
Drupal.t('Sun', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Mon', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Tue', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Wed', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Thu', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Fri', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Sat', {}, { context: 'Abbreviated weekday' })
],
dayNamesMin: [
Drupal.t('Su', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Mo', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Tu', {}, { context: 'Abbreviated weekday' }),
Drupal.t('We', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Th', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Fr', {}, { context: 'Abbreviated weekday' }),
Drupal.t('Sa', {}, { context: 'Abbreviated weekday' })
],
dateFormat: Drupal.t('mm/dd/yy'),
firstDay: 0,
isRTL: 0
}, drupalSettings.jquery.ui.datepicker);
$.datepicker.setDefaults($.datepicker.regional['drupal-locale']);
}
};
})(jQuery, Drupal, drupalSettings);
Loading