![]() ![]() Support multilingual manifest description again If user want to use this extension on local file, user need to set “allow access to file URLs” from chrome://extensions/?id=hmigninkgibhdckiaphhmbgcghochdjc. Pop up configuration page is provided by click extension icon top right corner and click this extension's blue mouse icon. And, make sure to setting target translate language properly from pop up configuration page. If pop-over translate tooltip is not came out properly after installation, user need to reload all your existing pages to run web page with this extension for using extension feature. When mouse over on comic bubble background (Experimental feature) show comic bubble translation Filter out when source language and target language are same Support pdf to display translated tooltip using Mozilla PDF.js In the setting, google TTS (text to speech) is available to listen text Using google translate to translate in any language Visualize tooltip on any web page (except chrome web store site) Before you paste what is back into your clipboard make sure to give it a second since the function needs time to open the deepl website and wait for the translation.When mouse hover on text, it shows translated tooltip in any desired language. This will copy any highlighted text (as long as that is the active window) and sends it thought Deepl. "Dies ist ein Text, der aus dem Englischen ins Deutsche übersetzt werden soll."Ĭlipboard := DeeplTranslate(Clipboard, "en", "it") Result := IE.document.getElementsByTagName("textarea").value While (IE.document.getElementsByTagName("textarea").value = "") Since the conversion takes a second we want to wait till the value is filled otherwise the return will always be nothing StringReplace, Source, Source, %A_Space%, `%20, All you don't need this, but you can keep it in MsgBox % DeeplTranslate("This is text to translate to italian from english", "en", "it") Result := IE._box.innertextĭoes anyone know how to adapt this to DeepL? I believe the key lies in the While IE.readyState!=4 || IE.document.readyState!="complete" || IE.busy IE := ComObjCreate("InternetExplorer.Application") ~ Creation of hidden Internet Explorer instance to look up Google Translate and retrieve translation StringReplace, Source, Source, %A_Space%, `%20, All ToolTip, %Target%, % A_CaretX-SourceLength, % A_CaretY+50 please wait ☺., % A_CaretX-SourceLength, % A_CaretY+50 MsgBox, 48, GoogleTranslateSelection, No text highlighted or problem copying text to clipboard. ~ runs Google Translate for selected text or makes the tooltip with the translation disappear if it is visible ~ + shows the little user interface for changing source and target language SetWorkingDir %A_ScriptDir% ~ Ensures a consistent starting directory. ![]() SendMode Input ~ Recommended for new scripts due to its superior speed and reliability. I am not posting my own script (the one that goes back and forth with the mouse) because it's too pitiful, but here's is the script of the guy that works with Google Translate.Ĭode: Select all #NoEnv ~ Recommended for performance and compatibility with future AutoHotkey releases. If anyone has any inkling of what I am talking about and could adapt this code to work with DeepL, I would be extremely helpful. But I believe they are things such as all obscure functions starting with IE. I have not an inkling of what DOM objects do or are, I just search for them in the Internet. ![]() And apparently, instead of taking the mouse to a certain point in the website page, clicking, sending Control A and then Control X, it apparently had a way of "reading" the contents of the target language box directly, with some kind of DOM object. However, I found a guy who did a similar script for Google Translate, but worked differently in the sense that, when the script opened Internet Explorer to load the Google Translate page, it did it in a hidden from view way, so it was much better looking. It is slow, I have to keep the monitors on since the mouse is moving back and forth, and it looks awfully slow, but that is more or less my scripting skills. Since my scripting skills are close to zero, I have filled the script with Sleeps to help minimize any random behaviour, copy pasting not working, and the like. it just uses SendInputs, MouseMove, Clicks and Winactivates (TradosFirefox) to do the job. My script does precisely that, but in a crappy and newbie way. It would be great to have a script to do the following.Ģ.- Paste it onto the Source Language box in /translate.ģ.- Collect the translated text from the target language box.Ĥ.- Paste that text in the relevant target location in my translation tool.ĥ.- Advance to the next line/segment of text. I work with a Translation Tool called Trados. I have found that DeepL is an online translator that translates much much better than the crap translation my agency provides me with to perform a Machine Translation Edit. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |