FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.06k stars 213 forks source link

Passing only first dictionary definition (glossary) to Anki #926

Closed Radmir2015 closed 3 years ago

Radmir2015 commented 3 years ago

When I set everything around Anki up, the first cards saved perfectly with all of the definitions from multiple different dictionaries, but after while (probably after the word with only one definition from one dictionary has met) it changed to "one first dictionary mode".

I didn't catch the moment when it started, but after that all my new cards stopped containing the whole list of definitions (only the first (entry) dictionary).

Only after I restarted a browser, it started working as usual.

Example, image

Also, a small extra question, why if I add a word to a new anki deck and this word is already in some else different deck, when I click "view added note", it's showing me note from other (maybe from first found or earlier added) deck. I started doubting if the note was added to my new deck. Why it is not showing the right one note?

toasted-nutbread commented 3 years ago

For the first question: Can you export your settings (at the bottom of the settings page under the "Backup" heading) and share that file here? I am not able to reproduce the issue with some quick testing; is there a way you have been able to reproduce this issue?

For the second question: Go to the settings page, enable "Show advanced options", and then change "Duplicate scope" to "Deck" (under the heading "Anki Options"). See if that fixes your issue.

By default, Anki checks if the card already exists globally, so this check has to be overridden using the "Duplicate scope" setting.

Radmir2015 commented 3 years ago

Thanks, I will try to reproduce one more time. Maybe it happened because I changed the card's template a lot of times "on the fly".

About second question, it worked but only if I had only one big deck, because I have already 3 subdecks. Yomichan shows me that I don't have that word added in Anki, but it's already in another subdeck. It makes duplicates. If I set duplicate scope to "collection" it's not showing me words that's already in some decks that I downloaded before, but showing if I added it using anki-connect (so it's almost right expected behavior). Maybe it should search in the main deck (it should traverse from all subdecks back to main one I think). yomichan-settings-2020-10-17-12-26-39.txt

toasted-nutbread commented 3 years ago

The issue may be because you are using sub-decks; I have not used sub-decks before, so maybe those are handled differently and I'll have to mess around a bit with it to see. Would you be able to share what your deck layout in Anki looks like so I can base my testing off that? (A screenshot will do)

Radmir2015 commented 3 years ago

It looks like this. You just create new deck and drag it under another one to make it subdeck. I also learned about this recently. But I need subdecks to split all unknown words from the whole manga to manga's parts. image

toasted-nutbread commented 3 years ago

And just to clarify, would you expect it to work in the following way? Assuming Yomichan is set up to add cards to Main deck::Part 1.4 (the sub-deck):


Compared to how it works currently:

or

Radmir2015 commented 3 years ago

If the term already exists in any part of Main deck (including all the sub-decks), the card would not be addable.

Exactly. I think there should be another Duplicate scope value for that (like sub-deck level, root-deck level and all decks level).

I don't see it like addable or not, but I see it more like already added or not. I mean it would be great (considering Duplicate scope = Deck) if I'm now in another deck, I can see that it's already added in another deck (I can view added node) and with that in mind I still have adding button (for another sub-deck). Something like that maybe. But I'm sure because even Anki shows me second added term (to another sub-deck) as dublicate, highlighting it red like error.

toasted-nutbread commented 3 years ago

Cool, thanks. I'll see if I can work in some updates to the Duplicate scope feature.

As a secondary feature (longer-term), the ability to force-add a card may also be a good idea.

toasted-nutbread commented 3 years ago

955 adds support for a new duplicate scope option Deck root, which should work for your use case. It depends on https://github.com/FooSoft/anki-connect/pull/203, which is not yet merged/released, but if/once that is ready, it should work.

Leaving this issue open until that PR is resolved.