lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

implement language tags for site/community in db and api

Open Nutomic opened this issue 3 years ago • 3 comments

Check all the commit messages for a list of changes.

Nutomic avatar Sep 08 '22 11:09 Nutomic

I think instead of Vec<LanguageId>, it would make sense to use some kind of Set<LanguageId>, as items dont need to be ordered, and set directly provides an intersect() method which we need. Problem is that a normal HashSet or BTreeSet needs more allocations and cpu work, so it would be necessary to pull in something like tinyset. Also, diesel only returns vec for db queries, it seems there is no way to get another collection without manual conversion. So probably not worth the effort.

Nutomic avatar Sep 12 '22 10:09 Nutomic

This should be ready to merge. Still needs api tests (which require updated lemmy-js-client), and a lot of additional testing (during and after lemmy-ui implementation of this feature). Also need to test that db upgrades are working fine.

Nutomic avatar Sep 12 '22 14:09 Nutomic

Last commit is broken, adding the list of languages to CommunityView seems tricky.

Nutomic avatar Sep 14 '22 19:09 Nutomic

Okay made all the requested changes, except for the one in EditCommunity which is not possible due to error types.

Nutomic avatar Oct 03 '22 13:10 Nutomic

Once this is merged, I'll start on the front end for it.

dessalines avatar Oct 05 '22 16:10 dessalines