Git Product home page Git Product logo

xtranslate's Introduction

XTranslate

Chrome-extension for translating foreign languages at the viewing web page context. Translate from 100+ foreign languages to your native directly on web-site you're reading or insert text in the action window (via extension's icon on chrome's toolbar).

Screenshot

Features:

  1. Many ways to get translation from texts within web page:
  • double-click on the word

select text and get translation right after one of the following actions:

  • press hotkey defined in extension settings (Alt + Shift + X by default)
  • click on the XTranslate icon appeared near selected text
  • release mouse button after selecting a text (this option is turned off by default)
  • write text in the input fields, mouse-over it and press hotkey
  • open extension's window while text selected to get translation

You can get even some translation from images by mouse overing the image element and press hotkey (title or alt attributes will be used when applicable). With this feature it is possible to get auto-translation by block of text at the page just by pressing the hotkey when mouse over it!

Translations in PDF files are also supported, but it works only from context menu (turned off by default in the settings) due technical restrictions of how chrome renders PDF-files. Select a text in opened file (be sure it's not an image file inside pdf content),
then click mouse right button on the selection and choose "XTranslate -> Translate with ..." from the menu.

  1. Listen text-to-speech (TTS) for all supported translation vendors

  2. Create your unique design (theme) for the popup with translation results

  3. Customize ways of getting translation and other options in app's settings

  4. Type any text in the app's action window and get translation with dictionary support for single words

  5. Save your favorite language pairs (from -> to) as bookmarks for quick access (Cmd/Alt + Shift + click at the language list item to save and keep on top)

  6. History of translations (turned off by default)

Install extension:

Available translation vendors:

For developers and contributors:

Install globals (prerequisites):

  1. node (>=16 && <=18)

  2. brew install yarn

  3. yarn (from project root, install all dependencies)

Steps to build (compile) extension:

  1. npm run build
  2. see /dist and /dist-firefox (depends on the branch) folder(s) for ready-to use extension source directory with own manifest.json

Other commands to dev and test:

  1. npm run dev - runs project in dev/watch mode
  2. npm run test - runs available jest tests

Powered by typescript, react, mobx, webpack, sass, lodash and some others. Made with ♥

xtranslate's People

Contributors

acapela000 avatar cmhrky avatar etamuk avatar gitexel avatar ixrock avatar kubalav avatar s8321414 avatar sijera avatar viktoron avatar wesinator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xtranslate's Issues

Перевод на украинский

Просьба добавить папку для перевода на украинский в locales. И ещё (функциональное) - возможность поиска по буквам в списке языков.
И чисто от себя - иконки соцсетей посередине бы...

The pop-up window doesn't work on offline pages

the translation icon is not displayed next to the highlighted text if the html page is on the local computer. Other ways to call a pop-up window (keyboard shortcut, for example) don't work either

Reverse translation option

I would like to see a "reverse translate option language" to chose from.
For example:
I like to have everything translated to English. But when I select English text I want it to be translated to German.

An additional item in the options to select this "reverse language" would be nice. :)

Keep up the great work. :)

Extension clickjacking google results

XTranslate is clickjacking links to certain sites (e. g. Google results for Microsoft pages) to ad sites. Apparently this behavior corresponds to the recent "adgoal partnership" commit, but it can only be considered malicious as the update got pushed without any notification whatsoever and there's no mention of it in the Chrome store.

Cheat followers

Your extension added script that cheat followers on Instagram and YouTube. I wrote a complaint to your extension to Google Support!

Text "Common" in settings not shown

The text from "setting_title_common" (string from language file) is not shown in settings in extension-popup. Therefore is also not shown the translated text. Please see my screenshot.
Or maybe i am wrong? :-)

Bildschirmfoto vom 2019-06-21 13-40-54

Popup Error (v 2.63.0)

STR:
1, Select any translation engine
2, Double click on string on webpage to translate

ER:
Translation appears (worked in 2.62.2)

AE:
: Data loading failed
Cannot read properties of undefined (reading 'sendMessage')

Thank You :)

image

Небольшой вопрос

Вылетает расширение (решается перезакрытием окна расширения) при написании "Est" или "est"

Trying to contact you (not a real issue)

Hi
Just trying to contact you via your profile's email
I'm the guy with long feature request, can you check you email and write me back?
Delete this issue when you've read it.

Popup is not working

Main setting window shows only on hotkey, no popup

XTRANSLATE 2.52.0
Google Chrome is up to date Version 89.0.4389.90 (Official Build) (x86_64)

Screenshot 2021-03-18 at 19 58 41

Screenshot 2021-03-18 at 19 58 22

Screenshot 2021-03-18 at 19 58 13

Editable list of languages

Hi! Just an idea, maybe in the future you can make an editable list of languages? For example, I often translate from English, German, Slovak and Turkish, as a result I have to very often leaf through this long list for choose one or another language. It would be very cool if I could leave only 5 languages I need in the list and not scroll any more.

It may also be interesting for you to add this vendor https://www.deepl.com/translator

Thanks for your work! :)

mobxreact.esm.js.map NOT_FOUND error

CentBrowser's 5.0.1002.295 (Official Build) (64-bit) (Portable) (Chromium 102.0.5005.167) console shows DevTools failed to load source map: Could not load content for chrome-extension://gfgpkepllngchpmcippidfhmbhlljhoo/mobxreact.esm.js.map: System error: net::ERR_FILE_NOT_FOUND on every page load.

XTranslate is tracking users by redirecting via LinkSynergy including a unique tracking ID

XTranslate 2.64.2 on Chrome has started to track users' browser activity by redirecting search results (and possibly more) via LinkSynergy including a unique tracking ID. It came to our attention due to LinkSynergy being null routed on our network.

Example hit: http://click.linksynergy.com/deeplink?id=...&mid=...&subid=[[...]]&u1=[[...]]&murl=...

XTranslate 2.64.0 on Edge appears to be unaffected (for now)

503 error

Hello I had started frequently get 503 error. Please fix it.

503

Translation of "use_chrome_tts"

Hello,

I tried to translate the strings for "use_chrome_tts" into german but can not get the right meaning of it.
Does it mean "use the tts engine of the system" (does any computer system offer this?) or does it mean "use the tts engine from chrome browser"?
I am using Vivaldi as browser and when I activate this option in Xtranslate I don't get tts-output anymore.

Could you please tell me the meaning of it?
Thank you and best regards from germany

Is there a way to select a dialect?

The fact is that Google determines the dialect of the English language depending on the ip address https://translate.google.com/. For me it's British, for the US it's a US dialect. Google allows you to select a dialect through another link
1)https://translate.google.as/ - Us
2) https://translate.google.co.uk/ - Brit.
Is it possible to somehow modify the code so that you can change the dialect in the settings?

  • auto
  • us
  • brit

I just want to listen to the US dialect.

Possible race condition while saving history

Applicable in extension's window when already saved history data approx >2MB

How to reproduce:
Right after getting translation UI not responds / frozen for ~2sec (e.g. links, tabs not clickable)

Tested with MabBookPro 2017 with following configuration:

mbp-2017

Port to firefox / manifest@v3

TODO

  • manifest@v3 content_scripts not injected automatically (only after opening translator's window via toolbar icon), maybe extra chrome.scripting-api required.
    Otherwise it works automatically only when user allows it manually per domain/site: Right click at XTranslate icon and Select Extension can access site data: Always
  • manifest@v3 doesn't support background.service_worker
  • chrome.runtime.sendMessage and related methods doesn't support Promise<Response>
  • chrome.tts doesn't work, could be handled by #58

PREREQUISITES

  • Go to about:config system page
  • Set extensions.manifestV3.enabled to true
  • Set xpinstall.signatures.required to false
  • You can now install MV3 extensions from about:debugging system browser page

Availability in firefox extensions store: (manifest@v2)
https://addons.mozilla.org/en-GB/firefox/addon/xtranslate-chrome/

Add to the README.md build section.

Hi. First of all thanks for the great extension.

I'm trying to use this extension from source code, but I'm not a web developer and I don't know how to compile TypeScript into JavaScript.

It'll be great if was build section in README.md.

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.