Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Name is not the best way to sync cards. #106

Open
burtonator opened this issue Feb 3, 2019 · 5 comments
Open

Name is not the best way to sync cards. #106

burtonator opened this issue Feb 3, 2019 · 5 comments

Comments

@burtonator
Copy link

I've noticed two problems with anki connect which are somewhat related.

  1. People can have multiple note types by name "so 5 Basic types"

  2. The international Anki translates 'Basic' to the locale.

Both of these cause bugs bug #2 is hitting me hard.

Anyone not using the English version of Anki won't work with my app unfortunately.

@burtonator
Copy link
Author

oh.. any advice here?

@FooSoft
Copy link
Owner

FooSoft commented Feb 4, 2019

It doesn't matter what "Basic" is translated to, but if you have five of them, that would be a problem. I didn't even know that you could create multiple note types with the exact same name, that sounds like a terrible idea. That being said, do you have any suggestions on what a "fix" to that could be?

@burtonator
Copy link
Author

I didn't either but one of our users said that he had multiple of them.

Is there an ID that can be used? I guess I could scan for ALL the cards but I don't think there's a stable way to refer to it. It would be nice if Anki just had a mapping for us already.

@c-okelly
Copy link
Contributor

It's seem like a mistake that your users are creating multiple cards types with the same name. As they are card types / templates I really don't see any other way to choose what card type you are looking to create other then either specifying the name or ID number?

By default if you try to add a new card type and name it the same as an existing card it add a random string to the end.

As for the local language issue since there are only 4 base Anki card types maybe you should just try and translate them using the a predefined list? eg "Basic -> Basique" (French). Or pull the card types using anki-connect and let the users select from a drop down list.

@c-okelly
Copy link
Contributor

Just looking at the code while thinking about #100 . It is definitely a bug to have created two models with the same unique name. The user would have to specifically create the model (code ensures at this point we get unique name no matter what the user does). User must then go and rename the model to an existing name (Rename process is not properly validated).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants