Skip to content
Anoncheg1 edited this page Sep 7, 2024 · 3 revisions
translate(){
    p1=$(echo "$@" | cut -d '|' -f 1)
    p2=$(echo "$@" | cut -d '|' -f 2)
    cd /home/transl/sources/translate-shell &>/dev/null
    # echo "$p2 -no-pager -no-browser -no-init -u 'Mozilla/5.0' -engine yandex \"$p1\""
    cache_exec sudo -u transl proxychains -q -f /home/transl/proxychains.conf bash -c "$p2 -no-theme -no-play -no-pager -no-browser -no-init -u 'Mozilla/5.0' -engine yandex \"$p1\""
    cd ~
}
tze() {
    translate "$@" '|' 'source translate -no-autocorrect -no-auto -t en -s zh'
}
tez() {
    translate "$@" '|' 'source translate -show-original n -show-original-phonetics n -no-autocorrect -no-auto -s en -t zh-CN'
}
tre() {
    translate "$@" '|' 'source translate -show-original n -show-original-phonetics n -no-auto -t en -s ru'
}
ter() {
    translate "$@" '|' 'source translate -s en -t ru'
}
tue() {
    translate "$@" '|' 'source translate -t en'
}
Clone this wiki locally