As subject says, I can't translate part when popup is closing automaticly, would like to be able to.

Comments

swarad07’s picture

Hi,

Could you try the patch. I think the Drupal t() was not proper in the JS file. I have tested it using the Microsoft translate widget, and it worked for me.

Let me know if you have any issues.

Cheers

kle’s picture

Best way to make the "Closing"-Message translatable is to put in the seconds as parameter:

original:

$('.message-timer').text(Drupal.t('Closing in' + ' ' + seconds + ' ' + Drupal.t('seconds')));

correction from swarad07:

$('.message-timer').text(Drupal.t('Closing in') + ' ' + seconds + ' ' + Drupal.t('seconds'));

with %seconds as Parameter (see attached patch):

$('.message-timer').html(Drupal.t('Closing in %seconds seconds', {'%seconds': seconds}));

Nice Module - Thank you !

  • le72 committed d5f5f71 on 7.x-1.x
    Issue #1837688 by swarad07, kle: No translation for "Closing in..."
    
le72’s picture

Issue summary: View changes
Status: Active » Fixed

Thank you for fixing.

  • le72 committed d5f5f71 on 8.x-1.x
    Issue #1837688 by swarad07, kle: No translation for "Closing in..."
    
le72’s picture

Issue summary: View changes
Status: Active » Closed (fixed)