BluePink BluePink
XHost
Gazduire site-uri web nelimitata ca spatiu si trafic lunar la doar 15 eur / an. Inregistrare domenii .ro .com .net .org .info .biz .com.ro .org.ro la preturi preferentiale. Pentru oferta detaliata accesati site-ul BluePink

Simple Deepl Free API Python example

Deepl Free API Python example

import requests, sys

# Usage: python DeeplFreeAPI.py RO “Was ist das?”

# Response: {“translations”:[{“detected_source_language”:”DE”,”text”:”Ce este?”}]}

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”])

Autohotkey to simulate Ctr-Insert in MemoQ to copy target segment into source segment

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

How to prepare files for ContextTM / PerfectMatch in Trados

Sometimes you need to prepare ttx files for ContextTM / PerfectMatch processing. Since the freelance edition of Trados 2006 / 2007 does not allow this, there is a workaround: open the ttx files in a unicode text editor, for instance Notepad++, and replace <Tu MatchPercent=”100″> with <Tu Origin=”xtranslate” MatchPercent=”100″>.

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>