Back

Yomichan (JP dictionary for Chrome/Firefox + EPWING + auto flashcards)

(2017-02-27, 1:49 pm)FooSoft Wrote: I don't have any sort of a way to control when people get extension updates (the screenshot you are looking at is the work in progress Firefox port). After I upload an updated release it shows up on the storage page in a couple of hours, and after that the update just trickles down to individual users whenever Google feels like it.

I usually don't spam updates that often, but I had more time to work on the extension this weekend, so it just kind of happened that way :\

I understand that you can't do anything about this. I can be annoyed at Google, edit the config file to block updates and edit it back when I want an update, or install from source (which I might do anyway at some point).


Quote:The orange exclamation mark exists to show people that they need to take action to install and/or enable dictionaries before search will work. Clicking on the button now opens the options page where users can do this. I basically got tired of people not RTFMing and wondering why the extension doesn't work (I explain things in the page that pops up when you first install the extension, but I guess people don't really read that).

Whether it was a bug or my own fault, I wasn't expecting my dictionary to become disabled. And I didn't find anything on the website or the GitHub readme about what an orange exclamation mark means. I clicked it and the options opened, but the first time I looked through the options, I didn't notice anything wrong with them.

How about doing something similar to the "Yomichan updated" popup? I mean, if the user tries to scan text with no dictionaries, make the popup appear saying "you need to install/enable a dictionary".
Edited: 2017-02-27, 3:38 pm
Reply
Installing from source is definitely a valid option (master branch is always stable), with the downside that if you are running on Windows, Chrome will ask you if you want to turn off manually installed extensions every single time you restart the process.

I wouldn't expect your dictionaries to become disabled either... I just looked over the code again and couldn't find a plausible way for that to happen. Do you maybe have Yomichan installed on several computers where one of them does not have dictionaries installed? Options sync but dictionaries do not, so maybe that is what caused the problem? Regardless, your idea of displaying a popup seems reasonable, assuming that the user knows enough about the extension to press shift while mousing over text. Maybe I can do both...

Documentation is always a work in progress and unfortunately often lags behind features. Yomichan is a project that revolves about my love for open source development, but no so much about my love (or lack thereof) of technical writing. In the ideal world I would have other people helping document functionality, tweak UI layout and so on, but realistically that will probably never happen.
Reply
I'm mostly using Fedora. I installed Yomichan on Windows for testing, but it hasn't been booted up for a few days, so that can't be related. Unless the dictionary becomes disabled again (or for somebody else), I guess we can assume I did it by accident.

I also lost the Anki Options again, a day or two before that.

How complicated is installing from source, for a developer who doesn't know much about Chrome extensions (or about the other things in the readme's "For development" list)?
Reply
JapanesePod101
Yeah, I'm kind of at a loss about what is happening with the settings -- it sounds pretty annoying though. If stuff like this keeps happening, could you PM me the exact settings that where reset and when it happened? That would probably be our best bet for trying to narrow down what is happening through observation since I can't see any problems with the code itself.

Running the extension from source is pretty simple:
1. Clone the repository with git (make sure to init and pull submodules).
2. Open the chrome extensions page
3. Enable developer mode.
4. Click "Load unpacked extension".
5. Select the "ext" directory from the source root.
Edited: 2017-02-27, 6:03 pm
Reply
Is there a reason that clicking the extension icon now opens the options instead of disabling it?
Reply
(2017-03-01, 10:47 pm)xtreme1 Wrote: Is there a reason that clicking the extension icon now opens the options instead of disabling it?

Consistency with Firefox port (right click doesn't do anything) and the fact that a lot of people don't know how to right click.

I'm working on a popup UI that (along with other features) will feature a better way to do toggle the extension without opening options.

[Image: wqQ1gsy.png]
Reply
(2017-03-02, 12:40 am)FooSoft Wrote:
(2017-03-01, 10:47 pm)xtreme1 Wrote: Is there a reason that clicking the extension icon now opens the options instead of disabling it?

Consistency with Firefox port (right click doesn't do anything) and the fact that a lot of people don't know how to right click.

I'm working on a popup UI that (along with other features) will feature a better way to do toggle the extension without opening options.

[Image: wqQ1gsy.png]

wouldn't it be sufficient to add a simple "disable" line to the existing popup?
Reply
The options page has a "Enable search" checkbox all the way at the top. This checkbox controls whether or not definition lookups happen.
Reply
(2017-03-02, 12:40 am)FooSoft Wrote:
(2017-03-01, 10:47 pm)xtreme1 Wrote: Is there a reason that clicking the extension icon now opens the options instead of disabling it?

Consistency with Firefox port (right click doesn't do anything) and the fact that a lot of people don't know how to right click.

I'm working on a popup UI that (along with other features) will feature a better way to do toggle the extension without opening options.

[Image: wqQ1gsy.png]

Thank you. I understand the decision, but the revised behavior is less than ideal. There are many times (the most significant being when I'm typing Japanese into a text box) that having Yomichan enabled creates all kinds of havoc. Having a quick way to disable and re-enable it is vital.
Reply
I actually believe the whole notion that you have to keep on enabling and disabling the extension in order to keep it from getting in your way is a backwards way of thinking about it. I agree that Yomichan may not (in the current form) be in a state where you can just leave it on and have it never get in the way, but we should work towards that as opposed to streamlining the enable and disable workflow.

For the text box input issue, I already tried to address it by requiring mouse movement for dictionary lookup (instead of just triggering immediately with shift keypress). Would your problem be solved if the modifier could be optionally shifted to Ctrl or Alt or something?
Edited: 2017-03-02, 1:30 pm
Reply
(2017-03-02, 1:26 pm)FooSoft Wrote: I actually believe the whole notion that you have to keep on enabling and disabling the extension in order to keep it from getting in your way is a backwards way of thinking about it. I agree that Yomichan may not (in the current form) be in a state where you can just leave it on and have it never get in the way, but we should work towards that as opposed to streamlining the enable and disable workflow.

For the text box input issue, I already tried to address it by requiring mouse movement for dictionary lookup (instead of just triggering immediately with shift keypress). Would your problem be solved if the modifier could be optionally shifted to Ctrl or Alt or something?


Ahhh, I've actually noticed that new behavior (popup only on mouse movement) in a different context. Let me use it for a while with Yomichan turned on and see if there are still cases where it interferes. Given this behavior, it should only be an issue whenever I brush against the touchpad while also pressing Shift over a word or set of characters that cause a Yomichan pop-up; that should be a rare circumstance.
Reply
(2017-03-02, 1:26 pm)FooSoft Wrote: I actually believe the whole notion that you have to keep on enabling and disabling the extension in order to keep it from getting in your way is a backwards way of thinking about it. I agree that Yomichan may not (in the current form) be in a state where you can just leave it on and have it never get in the way, but we should work towards that as opposed to streamlining the enable and disable workflow.

For the text box input issue, I already tried to address it by requiring mouse movement for dictionary lookup (instead of just triggering immediately with shift keypress). Would your problem be solved if the modifier could be optionally shifted to Ctrl or Alt or something?

My issue with ctrl, alt, and especially shift is that I use them all way too much. One-key hotkeys are too general for me. If I still wanted to use it as a single button press I could use a dedicated key mapped to the unique hotkey. Having a listener to pick up the users hotkey choice would be ideal. Whenever I use it on a touch device I don't have a choice though, and just have to leave the hotkey option off.

My anki note settings got erased with the last update. But the non-advanced settings, like that I don't use the shift key, are still remembered.
Reply
New version 1.1.0 released. Here are the changes:
  • New browser action menu for easily accessing options, the Yomichan homepage, and the new standalone search feature.
  • New standalone search feature which makes it easy to type in expressions you wish to search for.
  • Don’t display the “Yomichan Updated” dialog for users who don’t have the “Hold shift to scan” option set.
  • Added a checkbox to disable middle mouse button scanning.
  • Better priority option visualization for dictionaries (higher priority dictionaries show up at top).
  • Options should no longer get screwed up between versions (this is the first version with the fix, so you may have to reset your settings one more time).
  • Assorted bugfixes.


[Image: 4f4u6Udl.png]
Edited: 2017-03-05, 7:40 pm
Reply
Added better instructions for how to use this on Firefox. The Firefox port is ready!
Reply
(2017-03-05, 10:08 pm)FooSoft Wrote: Added better instructions for how to use this on Firefox. The Firefox port is ready!

Thank you! I was really eager to try this one! Installing as I write.

If I like it (as I'm sure I will) and you need help localizing it to Spanish, PM me ;-)
Reply
LOVE the new Search page! The ability to just look up a word and add it directly to Anki is awesome. Thank you!!

EDIT: Hmm, actually, while the Plus buttons for add to Anki do appear next to definitions in the Search page, clicking one doesn't do anything for me in Chrome. A spinner appears in the bottom right corner and spins eternally. The word is never added to Anki. (Adding from the pop up to Anki works fine.)
Edited: 2017-03-06, 12:16 am
Reply
(2017-03-06, 12:06 am)gaiaslastlaugh Wrote: LOVE the new Search page! The ability to just look up a word and add it directly to Anki is awesome. Thank you!!

EDIT: Hmm, actually, while the Plus buttons for add to Anki do appear next to definitions in the Search page, clicking one doesn't do anything for me in Chrome. A spinner appears in the bottom right corner and spins eternally. The word is never added to Anki. (Adding from the pop up to Anki works fine.)

That is very strange... I just verified that the search page works correctly on my main Linux machine as well as a fresh install of Windows XP. Adding flash cards from the popup also uses the same code path as the search page, so I don't know why it would work in one place but not the other. Could you make sure that you are running the latest version of AnkiConnect and maybe try restarting Anki as well? I'm pretty confident that it should be working correctly.

If you are still having problems, we can do some more troubleshooting Smile
Reply
(2017-03-06, 1:09 am)FooSoft Wrote:
(2017-03-06, 12:06 am)gaiaslastlaugh Wrote: LOVE the new Search page! The ability to just look up a word and add it directly to Anki is awesome. Thank you!!

EDIT: Hmm, actually, while the Plus buttons for add to Anki do appear next to definitions in the Search page, clicking one doesn't do anything for me in Chrome. A spinner appears in the bottom right corner and spins eternally. The word is never added to Anki. (Adding from the pop up to Anki works fine.)

That is very strange... I just verified that the search page works correctly on my main Linux machine as well as a fresh install of Windows XP. Adding flash cards from the popup also uses the same code path as the search page, so I don't know why it would work in one place but not the other. Could you make sure that you are running the latest version of AnkiConnect and maybe try restarting Anki as well? I'm pretty confident that it should be working correctly.

If you are still having problems, we can do some more troubleshooting Smile

I gave Windows 10 the three-finger salute, and everything works fine on reboot. Sorry for the false alarm. Smile
Reply
Yomichan is good. I love it.
But I have one little problem.
I was testing it with only the kanji dictionnary enabled.
But when I do that it shows only the first kanji I scan and stick to that one.

Also that would be great to be able go back and forth between dictionnaries on the fly.
I think rikaichan do that with the space/enter shortcut.
Or at least a button to go back to the main dictionnary without closing the result window each time.

thank for reading.
Reply
I second the request to cycle through dictionaries (words <--> kanji). Maybe with the same modifier (shift) key? Also, while the pop-up is open, being able to
  1. close it
  2. jump to the next text segment
  3. then reopen it
by means of a single keypress (with tab, perhaps) would be really great.

Loving the Firefox port, by the way! ;-) (but I am not using Anki yet with it, so can't tell if/how well it works).
Reply
Feature request: Can the Yomichan Search page handle multiple words like Jisho.org does? In Jisho, if I input text with multiple words, it parses the string out to the best of its ability and provides links to the definitions of various words (e.g., see http://jisho.org/search/%E5%86%85%E9%9D%...D%E7%AA%81).

It's not a full proof algorithm by any means, but it helps especially when pasting in words that may or may not be 四字熟語.
Reply
(2017-03-06, 9:07 pm)gaiaslastlaugh Wrote: Feature request: Can the Yomichan Search page handle multiple words like Jisho.org does? In Jisho, if I input text with multiple words, it parses the string out to the best of its ability and provides links to the definitions of various words (e.g., see http://jisho.org/search/%E5%86%85%E9%9D%...D%E7%AA%81).

It's not a full proof algorithm by any means, but it helps especially when pasting in words that may or may not be 四字熟語.
What about a search with wildcards? 内?衝突 or 油断*
Reply
(2017-03-06, 8:45 pm)faneca Wrote: I second the request to cycle through dictionaries (words <--> kanji). Maybe with the same modifier (shift) key? Also, while the pop-up is open, being able to
  1. close it
  2. jump to the next text segment
  3. then reopen it
by means of a single keypress (with tab, perhaps) would be really great.

Loving the Firefox port, by the way! ;-) (but I am not using Anki yet with it, so can't tell if/how well it works).

Why do you want to search for Kanji as opposed to words? The definition for the Kanji will appear if there are no words that use that character, and if words are found you can simply click on the individual characters if you want to get more information about them. I guess I'm just trying to understand your usage pattern -- I've always thought of Yomichan as a reading assist tool.

(2017-03-06, 9:52 pm)Matthias Wrote: What about a search with wildcards? 内?衝突 or 油断*

It doesn't look like IndexedDb supports wildcards, but I will look some more: http://dexie.org/docs/WhereClause/WhereClause.html

(2017-03-06, 9:07 pm)gaiaslastlaugh Wrote: Feature request: Can the Yomichan Search page handle multiple words like Jisho.org does? In Jisho, if I input text with multiple words, it parses the string out to the best of its ability and provides links to the definitions of various words (e.g., see http://jisho.org/search/%E5%86%85%E9%9D%...D%E7%AA%81).

It's not a full proof algorithm by any means, but it helps especially when pasting in words that may or may not be 四字熟語.

Yeah, I can play around with that. The search page doesn't have to be as fast as the popup dialog so we can get away with doing many more queries without things starting to lag.
Edited: 2017-03-06, 10:30 pm
Reply
Yeah, it's not a critical use case, but when you press on a kanji link while reading a word's definition, there's no way of going back to the definition unless I close the pop-up and scan the word again. Even if you don't add a hotkey for that, a "< go back" link in the kanjidict would be useful for this.
I hope this explanation makes it clearer.

(Edit: Are you by any chance mixing me up with a previous poster who really looked up individual kanji? I don't, and I agree that use case would be infrequent)
Edited: 2017-03-06, 10:34 pm
Reply
(2017-03-06, 10:31 pm)faneca Wrote: Yeah, it's not a critical use case, but when you press on a kanji link while reading a word's definition, there's no way of going back to the definition unless I close the pop-up and scan the word again. Even if you don't add a hotkey for that, a "< go back" link in the kanjidict would be useful for this.
I hope this explanation makes it clearer.

I like the idea of adding a back button, I think it's more natural than swapping back and fourth between dictionaries (pretty sure it just had to be done this way in Rikaichan because the popup was not interactive).

Just released a small update that fixes some annoyances of 1.1.0:
  • The search page will no longer show error dialogs when trying to execute a search when Anki integration is enabled but Anki is not running in the background.
  • Anki settings will no longer be lost when settings on the options page are modified when Anki integration is enabled but Anki is not running in the background.
For the next version I think I will make a pass on adding various keyboard shortcuts, so if there are any suggestions (in addition to those listed), please let me know!

(2017-03-06, 10:31 pm)faneca Wrote: (Edit: Are you by any chance mixing me up with a previous poster who really looked up individual kanji? I don't, and I agree that use case would be infrequent)

Hah, yeah I kind of got stuck on the Kanji thing Wink

In your suggestion, what do you mean by "jump to the next text segment"? Do you mean just tracking text forwards (and perhaps backwards) using the keyboard? Kind of like for mouse-free reading?
Edited: 2017-03-06, 10:52 pm
Reply