[FIX] Date Picker is not translated into local language.--fixes:lp1101072

bzr revid: bth@tinyerp.com-20130122114932-o2jd05u247jlv02c
This commit is contained in:
Bhumi Thakkar (Open ERP) 2013-01-22 17:19:32 +05:30
parent f4fd5fd99c
commit ef1e8f54dd
1 changed files with 36 additions and 0 deletions

View File

@ -2391,6 +2391,42 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({
this.$input = this.$el.find('input.oe_datepicker_master');
this.$input_picker = this.$el.find('input.oe_datepicker_container');
$.datepicker.setDefaults({
clearText: _t('Clear'),
clearStatus: _t('Erase the current date'),
closeText: _t('Done'),
closeStatus: _t('Close without change'),
prevText: _t('<Prev'),
prevStatus: _t('Show the previous month'),
nextText: _t('Next>'),
nextStatus: _t('Show the next month'),
currentText: _t('Today'),
currentStatus: _t('Show the current month'),
monthNames: Date.CultureInfo.monthNames,
monthNamesShort: Date.CultureInfo.abbreviatedMonthNames,
monthStatus: _t('Show a different month'),
yearStatus: _t('Show a different year'),
weekHeader: _t('Wk'),
weekStatus: _t('Week of the year'),
dayNames: Date.CultureInfo.dayNames,
dayNamesShort: Date.CultureInfo.abbreviatedDayNames,
dayNamesMin: Date.CultureInfo.shortestDayNames,
dayStatus: _t('Set DD as first week day'),
dateStatus: _t('Select D, M d'),
firstDay: Date.CultureInfo.firstDayOfWeek,
initStatus: _t('Select a date'),
isRTL: false
});
$.timepicker.setDefaults({
timeOnlyTitle: _t('Choose Time'),
timeText: _t('Time'),
hourText: _t('Hour'),
minuteText: _t('Minute'),
secondText: _t('Second'),
currentText: _t('Now'),
closeText: _t('Done')
});
this.picker({
onClose: this.on_picker_select,
onSelect: this.on_picker_select,