A translator that can be run both in your terminal and in a web browser, or even not run at all and the program itself will read your text from save buffer and insert a translation into it.
If you want to translate quickly, you can just run trans
and then the text you have saved on the clipboard will be read and replaced with the translation, buf if you want to enter new text, you can just run trans -i="your any text"
.
You can also run the UI in a terminal or web browser.
For a more detailed on the startup commands, refer to block Run Commands
- To use the application, you first need to clone this get repository to your machine.
git clone https://github.com/blackmarllbor0/UI-translator.git
- After that, you need to perform installation og the application.
pip install .
- Great, now you can use the app! Use
trans
command.
The configuration file looks like this:
storage:
lang:
src: "auto"
dest: "en"
translate_api: "google"
open_in: "none"
buffer:
paste: true
copy: true
print: true
- lang - Responsible for controlling the default language
- src - The default setting is auto, that's, it determines the language you enter. If you're sure that you will use only one language, you can change it with the command
trans -sc -src="new_lang"
. - dest - The language into which the input text will be translated. The default setting is en. To change if you can use command
trans -sc -dest="new_lang"
.
- src - The default setting is auto, that's, it determines the language you enter. If you're sure that you will use only one language, you can change it with the command
- translate_api - This is translator API. The default is google, with plans to add yandex and deepl in the future. To change this field, you can use command
trans -sc -api="api"
- open_in - This item is responsible for where the application will open. The default setting is none, but you can also select terminal or browser. To change this field, you can use command
trans -sc -o="terminal"
. - buffer - This field is responsible for you clipboard.
- paste - If the value is
true
, the program, when opened, reads your buffer and translates the last copied text. To change this field, you can use commandtrans -sc -paste=bool
. - copy - If the value is
true
, the program saves the translation to your buffer when translating text. To change this field, you can use commandtrans -sc -copy=bool
- paste - If the value is
- print - Only works in
open_in: "none"
mode. The default setting is true. Outputs a string with the translation result. To change this field, you can use commandtrans -sc -p=bool
trans -[keys]
The application supports multiple startup methods, as well as many commands to control the startup of the application.
If no configuration change key is specified, the keys passed will only work in the current session.
- Commands for configuration management. The
-sc
or--set-config
key must necessarily be present to change the configuration. To change configuration, you can add the keys below to these keys. - Language control
-src
- to change the source language.-dest
- to change destination language.
- Translation API. The
-api
key to change API for translation. - Open app in to open an application. Keys
-o
or--open
. - Buffer
-paste
to change paste value.-copy
to change copy value.
- Print result. Use keys
-p
or--print
to change print value.
If you have any questions, suggestions, or encounter any issues, please feel free to reach out to us:
- Telegram: @blackmarllbor0
- Email: 3100194@gmail.com
Thank you for your attention! I hope that my work will be useful to you!