Closed luasenvy closed 5 years ago
Hi, I htink that your code is typed wrong because you use twice operator:
`
BAD:
let translated = `hello totaljs, ${vm.$t(`hello - world`)}`;
GOOD:
let translated = `hello totaljs, ${vm.$t(\`hello - world\`)}`;
TEST:
require('total.js');
console.log(U.minifyScript('let translated = `${vm.$t(\\`hello - world\\`)}`;'));
// correct output: let translated=`${vm.$t(\`hello - world\`)}`;
For understading:
var translated = 'BAD 'STRING''; // WRONG
var translated = 'BAD \'STRING\''; // GOOD
// or:
var translated = "BAD "STRING""; // WRONG
var translated = "BAD \"STRING\""; // GOOD
// or:
var translated = `BAD `STRING``; // WRONG
var translated = `BAD \`STRING\``; // GOOD
Thank you!
i'll use your guide. thanks for reply :D
hi, i use totaljs with vue and vue i18n.
i service with next codes via
MERGE()
function. but i found little logical error. Perhaps this seems to be a problem with the es version coming up.next code is perfectly compressed and work fine:
but, next code compress with removing the necessary space. and cannot found language.:
I think
hello - world
seems to be recognized as a formula. :)