Giter Site home page Giter Site logo

Comments (14)

Rascalov avatar Rascalov commented on August 28, 2024

Welcome to the repo!
If I understand you correctly, depending on the deck you want to add flashcards to, the target language used to search would be different?
image
I currently only set the default target language to the one that was last used. I can see why your suggestion would be useful for people that learn multiple languages.

However, doing this would require a unique property on the deck that the Forvo addon would be able to identify and link to a language. Maybe a language code inside the deck's name (e.g.: "[ru]MyDeck").
Currently I don't use or interact with the deck in this function, so I would need some time to figure the best way to do so.
The downside of this approach, is that it would require users to edit the names of their decks to contain or (preferably) start with a language code.

Let me know your thoughts on this.

from anki-simple-forvo-audio.

ONEsuzuki avatar ONEsuzuki commented on August 28, 2024

from anki-simple-forvo-audio.

Rascalov avatar Rascalov commented on August 28, 2024

Interesting, I did not know a deck description existed, thanks for the heads up.
From that, I can kinda imagine the flow:

  1. Get the current deck you're adding cards to
  2. if the description has a language code in brackets, it will select the associated language
    2a. if not, after the first audio insertion, add the target language's language code to the description if the same language code is not already present in the description.

Should not be too hard if I can access the deck from the audio search menu, I might push an update for it today. Let me know if I missed anything in the flow

from anki-simple-forvo-audio.

ONEsuzuki avatar ONEsuzuki commented on August 28, 2024

from anki-simple-forvo-audio.

Rascalov avatar Rascalov commented on August 28, 2024

It is done, I have added a setting as shown below that will set the language code in the description of the deck you add cards to.
If you have added an audio, it tags your deck with the language you chose while adding that audio.
Let me know if it works as you imagined. You can update the extension by getting the addon code on the site or cloning the repository to your addon directory.

image

from anki-simple-forvo-audio.

ONEsuzuki avatar ONEsuzuki commented on August 28, 2024

from anki-simple-forvo-audio.

Rascalov avatar Rascalov commented on August 28, 2024

Very good, let me know if it works as intended for you, after confirmation I can close this issue as resolved

from anki-simple-forvo-audio.

ONEsuzuki avatar ONEsuzuki commented on August 28, 2024

from anki-simple-forvo-audio.

Rascalov avatar Rascalov commented on August 28, 2024

Does this happen when you edit cards in the browse menu?
Could be that the current deck is not correctly selected in that menu. I will have to fix that in any case

from anki-simple-forvo-audio.

Rascalov avatar Rascalov commented on August 28, 2024

I pushed out an update for editing the card in the browse window, I think this caused issues as it would update the last deck you added cards to, and the Browse editor does it on a card by card basis.

Please update your Anki and check if the issue is resolved

from anki-simple-forvo-audio.

ONEsuzuki avatar ONEsuzuki commented on August 28, 2024

from anki-simple-forvo-audio.

ONEsuzuki avatar ONEsuzuki commented on August 28, 2024

More just thinking about this for languages with multiple dialects, then you wouldn't have to switch it by hand in the menu.

from anki-simple-forvo-audio.

Rascalov avatar Rascalov commented on August 28, 2024

I haven't been able to reproduce the issue of the language code not reappearing after removal.
As for sub-decks, they do have their own description. Anki does not count a sub-deck as something other than a regular deck. It's merely used as a way of sorting and ordering decks. From my tests, it works as intended for sub-decks.

Languages with multiple dialects seems too much like a niche of a niche for what I intended to build. This would require additional unique properties that go further than language codes while also allowing for searches tailored towards specific dialects using the Forvo scraper.

For now I am closing this issue as resolved! If you have any further suggestions or issues that persist, you may create another issue and I'll be sure to respond.

from anki-simple-forvo-audio.

ONEsuzuki avatar ONEsuzuki commented on August 28, 2024

from anki-simple-forvo-audio.

Related Issues (20)

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.