]> Untitled Git - lemmy.git/commit
Tag posts and comments with language (fixes #440) (#2269)
authorNutomic <me@nutomic.com>
Thu, 18 Aug 2022 19:11:19 +0000 (19:11 +0000)
committerGitHub <noreply@github.com>
Thu, 18 Aug 2022 19:11:19 +0000 (15:11 -0400)
commite4a49b6eabcf34fb4adfa7ccd4024e5ddda93d54
tree7e2995123875adddfb157846dcd019c1affab6e6
parentc89006c94a4ec5aab2bf387d7605d92a565f8184
Tag posts and comments with language (fixes #440) (#2269)

* Tag posts and comments with language (fixes #440)

* Untangle PostView tests

* Implement test for PostView language query

* Store languages directly in database

* finish moving languages into db, it compiles

* update post_view

* serde skip Language.id field

* add local_user_language table, other changes suggested in review

* add code for local_user_discussion_language_view

* Remove unnecessary clones in db view converteres

* Fixing up some table and join issues.

* Clearing the current languages.

* Fix formatting.

* update user languages in single transaction

* proper test for user language queries

* Some fixes for all / missing user languages. (#2404)

* Some fixes for all / missing user languages.

* Adding back in transaction.

* fix test

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
41 files changed:
Cargo.lock
crates/api/src/local_user/save_settings.rs
crates/api/src/site/leave_admin.rs
crates/api/src/site/search.rs
crates/api_common/src/person.rs
crates/api_common/src/post.rs
crates/api_common/src/site.rs
crates/api_common/src/utils.rs
crates/api_crud/src/post/create.rs
crates/api_crud/src/post/list.rs
crates/api_crud/src/post/update.rs
crates/api_crud/src/private_message/create.rs
crates/api_crud/src/site/read.rs
crates/api_crud/src/user/create.rs
crates/api_crud/src/user/read.rs
crates/apub/assets/lemmy/activities/create_or_update/create_page.json
crates/apub/assets/lemmy/objects/page.json
crates/apub/src/lib.rs
crates/apub/src/objects/post.rs
crates/apub/src/protocol/objects/page.rs
crates/db_schema/src/impls/language.rs [new file with mode: 0644]
crates/db_schema/src/impls/local_user.rs
crates/db_schema/src/impls/local_user_language.rs [new file with mode: 0644]
crates/db_schema/src/impls/mod.rs
crates/db_schema/src/impls/post.rs
crates/db_schema/src/newtypes.rs
crates/db_schema/src/schema.rs
crates/db_schema/src/source/language.rs [new file with mode: 0644]
crates/db_schema/src/source/local_user.rs
crates/db_schema/src/source/local_user_language.rs [new file with mode: 0644]
crates/db_schema/src/source/mod.rs
crates/db_schema/src/source/post.rs
crates/db_views/src/comment_view.rs
crates/db_views/src/lib.rs
crates/db_views/src/local_user_discussion_language_view.rs [new file with mode: 0644]
crates/db_views/src/post_view.rs
crates/db_views/src/registration_application_view.rs
crates/db_views/src/structs.rs
crates/websocket/src/send.rs
migrations/2022-06-21-123144_language-tags/down.sql [new file with mode: 0644]
migrations/2022-06-21-123144_language-tags/up.sql [new file with mode: 0644]