Skip to content

Multi-language posting

tusooa requested to merge tusooa/pleroma:tusooa/2975-multilang into develop

Resolves #2975

  • AP: accept *Map
  • MastoAPI: renders
    • Status
    • history
    • source
    • Attachment
    • Poll
    • render language attr for posts with specified lang, multiple lang using mul
  • MastoAPI: posting
    • status
    • poll
    • attachment
    • validate language tags
    • support language attribute in posting
  • MRF?
    • [n/a] activity_expiration_policy.ex
    • [n/a] anti_followbot_policy.ex
    • [n/a] anti_link_spam_policy.ex -> doesn't change any content
    • [n/a] drop_policy.ex
    • ensure_re_prepended.ex
    • [n/a] follow_bot_policy.ex
    • [n/a] force_bot_unlisted_policy.ex
    • force_mentions_in_content.ex
    • [n/a] hashtag_policy.ex
    • [n/a] hellthread_policy.ex
    • keyword_policy.ex
    • [n/a] media_proxy_warming_policy.ex
    • [n/a] mention_policy.ex
    • no_empty_policy.ex -> will crash
    • [n/a] no_op_policy.ex
    • no_placeholder_text_policy.ex
    • normalize_markup.ex
    • [n/a] object_age_policy.ex
    • [n/a] reject_non_public.ex
    • [n/a] simple_policy.ex
    • [n/a] steal_emoji_policy.ex
    • [n/a] subchain_policy.ex
    • [n/a] tag_policy.ex
    • [n/a] user_allow_list_policy.ex
    • [n/a] vocabulary_policy.ex
  • Filtering is VERY hard. I'm not going to implement it in this mr. Prepare for filtering: inject language attribute language = '[{"lang": "<bcp47 subtag>", "variants": ["<bcp47 subtag>"]}]' into object, index with GIN jsonb_path_ops ( https://www.postgresql.org/docs/current/datatype-json.html#JSON-INDEXING ) so later one can use language @> '[{"lang":"xx", "variants": ["aa", "bb"]}]' to get only posts containing one language (how to get posts that contains at least one of the languages specified?)
Edited by tusooa

Merge request reports

Loading