Ben-Kerman / immersive

Language learning mpv script for looking up words within mpv and generating Anki cards
GNU General Public License v3.0
81 stars 1 forks source link

Target {{word}} can't be its alternative writing #12

Closed Ceynou closed 2 years ago

Ceynou commented 3 years ago

For exemple, the word 玉 has these alternative writings in the dictionary entry: 球 【たま】、珠 【たま】、弾 【たま】

So even if you select one of those alternative, the {{word}} output will always end up being the base writing. anki_1BadZk2Rog

Ben-Kerman commented 2 years ago

This would be a relatively complicated feature to implement, doesn't happen that often in my experience, and is really easy to fix manually when it does happen, so I'll close the issue for now

That being said, I just added a new template variable that contains the original selection, so you can somewhat solve it by using {{selections}} instead of {{word}} with the newest commit (but that doesn't work well with deinflection, so pick your poison)

Maybe I'll add a nice solution in the future, but no idea when, if at all