Hi,
I’ve customised the electro theme from arenacommerce . I’ve also translated ym page to FRENCH. However I have a countdown that cannot be translated using the weglot app ( it is constantly bugging ) -
This is the countdown right now:
I’d like to make it so that the countdown is just 19 H that way there is no issue with the translation of “hours”, “minutes” & “seconds”
Therefore I’d like to change the countdown text. I managed to look in the code and find the countdown function here below:
deadLine_time : function(){
var _deadline_time = parseInt($('.shipping-time').attr('data-deadline'));
var _currentDate = new Date();
var _dueDate = new Date( _currentDate.getFullYear(), _currentDate.getMonth(), _currentDate.getDate());
_dueDate.setHours(_deadline_time);
switch(_currentDate.getDay()) {
case 0: // Sunday
_dueDate.setDate(_dueDate.getDate() + 1);
break;
case 5: // Friday
if(_currentDate >= _dueDate){
_dueDate.setDate(_dueDate.getDate() + 3); }
break;
case 6: // Saturday
_dueDate.setDate(_dueDate.getDate() + 2);
break;
default:
if(_currentDate >= _dueDate){
_dueDate.setDate(_dueDate.getDate() + 1);
}
}
$('.countdown_deadline').countdown({until: _dueDate, format: 'HMS', padZeroes: true});
},
I think that I need fr changed the format in the last line - but I am not sure and I don’t know what I should put .. H ?
Can anybody help me if this is the correct approach? if not, could you indicate me how I should go about it? hanks a lot!
