Debian 10 (buster) ではデフォルトでtranslate-shellをaptでインストール不可で、検索しても直ぐに情報が出てこなかったので、ここに投稿しておこうと思う。
なお、translate-shellとはGoogle翻訳を呼び出すコマンドである。
translate-shellをaptでインストールするには、事前にcontribリポジトリを追加する。
# echo "deb http://ftp.de.debian.org/debian buster main contrib" > /etc/apt/sources.list.d/contrib.list
# apt update
# apt install translate-shell
参考: https://packages.debian.org/buster/all/translate-shell/download
これでシェル上で翻訳ができるので、とても便利である。
$ trans -b en:ja "hello world!"
こんにちは世界!
2020/10/21追記
デフォルトでインストール可能な他のLinuxディストリビューションで以下のエラーが出力された場合、バージョンアップすると良い。
[ERROR] Null response.
[ERROR] Oops! Something went wrong and I can't translate it for you :(
実際にはバージョンチェックを行い、最新版をダウンロードして、既存のファイルを更新する。
$ sudo trans -U
Current version: 0.9.2.1
New version available: 0.9.6.12
Download from: http://www.soimort.org/translate-shell/trans
$ sudo wget http://www.soimort.org/translate-shell/trans
$ sudo chmod +x trans
$ sudo mv trans `which trans`