Store the `Lang` in a HyperdataCorpus, pass it in strategic places when it matters
Hopefully fixes #250 (closed).
@anoe , I'm out of time for this week and I've kinda rushed this ticket, but I wanted to give you something tangible before the end of the day. Probably you might have to do some extra tweaks, but hopefully it should not be too far off.
@cgenie It was my first time querying and updating the DB, so I'm not sure if I've done this right. Could you quickly review the addLanguageToCorpus
function provided as part of this MR and tell me if I'm doing anything super stupid? Also, I'm not sure what is the story for the DB migration -- perhaps we should have a Maybe Lang
in the HyperdataCorpus
to treat this as an optional field in the internal JSON, avoiding the need for migrations? Any input would be appreciated.
This is untested.