This an expirmental/personal, vscode extension, you can use at your own risk, so far it has the following features:
- Translate selected text to Arabic or English.
-
clone the repo
-
install vsc
npm install -g @vscode/vsce -
Create pacakge
vsce package(should be alreay in repo root)- outputs
vscode-faraj-0.0.2.vsixfile
- outputs
-
Install as file
code --install-extension vscode-faraj-0.0.2.vsix -
Install and run libratranslate
faraj.libratranslateHost and libratranslatePort, according to where libratranslate is running. e.g libratranslate --host 192.168.1.5 --port 5555; Then 192.168.1.5, and 5555 would crosspond to the host and port respectively.
faraj.insertAfter default true, if false, the selected text would be replaced with tranlsation. I opted to make it on, because I assume one mostly need to adjust translated text, would need to compare with orignal then.
Just select any text in any file, then open command pallet, search for, Translate the selected...etc.
-
Only translate to/from English, Arabic. Woiudl make it configurable if/when time allows.
-
Changing any setting or config, requires to restart VS code.
- Related ChatGPT coversation used while building this so far
- VScode extensions development docs
- The project was boostrapted via
YeomanandVS code Extension Generator
MIT License