Giter Club home page Giter Club logo

ui-translator's Introduction

Translator

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.

Table of Contents

Introduction

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

Getting Started

  1. To use the application, you first need to clone this get repository to your machine.
git clone https://github.com/blackmarllbor0/UI-translator.git
  1. After that, you need to perform installation og the application.
pip install .
  1. Great, now you can use the app! Use trans command.

Configuration

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
  1. lang - Responsible for controlling the default language
    1. 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".
    2. 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".
  2. 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"
  3. 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".
  4. buffer - This field is responsible for you clipboard.
    1. 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 command trans -sc -paste=bool.
    2. copy - If the value is true, the program saves the translation to your buffer when translating text. To change this field, you can use command trans -sc -copy=bool
  5. 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 command trans -sc -p=bool

Run commands

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.

  1. 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.
  2. Language control
    1. -src - to change the source language.
    2. -dest - to change destination language.
  3. Translation API. The -api key to change API for translation.
  4. Open app in to open an application. Keys -o or --open.
  5. Buffer
    1. -paste to change paste value.
    2. -copy to change copy value.
  6. Print result. Use keys -p or --print to change print value.

Contact Us

If you have any questions, suggestions, or encounter any issues, please feel free to reach out to us:

Thank you for your attention! I hope that my work will be useful to you!

ui-translator's People

Contributors

blackmarllbor0 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.