Coder Social home page Coder Social logo

schomery / dictionary Goto Github PK

View Code? Open in Web Editor NEW
87.0 87.0 30.0 1.34 MB

Dictionary Anywhere provides access to a floating multilingual Google Translate panel on any webpage.

Home Page: https://webextension.org/listing/dictionary.html

License: Mozilla Public License 2.0

JavaScript 77.97% CSS 4.78% HTML 17.25%

dictionary's People

Contributors

androplus-org avatar lopis avatar schomery 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dictionary's Issues

Causes 100% CPU usage on some pages

Steps to reproduce:

  1. Create a clean profile and install the addon.
  2. Go to for example: https://www.ebay.com/sch/Art-Posters/28009/ or do a search in an Ebay category without a search term.
  3. Wait a few seconds, note that CPU usage is less than 2%
  4. Click anywhere in a blank area of the page.

Expected results:
Nothing happens.

Actual results:
CPU usage goes to 100% in one core. This problem is not present when the addon is not installed.

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0

Reduce footprint/size

Good day, nice looking dict/translate extension!

However, the fonts are too large, and there is too much white-space between elements. It looks gorgeous, but it's just too big! I tried using Stylish to at least reduce the font-size in the original/translated text boxes, but I can't seem to find the correct namespace, the text stays the same size (I can easily use DOM Inspector to change the text size directly; I just need to find a way to make Stylish do it for me instead). Here is what I tried ->

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@-moz-document url("chrome://browser/content/browser.xul") {
TEXTAREA[class="orig goog-textarea"][id="source"] { font-size: 6pt !important;}
}

Can you assist? Or make two modes for people to chose from: Small Fonts and Large Fonts?

Thank you.
Best Regards,

Change text for direction offsets in settings

Currently it is: "This value can be either positive or negative based on the direction of the offset."

That should be replaced with explicit instructions, e.g., "Positive value for Y moves bubble to further down; negative value moves it further up."

I was playing around with the settings and became confused as to why a positive value of Y would lower the bubble rather than move it up; then I realized computer screen orientations start at the top left. Most people, when they see X-Y directions, would instead recall what they learned in their math class (where Y positive is up).

doesn't work with clearly preprocessed pages

Hi
I'm using firefox 39.0.3 with Clearly plugin 10.2.1.7.1 and Dictionary Everywhere 0.1.1
And in Clearly processed pages Dictionary's popup doesn't appear when I select a word

The popup is automatically closed while scrolling

The popup is too large and I have to scroll down to see the translation. But whenever I pressed "Down" or "PageDown" key, the popup disappeared, making the extension unusable.

Firefox 53.0a2
Dictionary (Google™ Translate) Anywhere 0.2.1

FEATURE REQUEST: Ability to enable only dictionary/definition function if language is the same as the default.

I use this add-on on Firefox often to find the definition of a word in English, rather than only for translations. It would be great to have a way whereby the add-on detects if the language is the user's default/native language and only provides the definition of the word, rather than a translation (which makes no sense if the translation is from, for example, English -> English) followed by a definition further down the iframe. This could be accomplished maybe either by a setting (user sets default/native language, or by hiding the translation part if the language detected is the same as the language to which a word is being translated.

Firefox 61.0.2, 64-bit
Windows 10

Translate selected text through context menu causes endless loop if text was selected by double clicking

The new feature #11 does not work correctly if text was selected by double-clicking on a word.

Firefox 56.0
Addon 3.5.0

Reproduction:

  1. Open e.g. https://fr.wikipedia.org
  2. Select a word by double-clicking on it
  3. Open the context menu and choose "Translate Selection"
  4. The Google Translator popup opens, but begins to flicker repeatedly. The add-on seems to make multiple requests in the background.

Sometimes this happens only when done a second time. Sometimes the Translator box doesn't open at all.

I could not reproduce it when text was selected without double-clicking.

Add an option to set default target language

I select translate.google.com as engine, when I click the icon, it always use English as default target language. Can this addon provide option to let user set default target language like "Chinese (zh_cn)" etc? Because select target language everytime is anonying.

I like your addon, it help me reading English web page a lot.

Blocks inline video playback

Once active, videos on sites like twitter.com would show as blank white spaces with no video controls.
100% this addon is the cause, I checked every one of my 59 extentions.

Make the panel scrollable indepedently of the page

It is often necessary to scroll down way past the part of the text that is translated, in order to read the panels content, especially for longer panels. That means one need to scroll way back up again, and sometimes in denser texts the start point can be a bit of a pain to find.

I propose that the panel is made scrollable in it self, so that it doesn't take the entire page with it if the cursor is within the panel area when scrolling action (whether by mouse or keys) is made. Conversely if the page is being scrolled the panel should stay put.

Error messages in browser console / Missing WebExtension context

Firefox 55.0.3 (64-Bit), Windows 7

These error messages appear in the browser console when clicking the floating translation button:

[Exception... "Must have a non-null string spec or nsIFile object"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: resource://gre/modules/ExtensionParent.jsm :: ProxyContextParent :: line 307"  data: no]  (unbekannt)
	ProxyContextParent resource://gre/modules/ExtensionParent.jsm:307:16
	ContentScriptContextParent resource://gre/modules/ExtensionParent.jsm:795:19
	createProxyContext resource://gre/modules/ExtensionParent.jsm:578:17
	receiveMessage resource://gre/modules/ExtensionParent.jsm:521:11
Error: WebExtension context not found! ExtensionParent.jsm:695:13

ALT+Click to activate translation box

Every time I select text the button appears. This is quite annoying to me. Could you insert an option to use ALT+Double click(or selection) to activate the button or directly the translation box? Thank you in advance

Doesn't work on firefox 53 (nightly)

Whenever I click the translate button, the pop-up window appears and disappears almost instantly.
Using the latest nightly with multiprocess on.

Edit: Turns out uBlock was blocking the window, everything works fine now

Translator scaling problem

The translator scaling bubble like 0.75 change the scale also of the web site.
This is annoying.
Last version + Firefox 57beta9 + Windows 10.

Crash, if you selecting too much text

Hello @schomery,
I have a bug for you, if you selecting a lot of text and send an request to translate the selection. The addon seems to crash.

It seems the addon sends permanent request to Google-Translate and it appears an Error message, that Google was not able to handle the request:

unbenannt

Translation:

The site with the adress translate.google.com reports:
We could not handle the translation request.

In this situation Firefox struggles and you must close the tab. Otherwise Firefox is unusable and crashes

Not saving language definition. Word not show up in insert box. Tested in Firefox and Chrome

Not saving language definition. Word not show up in insert box. Tested in Firefox Quantum (63.0 (64-bit)) and Chrome (Versão 70.0.3538.77 (Versão oficial) 64 bits).

1 - Select word
2 - Click in popup
3 - Word appear in language target (definition in English, not in Portuguese for example).
4 - If I switch in arrows 2 times, then the translation appears.

It was working previously.

image

In this case, I selected English (or Auto-detect) to Portuguese. But everytime open english - detected to english.

Click into panel closes panel

Since version 0.1.2 the floating panel will be closed when clicked into it (on mouse up event). This means it's impossible to change the language or copy the translation.

ISSUE: definitions do not show up if word is translated twice or more in a row

Example: translate a word using this extension and it will show the translation panel and the definitions panel. If you close the panel and then try to translate the same word again, only the translation panel will show up. The definition panel disappears.

If you click on a different word, the definitions panel will show up.

If you click on a different word and then back to the original word, the definitions panel will show up. So this issue seems to be only occurring if the same word is translated right after.

Unwnated injected code

The addon is adding some SVG with some styling that I breaking my page's layout. The culprit seems to be this code appended to the body:

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="width:0; height:0; visibility:hidden">	
			
	<!-- Protanopia filter -->
	<filter id="protanopia">
		<feColorMatrix type="matrix" values="0.1135	0.8905	-0.0019	0	-0.0021
		    	0.1130	0.8865	0.0002	0		0.0003
				0.0017	-0.0017	1		0		0
				0 		0 		0 		1 		0
			"></feColorMatrix>
	</filter>
	
	<!-- Deuteranopia filter -->
	<filter id="deuteranopia">
		<feColorMatrix type="matrix" values="0.2936	0.7096	-0.0015	0		-0.0017
				0.2923	0.7064	0.0006	0		0.0007
				-0.0231	0.0232	0.9999	0		0
				0 		0 		0 		1 		0
			"></feColorMatrix>	
	  </filter> 
	  
	<!-- Tritanopia filter -->
	<filter id="tritanopia">
		<feColorMatrix type="matrix" values="0.95 	0.05 	0 		0 		0
				0 		0.433	0.567	0		0
				0		0.475	0.525	0		0
				0		0		0		1		0
			"></feColorMatrix>
	</filter>
		  	
</svg>

This is causing an empty gap to show on my website and prevents me from doing my job properly. The addon should not affect website's layout when not in use.

Adding to bookmarks without login on referred page translate.google.com

Hello!
This is my best app for translating words. But could you improve it by adding a possibility to add each translation by bookmark button without moving to the original translation page? Now I need to login on the referred page on translate.google.com and it's not convenient to go back to the web-page. Maybe you need to add a possibility to authorize your extension as the application that using Google's API or make a magic with origin HTTP header.
Thank you!

Weird issue on ASUS forums

Hi,

I've discovered a strange issue:

If the extension is enabled, it adds a footer* on each messages posted on ASUS forums, see the first and third post here.

*Like this: title="Google Translator Anywhere" class="itanywhere-activator bounceIn" style="left: 184px; top: 4px; display: block;">

Using Firefox 55.0.3 x64 on Win 7 x64.

Can be reproduced each time I post a message there with the extension enabled. Text is not visible when posting or editing the message.

Firefox Reader View

I was struggling to find any gtranslate plugin after thorough research I found this plugin at last. Most of the time I need google translate in article and I read articles in Firefox builtin Reader view. And this plugin is simply not working on it. Can you please verify is it bug or configuration issue on my end?

Broken Github's project layout

Nice addon, I love the pop-in.
Unfortunately, using Firefox 45.0b1 github project/issues' pages are broken when enabling your addon. See screenshot below:

screen shot 2016-02-04 at 11 21 55

Simply disabling addon make pages works.

Error

Content Security Policy: The page's settings blocked the loading of a resource at self ("default-src *").

Aliasing issue and improvements

In general it is a nice Addon, but I think it would be better with some improvements.
It would be great if we have an option to choose between a floating button or an entry in the right-click menu. (example Translate Now) The floating button is in some situation annoying.
An abbilty to resize the witdh of the panel and a button to open the full Google Translate page would be nice too.

One issue is the aliasing text-font of the floating panel:

unbenannt

System:

  • firefox 41.0.2
  • Window7 64bit
  • Hardware Acceleration on

page load broken on some sites

On some webpages (notably ebay.com, ebay.de) with this plugin enabled, clicking on links does not lead to a rendered page. The URL bar gets the linked-to address, but only a force-reload will render the page.

Disabling the plugin restores expected behaviour.

System: Firefox 54.0.1 (64 bit) on Linux (Debian 9) (I can test on Windows 10 and Mac if required)

Steps to reproduce:

  1. Go to (for example) https://ebay.com
  2. Click on a link (e.g. "Daily Deals") at the top
  3. page does not load, but URL bar is updated
  4. reload page (e.g. Ctrl-R) - expected page is rendered.

This behaviour only occurs if the plugin is enabled.

Add-on does not find text to translate on a Firefox Add-on comments page

Hi, thank you for this work, as it seems a worthy replacement for gTranslate from pre-v57 Firefox days and I like the bubble UI.

I happened to notice that this add-on does not appear to recognize selected text to translate on this page:
https://addons.mozilla.org/en-US/firefox/addon/quick-dial/reviews/

For example, I tried selecting portions of non-English text from these comments on that page:

Спасибо за это дополнение!)) Раньше с удовольствием пользовалась Fast Dial, была от приложения в полнейшем восторге! В этом приложении, к сожалению, отсутствует возможность настройки для всех окон "открывать в новой вкладке" - неудобно каждый раз входить в меню. так же не нашла функцию "обновить все закладки". И вообще, настройки в Fast Dial были гораздо понятнее и удобнее. Возможность сделать фон конечно приятна, но гораздо важнее иметь возможность легко и быстро менять закладки местами, открывать все в новой вкладке и обновлять все автоматически.

En remplacement de Speedial qui n'est plus supporté, fait la même chose, j'ai réussi a refaire mon écran d'accueil avec mes icônes.
J'aimerais juste pouvoir choisir la hauteur des tuiles.

But, the bubble didn't appear and when I enabled the right-click menu selection, selecting that option to translate the text resulted in no visible action.

Interestingly, if I try the same action in this github page for the same text as pasted above, this add-on works as expected.

Suggestion for Small Improvements

I just tested it and found it almost perfect !

Could it be possible to have the Floating Panel re-sizable and being able to move it ?

I'd really like also to have an option to make the panel appear in the bottom right side of the screen, this way it would not overlap text and would be not in your way when you translate often.

BTW: what is this option ?
http://i.imgur.com/F2fHTJo.png

Best Regards 😊

[Request] Allow remapping hotkey

Currently, the only hotkey available is ALT+Selection, it would be great to be able to change it (i.e. to Control).

Thank you for your hard work!

adds a code in your wysiwyg editor

Adds a code into the page without your knowledge when you editing a page in Wordpress / Joomla / Drupal.

example code:
<div class="itanywhere-activator" style="left: 330px; top: 62px; display: none;" title="Google Translator Anywhere">&nbsp;</div>

[Request] Showing popup on mouse-over, not on click

I want to have a option for mouse-over mode to look up a word (not phrase).
the translation panel appears when hovering the mouse over a word.
and it's better to enable/disable mouse-over mode on toolbar icon.

great add-on!
thank you.

Save translation to Google Translate's Phrasebook?

Hi. I'm not sure if it's a bug or intended behaviour, but it would be pretty helpful if the extension could allow us to add translation to Phrasebook directly through floating panel (star icon on image below).

image

Currently it does nothing on click.

Firefox 57.0

Thank you for great extension.

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.