Gustaf-C / anki-chinese-support-3

Anki add-on providing support for Chinese study
https://ankiweb.net/shared/info/1752008591
GNU General Public License v3.0
31 stars 8 forks source link

Incomplete English definition field (for single-word definitions) #29

Closed scddo closed 10 months ago

scddo commented 11 months ago

To be clear, this is only for English definitions that are just one word. I have consistently noticed this issue; the definition will be missing the final letter of the word. For example:

秋天: fall (will just say "fal") 盐: salt (will just say "sal")

I am so grateful you decided to keep up the work on this great add-on. Thank you for your time!

Gustaf-C commented 10 months ago

I have never had this happen to me, and I can't seem to reproduce it. Are you able to reproduce it consistently?

Also, please follow the bug report template so I have all needed information.

kieranlblack commented 10 months ago

I have actually noticed this issue recently too but have not spent the time to look into it.

kieranlblack commented 10 months ago

I was just able to reproduce it. We should have here that the last line is "telephone receiver".

image
kieranlblack commented 10 months ago

Stepped through it with the debugger and identified the issue as being here:

https://github.com/Gustaf-C/anki-chinese-support-3/blob/86d8beac838a60f564125104ed8cdd4172d6aa84/chinese/behavior.py#L84

This is causing definitions which end in r or b to have those letters stripped off. Check out for example 浴缸

image
scddo commented 10 months ago

@kieranlblack thank you! I realize my description wasn't precisely correct, and I hadn't had the time to change the initial comment.