countdown in French - theme Electro from Arenacommerce

Topic summary

Problème de personnalisation d’un compte à rebours dans le thème Electro d’Arenacommerce, sur une page traduite en français avec Weglot. Le texte du countdown (« hours », « minutes », « seconds ») ne se traduit pas correctement, et l’objectif est d’afficher uniquement une valeur compacte comme « 19 H » pour éviter ce souci.

Éléments techniques fournis :

  • Le code JavaScript de la fonction deadLine_time() a été identifié.
  • La date limite est calculée selon le jour courant, avec une logique spécifique pour vendredi, samedi et dimanche.
  • Le compte à rebours est lancé avec : $('.countdown_deadline').countdown({until: _dueDate, format: 'HMS', padZeroes: true});

Question principale :

  • Savoir si la bonne approche consiste à modifier le paramètre format: 'HMS'.
  • L’hypothèse proposée est de le remplacer par H, afin de n’afficher que les heures.

État de la discussion :

  • Aucune solution confirmée dans l’échange fourni.
  • La demande reste ouverte et attend une validation technique ou une autre méthode.
Summarized with AI on March 9. AI used: gpt-5.4.

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!