the issue is the resulting string has single quotes and the string in JS is also single quoted, of course I can use double quotes on JS, the issue will still be there if the i18n string also has double quotes, I talking about something like this:
var s = '${g.message(...)}';
The final code is JS but the i18n string is injected in groovy on the server side