Skip to content

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

Notifications You must be signed in to change notification settings

emirhansirkeci/spotra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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",
};

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published