Giter Club home page Giter Club logo

spotra's Introduction

Spotra

tr

Spotra is a Chrome extension that allows you to easily translate content without losing focus while browsing the web.

Spotra example screenshot

How to Install and Use the Extension

Note: The extension is not yet available in the Chrome Web Store.

For those who want to use this extension immediately or contribute to its development, follow the steps below.

  1. Clone the Github repository to your computer or download it as a ZIP file.
  2. Open your Chrome browser and click on the three dots in the upper right corner.
  3. In the menu that opens, go to Extensions and click the Manage extensions button.
  4. Enable Developer mode option in the upper right corner.
  5. Click Load unpackaged and select the client/ directory in the file you downloaded.
  6. After you successfully install the extension, you can start using it by refreshing your active tabs.

Shortcuts

Action MacOS Other
Toggle + " alt + "
Swap Languages + shift + " alt + shift + "
Instant Copy + enter alt + enter
Close esc esc

Server

Due to the ongoing development process, I am currently using the Vercel hobby plan for the server side.

Install

git clone https://github.com/emirhansirkeci/spotra
cd spotra/server
npm install

Run Commands

Execute the API using node index.js

npm run start

or run the API in development mode using nodemon index.js

npm run dev

If you don't have nodemon, install it with the following code.

npm install -g nodemon

Available Endpoints

POST /translate

Request Body

  • text (string, required): The text to be translated.
  • translateFrom (string, optional): The source language code (e.g., "en" for English). If not provided, the API will automatically detect the source language.
  • translateTo (string, required): The target language code (e.g., "es" for Spanish).

Responses

Success

Status: 200 OK

{
  source: "en",
  target: "es",
  text: "Hello, World!",
  result: "¡Hola, Mundo!"
}

Error

Status: 400 Bad Request

{
 code: 400,
 message: "Invalid request. Please provide a valid text parameter."
}

Status: 500 Internal Server Error

{
  code: 500,
  message: "Internal Server Error. Failed to fetch data."
}

Supported Languages

Will be updated.

{
  Turkish: "tr",
  English: "en",
  Italian: "it",
  German: "de",
  Dutch: "nl",
  Japanese: "ja",
  Korean: "ko",
  French: "fr",
  Portuguese: "pt",
  Russian: "ru",
  Spanish: "es",
  Swedish: "sv",
};

spotra's People

Contributors

emirhansirkeci 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.