LuteOrg / lute-v3

LUTE = Learning Using Texts: learn languages through reading.
https://luteorg.github.io/lute-manual/
MIT License
492 stars 46 forks source link

Manage term interactions by TermID where possible #487

Closed jzohrab closed 1 month ago

jzohrab commented 1 month ago

When reading, Lute now has terms for every single term on the current page, even if they're new. As a result, all Terms have IDs, and so can be managed (fetched, deleted, etc) with the IDs.

For historical reasons, which are no longer valid, the code currently looks up terms by parsing and matching text and language using the term.Repository. This is overcomplicated and sometimes causes problems. Example problem from discord where changing the parsing params resulted in a different term than what was saved ... blah, obvious oversight.

The code should use IDs wherever that's possible.

jzohrab commented 1 month ago

This specific one (term deletes) is fixed in develop. Other places seem ok for now.

jzohrab commented 1 month ago

In release 3.5.5.