YouTube-Comment-Translate icon indicating copy to clipboard operation
YouTube-Comment-Translate copied to clipboard

When translationg, the format and images are not retained.

Open Ivanmatthew opened this issue 2 years ago • 0 comments

The emoji's (img elements) and text format like newlines aren't retained. One could make this feature by seperating the text into an array, and using the batch translation method (shown below) to get that same array in current json format translated back and inserting the translated text appropiately.

let text = [];
text.push(encodeURIComponent("haha"));
text.push(encodeURIComponent("hahax2"));
fetch(`https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=${TARGET}&dt=t&q=${text.join('%0A')}`);
...

Ivanmatthew avatar Oct 17 '22 19:10 Ivanmatthew