Giter Site home page Giter Site logo

artemave / translate_onhover Goto Github PK

View Code? Open in Web Editor NEW
202.0 11.0 56.0 1.29 MB

Browser translation extension

Home Page: https://chrome.google.com/webstore/detail/aggiiclaiamajehmlfpkjmlbadmkledi

JavaScript 79.79% HTML 18.06% Shell 1.87% Vim Script 0.28%
extension-chrome firefox-extension

translate_onhover's Introduction

Chrome Web Store License Test endpoints

Simply the best Google Chrome translation extension - https://chrome.google.com/webstore/detail/aggiiclaiamajehmlfpkjmlbadmkledi

Firefox version: https://addons.mozilla.org/firefox/addon/transover-ff/

Edge version: https://microsoftedge.microsoft.com/addons/detail/transover/jocggnbbgpaaphngnlccmhgbjffgnjda

Run local version

You'll need a terminal and NodeJs. Then clone/download this repository.

In the project directory, install dependencies (run this in a terminal):

npm install -g yarn
yarn install

Then build:

TRACKING_ID=1234 yarn build

Where TRACKING_ID is some Google Analitycs tracking id.

Now you can "Load unpacked" the ./dist folder.

Development

In addition to the above, there is yarn dev. For as long as it is running, dist will stay updated with code changes.

translate_onhover's People

Contributors

artemave avatar dotdioscorea avatar gitoffthelawn avatar guy1524 avatar leifdenby avatar s1r-lanzelot avatar santosoj avatar taupiqueur avatar wofwca avatar yamanq 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  avatar  avatar

translate_onhover's Issues

Deprecation warnings in Chrome

popup.js:40 [Deprecation] document.registerElement is deprecated and will be removed in M73, around March 2019. Please use window.customElements.define instead. See https://www.chromestatus.com/features/4642138092470272 for more details.
(anonymous) @ popup.js:40
(anonymous) @ popup.js:41
tat_popup.js:10 [Deprecation] Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.

image

When translation is only shown with Alt pressed, must move mouse after pressing Alt

If I have selected "Only show translation when I hold the 'alt' key" (by the way, that would be better written "Only show translation when Alt is pressed"), then if I point at a word, let go of the mouse, and press Alt, no translation is shown. I have to first move the move again after pressing Alt. It should work if I just press Alt while already pointing at a word.

Copy translated text with shortcut

When a text is translated, I try to copy it to save on my notepad. But when there is no such option, I have to write the text translated by transover in Notepad.

My suggestion is to apply a shortcut (CTRL + Y) language in javascript, where copying a translated text in "transover-tooltip" class element.

Any idea will be appreciated.

Перевод выделенного текста при удерживании alt.

Перевод одного слова через alt по клику и наведению работает нормально, однако при выделении текста или фразы показывается лишь сокращённый перевод (например put down - опустить), что неудобно. Нельзя ли это унифицировать?

BUG: drops user selection

first time it translates word in a block of text. So, presumably, it happens when it wraps words in

Mix original text and translation for block translation

Hey, I really like your transover translation extension for chrome.
I was thinking of an idea, and perhaps you would know how to do it... I am trying to learn a new language, and I think it would be great to show translation in small text right above the original. I will show you an example:

Orignal Text:

“TODA persona tiene derecho al trabajo”, según la Declaración Universal de Derechos Humanos, elaborada por las Naciones Unidas. Sin embargo, esta prerrogativa no está siempre garantizada. La estabilidad del empleo depende de múltiples factores, entre ellos, la prosperidad de las economías nacionales y la condición del mercado mundial. Con todo, cuando se pierden puestos de trabajo o existe tal amenaza, en la mayoría de los países la gente reacciona con manifestaciones, desórdenes callejeros y huelgas. Hasta la misma palabra “‘trabajo’ —dijo unescritor— posee, desde siempre, una gran carga emocional”.

As could be shown in browser.
All person has right to the work, according to the declaration universal of
“TODA persona tiene derecho al trabajo”, según la Declaración Universal de
rights humans, developed by the nations united. However this
Derechos Humanos, elaborada por las Naciones Unidas. Sin embargo, esta prerrogativa no está siempre garantizada. La estabilidad del empleo depende de múltiples factores, entre ellos, la prosperidad de las economías nacionales y la condición del mercado mundial. Con todo, cuando se pierden puestos de trabajo o existe tal amenaza, en la mayoría de los países la gente reacciona con manifestaciones, desórdenes callejeros y huelgas. Hasta la misma palabra “‘trabajo’ —dijo unescritor— posee, desde siempre, una gran carga emocional”.

The extension causes website's elements' text to get duplicated sometimes

Reproduction:

  1. Enable click-to-translate in the extension options
  2. Go to a SPA website. (e.g. https://popper.js.org/docs/v2/, https://youtube.com)
  3. Click some text element (e.g. a paragraph, a header) (page header, "Documentation" in our example).
  4. Navigate somewhere, but so that that element remains on the destination page (the same page, "v2.x" in our example. Just click on the active link again).

image
image

The clicked element's text is duplicated. Can be repeated.

Environment

Chrome 81.0.4044.138 x64
Win 10

Additional info

I'm sure it's this extension, I've disabled every other one.

On https://youtube.com, you can go to any video, then click its title, then go to any other video in the right column.

Another small reproduction example:

  1. Enable point-to-translate.
  2. Go to https://popper.js.org/docs/v2/tutorial/#functionality
  3. Hover over the My Button text, wait for the translation popup to appear.
  4. Hover off the button.
    image

Also works with point-to-translate. Just wait for the translation popup to appear, then click.

I see there's some funky markup manipulation stuff going, I think we need to look in this function:

function getHitWord(e) {

Non secure origins warning in Chrome DevTools

Hey guys (great extension by the way!)

Nothing serious, just a minor warning that's a bit annoying:

When checking the "Security"-tab/-panel in Chrome DevTools, your chrome-extension produces a "non-secure origin"-warning (concerning https/ssl)

Origin
chrome-extension://aggiiclaiamajehmlfpkjmlbadmkledi
Not secure
Your connection to this origin is not secure.

Cheers,
Mayinx

Support pop-up in extension tab (like Google Translate)

Please add capability to bring up the pop-up with a shortcut from ANY tab (including another extension). Currently, pop-up isn't brought up from within another extension tab. This is possible and works in Google Translate extension.
With this feature and using AHK it will be possible to use Transover in pdf files.
Thx

Translation in links

Hi,
Thank you for this super useful and great application. I am using it with the Translate-on-click option. However, I would like to have it work on links without clicking (without opening the link). Would this be somehow possible?

Integration with translation history service

Hi,

First of all, thanks for all the development work you guys did! It's an awesome extension I use everyday.

As I generally try to learn words I do not know, I would really appreciate to see the history of the words I've searched for in the past and ability to repeat/train their meanings. I did some research and it seems there is no such a tool except readlang.com which has its own extension. The extension is not really usable to be honest - you can check it out here: https://chrome.google.com/webstore/detail/readlang-web-reader/odpdkefpnfejbfnmdilmfhephfffmfoh

For that reason I was thinking to build a tool by myself and integrate it with your chrome extension. I would see this as an additional setting in your TransOver options where you would connect the TransOver with the "history tool" and that would be it. From that time on, anything you would search for would be also logged in the "history tool".

Now, in terms of the development of that integration, I am happy to do the development by myself and just send you a pull request. Before doing any work on this, I thought to check with you guys whether you would be open to this integration at all or not.

Happy to hear your thoughts! Thanks a lot!

Change translate apı url

Hi, I am using v1.44 and the extension does not work when I connect to internet with vpn extension on Chrome. I guess you need to change apı url because this issue occurred on v1.42 and you solved it using this method. Thanks.

No translation for native language website

Hello,

I think another option should be added to select when the extension should not be enabled for a language. I even think it could be interesting to be able to select several languages we don't want to translate. I understand we can select the "only show translation word when i click xxx" option, but maybe my proposition could be another alternative.

For example, I am French, I don't need to translate words on a french website.

What's your opinion ?

Thank you.

TransOver isn't working anymore.

Hi, I really appreciate your work and I love this extension, but a couple days ago it's stopped working.I tried changing the setting, reinstalling and installing older versions but nothing helped.

Reverse translate don't work

Всегда 'Oops... No translation found'
Настройки:
Translate into Russian
Reverse translate to English
и наоборот тоже

Перевод через контекстное меню.

Было бы очень хорошо добавить возможность перевода через контекстное меню Chrome - это гораздо удобнее необходимости удерживания Alt.

Show autodetected language

Some people get tripped over by autodetect wrong guessing the source language.

To remedy that, it'd be nice to show detected source language somehow (maybe popup background watermark)?

Firefox support

Hi, the only thing I truly lack when using Firefox, compared to Chrome is Transover - a truly awesome extension.

I tried about 20 alternatives, and they all are waay behind.

Please consider porting it.

Перевод pdf

Можно как-то переводить текст в pdf файле из встроенного плагина или из расширения типа pdf.js?

ПС Есть переводчики, кототые позволяют это сделать через контекстное меню.

FEATURE: configurable input language

make input language configurable (as opposed to implicit autodetect only). This should increase the quality of translations for those who mainly stick to one foreign language

Опция перевода по двойному щелчку

Те варианты что есть сейчас, по наведению и по клику довольно непривычные, было бы чудесно иметь возможность выбрать старый добрый даблклик.

Text to speech doesn't work since new update

When I first installed this extension (probably 2 weeks ago), text to speech was working fine. It doesn't work right now (no speech voice upon pressing control when popup shows up).

Here are my settings
xASMg83R1N

doesnt register numbers like 1234

Looking at console, it seems to get numbers not always.
image

I am set to hoover-over, not click.
Words light up normally, but hoovering over a number like 1234 doesnt "hit".
If I click and highlight the number it works, but then it gets stuck just registering the hightlighted number forever until I unhighlight it.

No biggie, but I am more interested in numbers sometimes....

Q: Where is your tip jar??

TTS глюченый

Искал просто TTS, а нашел отличную замену стандартному hover-to-translate от гугла.
К сожалению, но TTS оказался глюченым - при удерживании клавиши активации TTS гугл-чувак начинает повторять выделенную фразу снова и снова, пока не выключишь сие расширение. Количество повторов, кажется, растет со скорость, с которой любая клавиша в Windows повторяется в нажатом состоянииииииииииииииииииииииииииииииииииииииииии - очень быстро.
Был очень удивлен тем что данный баг до сих пор не был обнаружен. Пожалуйста, исправьте.

Плавное появление не Ок

Из за плавного появления впечатление что работает медленне чем на самом деле.
Живой пример

Тот же Google Dictionary появляется с задержкой, но без плыного появления, и по ощущениям он работает быстрее.
Маковский словарь с длинноватой анимацией появления, но все же лучше медленного проявления из прозрачности.

Еще Бирмин в блоге про обратную связь.

Translations in PDF

Hi, i just used this extension and it works really good.
One thing just popped out, i can't see translations when opened pdf file in chrome and hover over the text. Is it a bug or it just can't be supported ?
Kind regards

I am taking "the extension may have been corrupted" warnings

Hi, I am taking "the extension may have been corrupted" warnings on Chrome nowadays. I activated the "collect errors" option on the extension page. How can I share these errors with you? I do not know it because I am just a basic pc user. Thanks.

Easy fix for bug in Chrome on windows 8.1

Got this error:

Error in event handler for (unknown): SyntaxError: Unexpected end of JSON input
at Object.TransOver.deserialize (chrome-extension://aggiiclaiamajehmlfpkjmlbadmkledi/lib/transover_utils.js:11:16)
at chrome-extension://aggiiclaiamajehmlfpkjmlbadmkledi/contentscript.js:294:41

I think it's related to a bug in lib/transover_utils.js (line 15):

WHERE IT SAYS:

if (e.toString().match(/SyntaxError: Unexpected (token|end of input)/)) {

IT SHOULD SAY:

if (e.toString().match(/SyntaxError/)) {

Hope that helps,

Cheers!

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.