diff --git a/.local/bin/dmenugtranslate b/.local/bin/dmenugtranslate index eb31b20..2728658 100755 --- a/.local/bin/dmenugtranslate +++ b/.local/bin/dmenugtranslate @@ -31,11 +31,7 @@ to_code="$(grep "^$to=" "$map" | cut -d '=' -f2)" echo "$from=$from_code,$to=$to_code" >"$FILE" -translation="$(curl --silent --get \ - --data-urlencode "from=$from_code" \ - --data-urlencode "to=$to_code" \ - --data-urlencode "text=$text" \ - "http://localhost:5000/api")" +translation="$(docker run --rm --attach STDOUT --name dmenugtranslate gtranslate:latest gtranslate-query "$from_code" "$to_code" "$text")" rc=$? if [ $rc -ne 0 ]; then