Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Add `lang` column to `post` table (ISO 639-1 code)

Open andreaskoepf opened this issue 2 years ago • 4 comments

Add a string(2) lang field to the post model class to specify the language of a given post. This is necessary to query posts in a given language (e.g. which the current user is able to speak).

Don't forget to add the alembic migration scripts.

andreaskoepf avatar Dec 27 '22 21:12 andreaskoepf

We need to decide how we handle languages codes in the project, e.g. https://pypi.org/project/langcodes/ ?

andreaskoepf avatar Dec 27 '22 21:12 andreaskoepf

@andreaskoepf Looking to pick up something small to get into the project - do you mind if I take this? Would we be looking to force a language on the BE API when creating tasks or leaving that as optional?

GraemeHarris avatar Dec 28 '22 15:12 GraemeHarris

@andreaskoepf Looking to pick up something small to get into the project - do you mind if I take this? Would we be looking to force a language on the BE API when creating tasks or leaving that as optional?

I think for now we can just default to english, eventually we could either force it or try to detect the language. I've assigned you

yk avatar Dec 28 '22 16:12 yk

Have a PR up - should be simple enough :)

GraemeHarris avatar Dec 28 '22 21:12 GraemeHarris