LuteOrg / lute-v3

LUTE = Learning Using Texts: learn languages through reading. Python/Flask.
MIT License
423 stars 46 forks source link

Manage term interactions by TermID where possible #487

Open jzohrab opened 15 hours ago

jzohrab commented 15 hours 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 14 hours ago

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