-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Thank you for making such a good plug-in, it is really fast, but when a large amount of text is translated at once, the content displayed will be particularly long, even beyond the width of the screen, I tried to make some changes on the codes via applescript to display a dialog window. I am not very familiar with the php language. The syntax may be wrong, but basically there is not much problem. Hope you can understand my intention and add it to the new version.
known issue: If there are double quotes in the translated text, the output will be empty, I don’t know how to deal with this issue.
below is the sample of dialog window and code
$result = array_reduce($json[0], function($carry, $item) {
if (isset($item[0])) {
$carry .= $item[0];
return $carry;
}
}, '');
$cmd = "/usr/bin/osascript -e \"display dialog \\\" {$result} \\\"\"";
exec($cmd);
echo " ";
thang-nm
Metadata
Metadata
Assignees
Labels
No labels