Make short versions of weekday/month names translatable

This commit is contained in:
Hasso Tepper 2015-08-21 10:17:36 +03:00
parent 5f5c3520c9
commit acc5a7d6cc
3 changed files with 73 additions and 3 deletions

View File

@ -78,6 +78,28 @@ $array = array(
(string)$l->t('Saturday')
)
),
"dayNamesShort" => json_encode(
array(
(string)$l->t('Sun.'),
(string)$l->t('Mon.'),
(string)$l->t('Tue.'),
(string)$l->t('Wed.'),
(string)$l->t('Thu.'),
(string)$l->t('Fri.'),
(string)$l->t('Sat.')
)
),
"dayNamesMin" => json_encode(
array(
(string)$l->t('Su'),
(string)$l->t('Mo'),
(string)$l->t('Tu'),
(string)$l->t('We'),
(string)$l->t('Th'),
(string)$l->t('Fr'),
(string)$l->t('Sa')
)
),
"monthNames" => json_encode(
array(
(string)$l->t('January'),
@ -94,6 +116,22 @@ $array = array(
(string)$l->t('December')
)
),
"monthNamesShort" => json_encode(
array(
(string)$l->t('Jan.'),
(string)$l->t('Feb.'),
(string)$l->t('Mar.'),
(string)$l->t('Apr.'),
(string)$l->t('May.'),
(string)$l->t('Jun.'),
(string)$l->t('Jul.'),
(string)$l->t('Aug.'),
(string)$l->t('Sep.'),
(string)$l->t('Oct.'),
(string)$l->t('Nov.'),
(string)$l->t('Dec.')
)
),
"firstDay" => json_encode($l->getFirstWeekDay()) ,
"oc_config" => json_encode(
array(

View File

@ -905,10 +905,10 @@ $(document).ready(function() {
minDate.setDate(minDate.getDate()+1);
$.datepicker.setDefaults({
monthNames: monthNames,
monthNamesShort: $.map(monthNames, function(v) { return v.slice(0,3)+'.'; }),
monthNamesShort: monthNamesShort,
dayNames: dayNames,
dayNamesMin: $.map(dayNames, function(v) { return v.slice(0,2); }),
dayNamesShort: $.map(dayNames, function(v) { return v.slice(0,3)+'.'; }),
dayNamesMin: dayNamesMin,
dayNamesShort: dayNamesShort,
firstDay: firstDay,
minDate : minDate
});

View File

@ -35,6 +35,24 @@ window.dayNames = [
'Friday',
'Saturday'
];
window.dayNamesShort = [
'Sun.',
'Mon.',
'Tue.',
'Wed.',
'Thu.',
'Fri.',
'Sat.'
];
window.dayNamesMin = [
'Su',
'Mo',
'Tu',
'We',
'Th',
'Fr',
'Sa'
];
window.monthNames = [
'January',
'February',
@ -49,6 +67,20 @@ window.monthNames = [
'November',
'December'
];
window.monthNamesShort = [
'Jan.',
'Feb.',
'Mar.',
'Apr.',
'May.',
'Jun.',
'Jul.',
'Aug.',
'Sep.',
'Oct.',
'Nov.',
'Dec.'
];
window.firstDay = 0;
// setup dummy webroots