Warning: Cannot modify header information - headers already sent by (output started at /home/www/dynamic/pluto.ro/traduceri.pluto.ro/public_html/index.php:2) in /home/www/dynamic/pluto.ro/traduceri.pluto.ro/public_html/wordpress/wp-includes/feed-rss2.php on line 8
auth_key = ‘your_API_key_here’
target_lang = sys.argv[1]
text = sys.argv[2]
data = {
‘auth_key’: auth_key,
‘text’: text,
‘target_lang’: target_lang}
response = requests.post(‘https://api-free.deepl.com/v2/translate’, data=data)
print(response.json()[“translations”][0][“text”])
]]>In MemoQ, to copy target segment into source segment, you press Ctr+Alt+S.
In SDL Studio, to copy target segment into source segment, you press Ctr+Insert.
This AutoHotKey script simulates the same shortcut in MemoQ, that is, if you press Ctr+Insert in MemoQ, you can copy the source segment into the target segment, having the same shortcut as in SDL Studio, which I find to be easier and more logical.
Copy the code, paste it in a text file and rename the extension to AHK. In order to run, AutoHotKey must be installed.
^Insert:: ; Simulate Ctr+Insert in MemoQ
WinGetActiveTitle, Title
IfInString, Title, memoQ
{
Send ^+s
Send {Left}
}
Else
Send ^{Ins}
Return
Example of 100 % units:
<Tu MatchPercent=”100″><Tuv Lang=”DE-DE”>AC/DC Converter</Tuv><Tuv Lang=”RO-RO”>Convertor AC/DC</Tuv></Tu>
Example of ContextTM / PerfectMatch units:
<Tu Origin=”xtranslate” MatchPercent=”100″><Tuv Lang=”DE-DE”>AC/DC Converter</Tuv><Tuv Lang=”RO-RO”>Convertor AC/DC</Tuv></Tu>