bocktranslate with varialbles in javascript

Hi all. I’m newbie in this forum. Hopefully someone helps.

Translations works ok on template, but I need translate some strings with variables on jQuery-part. So I have:

let foo = "Hip hip hooray";
let text = "{% blocktranslate with this=foo %}Show me the {{ this }}!{% endblocktranslate %}";

Console prints “Hip hip hooray” so the variable works.
makemessages creates msgid where the “{{ this }}” part is replaced with “%(this)s”. And on abowe row there is “python-format” text.

If I put quotes around the “foo” then the “this” part of the translation has been replaced by foo text. So the blocktranslate “with” works.

What I have to do to make variables work on javascript text parts?