mastodon/config/locales
Claire 02851848e9
Revamp post filtering system (#18058)
* Add model for custom filter keywords

* Use CustomFilterKeyword internally

Does not change the API

* Fix /filters/edit and /filters/new

* Add migration tests

* Remove whole_word column from custom_filters (covered by custom_filter_keywords)

* Redesign /filters

Instead of a list, present a card that displays more information and handles
multiple keywords per filter.

* Redesign /filters/new and /filters/edit to add and remove keywords

This adds a new gem dependency: cocoon, as well as a npm dependency:
cocoon-js-vanilla. Those are used to easily populate and remove form fields
from the user interface when manipulating multiple keyword filters at once.

* Add /api/v2/filters to edit filter with multiple keywords

Entities:
- `Filter`: `id`, `title`, `filter_action` (either `hide` or `warn`), `context`
  `keywords`
- `FilterKeyword`: `id`, `keyword`, `whole_word`

API endpoits:
- `GET /api/v2/filters` to list filters (including keywords)
- `POST /api/v2/filters` to create a new filter
  `keywords_attributes` can also be passed to create keywords in one request
- `GET /api/v2/filters/:id` to read a particular filter
- `PUT /api/v2/filters/:id` to update a new filter
  `keywords_attributes` can also be passed to edit, delete or add keywords in
   one request
- `DELETE /api/v2/filters/:id` to delete a particular filter
- `GET /api/v2/filters/:id/keywords` to list keywords for a filter
- `POST /api/v2/filters/:filter_id/keywords/:id` to add a new keyword to a
   filter
- `GET /api/v2/filter_keywords/:id` to read a particular keyword
- `PUT /api/v2/filter_keywords/:id` to edit a particular keyword
- `DELETE /api/v2/filter_keywords/:id` to delete a particular keyword

* Change from `irreversible` boolean to `action` enum

* Remove irrelevent `irreversible_must_be_within_context` check

* Fix /filters/new and /filters/edit with update for filter_action

* Fix Rubocop/Codeclimate complaining about task names

* Refactor FeedManager#phrase_filtered?

This moves regexp building and filter caching to the `CustomFilter` class.

This does not change the functional behavior yet, but this changes how the
cache is built, doing per-custom_filter regexps so that filters can be matched
independently, while still offering caching.

* Perform server-side filtering and output result in REST API

* Fix numerous filters_changed events being sent when editing multiple keywords at once

* Add some tests

* Use the new API in the WebUI

- use client-side logic for filters we have fetched rules for.
  This is so that filter changes can be retroactively applied without
  reloading the UI.
- use server-side logic for filters we haven't fetched rules for yet
  (e.g. network error, or initial timeline loading)

* Minor optimizations and refactoring

* Perform server-side filtering on the streaming server

* Change the wording of filter action labels

* Fix issues pointed out by linter

* Change design of “Show anyway” link in accordence to review comments

* Drop “irreversible” filtering behavior

* Move /api/v2/filter_keywords to /api/v1/filters/keywords

* Rename `filter_results` attribute to `filtered`

* Rename REST::LegacyFilterSerializer to REST::V1::FilterSerializer

* Fix systemChannelId value in streaming server

* Simplify code by removing client-side filtering code

The simplifcation comes at a cost though: filters aren't retroactively
applied anymore.
2022-06-28 09:42:13 +02:00
..
activerecord.af.yml
activerecord.ar.yml
activerecord.ast.yml
activerecord.bg.yml
activerecord.bn.yml
activerecord.br.yml
activerecord.ca.yml
activerecord.ckb.yml
activerecord.co.yml
activerecord.cs.yml
activerecord.cy.yml
activerecord.da.yml
activerecord.de.yml
activerecord.el.yml
activerecord.en-GB.yml
activerecord.en.yml
activerecord.eo.yml
activerecord.es-AR.yml
activerecord.es-MX.yml
activerecord.es.yml
activerecord.et.yml
activerecord.eu.yml
activerecord.fa.yml
activerecord.fi.yml
activerecord.fr.yml
activerecord.fy.yml
activerecord.ga.yml
activerecord.gd.yml
activerecord.gl.yml
activerecord.he.yml
activerecord.hi.yml
activerecord.hr.yml
activerecord.hu.yml
activerecord.hy.yml
activerecord.id.yml
activerecord.io.yml
activerecord.is.yml
activerecord.it.yml
activerecord.ja.yml
activerecord.ka.yml
activerecord.kab.yml
activerecord.kk.yml
activerecord.kn.yml
activerecord.ko.yml
activerecord.ku.yml
activerecord.kw.yml
activerecord.lt.yml
activerecord.lv.yml
activerecord.mk.yml
activerecord.ml.yml
activerecord.mr.yml
activerecord.ms.yml
activerecord.nl.yml
activerecord.nn.yml
activerecord.no.yml
activerecord.oc.yml
activerecord.pa.yml
activerecord.pl.yml
activerecord.pt-BR.yml
activerecord.pt-PT.yml
activerecord.ro.yml
activerecord.ru.yml
activerecord.sa.yml
activerecord.sc.yml
activerecord.si.yml
activerecord.sk.yml
activerecord.sl.yml
activerecord.sq.yml
activerecord.sr-Latn.yml
activerecord.sr.yml
activerecord.sv.yml
activerecord.szl.yml
activerecord.ta.yml
activerecord.tai.yml
activerecord.te.yml
activerecord.th.yml
activerecord.tr.yml
activerecord.tt.yml
activerecord.ug.yml
activerecord.uk.yml
activerecord.ur.yml
activerecord.vi.yml
activerecord.zgh.yml
activerecord.zh-CN.yml
activerecord.zh-HK.yml
activerecord.zh-TW.yml
activerecord.zh_Hant.yml
af.yml
ar.yml
ast.yml
bg.yml
bn.yml
br.yml
ca.yml
ckb.yml
co.yml
cs.yml
cy.yml
da.yml
de.yml
devise.af.yml
devise.ar.yml
devise.ast.yml
devise.bg.yml
devise.bn.yml
devise.br.yml
devise.ca.yml
devise.ckb.yml
devise.co.yml
devise.cs.yml
devise.cy.yml
devise.da.yml
devise.de.yml
devise.el.yml
devise.en.yml
devise.eo.yml
devise.es-AR.yml
devise.es-MX.yml
devise.es.yml
devise.et.yml
devise.eu.yml
devise.fa.yml
devise.fi.yml
devise.fr.yml
devise.fy.yml
devise.ga.yml
devise.gd.yml
devise.gl.yml
devise.he.yml
devise.hi.yml
devise.hr.yml
devise.hu.yml
devise.hy.yml
devise.id.yml
devise.io.yml
devise.is.yml
devise.it.yml
devise.ja.yml
devise.ka.yml
devise.kab.yml
devise.kk.yml
devise.kn.yml
devise.ko.yml
devise.ku.yml
devise.kw.yml
devise.lt.yml
devise.lv.yml
devise.mk.yml
devise.ml.yml
devise.mr.yml
devise.ms.yml
devise.nl.yml
devise.nn.yml
devise.no.yml
devise.oc.yml
devise.pa.yml
devise.pl.yml
devise.pt-BR.yml
devise.pt-PT.yml
devise.ro.yml
devise.ru.yml
devise.sa.yml
devise.sc.yml
devise.si.yml
devise.sk.yml
devise.sl.yml
devise.sq.yml
devise.sr-Latn.yml
devise.sr.yml
devise.sv.yml
devise.szl.yml
devise.ta.yml
devise.tai.yml
devise.te.yml
devise.th.yml
devise.tr.yml
devise.tt.yml
devise.ug.yml
devise.uk.yml
devise.ur.yml
devise.vi.yml
devise.zgh.yml
devise.zh-CN.yml
devise.zh-HK.yml
devise.zh-TW.yml
doorkeeper.af.yml
doorkeeper.ar.yml
doorkeeper.ast.yml
doorkeeper.bg.yml
doorkeeper.bn.yml
doorkeeper.br.yml
doorkeeper.ca.yml
doorkeeper.ckb.yml
doorkeeper.co.yml
doorkeeper.cs.yml
doorkeeper.cy.yml
doorkeeper.da.yml
doorkeeper.de.yml
doorkeeper.el.yml
doorkeeper.en-GB.yml
doorkeeper.en.yml
doorkeeper.eo.yml
doorkeeper.es-AR.yml
doorkeeper.es-MX.yml
doorkeeper.es.yml
doorkeeper.et.yml
doorkeeper.eu.yml
doorkeeper.fa.yml
doorkeeper.fi.yml
doorkeeper.fr.yml
doorkeeper.fy.yml
doorkeeper.ga.yml
doorkeeper.gd.yml
doorkeeper.gl.yml
doorkeeper.he.yml
doorkeeper.hi.yml
doorkeeper.hr.yml
doorkeeper.hu.yml
doorkeeper.hy.yml
doorkeeper.id.yml
doorkeeper.io.yml
doorkeeper.is.yml
doorkeeper.it.yml
doorkeeper.ja.yml
doorkeeper.ka.yml
doorkeeper.kab.yml
doorkeeper.kk.yml
doorkeeper.kn.yml
doorkeeper.ko.yml
doorkeeper.ku.yml
doorkeeper.kw.yml
doorkeeper.lt.yml
doorkeeper.lv.yml
doorkeeper.mk.yml
doorkeeper.ml.yml
doorkeeper.mr.yml
doorkeeper.ms.yml
doorkeeper.nl.yml
doorkeeper.nn.yml
doorkeeper.no.yml
doorkeeper.oc.yml
doorkeeper.pa.yml
doorkeeper.pl.yml
doorkeeper.pt-BR.yml
doorkeeper.pt-PT.yml
doorkeeper.ro.yml
doorkeeper.ru.yml
doorkeeper.sa.yml
doorkeeper.sc.yml
doorkeeper.si.yml
doorkeeper.sk.yml
doorkeeper.sl.yml
doorkeeper.sq.yml
doorkeeper.sr-Latn.yml
doorkeeper.sr.yml
doorkeeper.sv.yml
doorkeeper.szl.yml
doorkeeper.ta.yml
doorkeeper.tai.yml
doorkeeper.te.yml
doorkeeper.th.yml
doorkeeper.tr.yml
doorkeeper.tt.yml
doorkeeper.ug.yml
doorkeeper.uk.yml
doorkeeper.ur.yml
doorkeeper.vi.yml
doorkeeper.zgh.yml
doorkeeper.zh-CN.yml
doorkeeper.zh-HK.yml
doorkeeper.zh-TW.yml
el.yml
en-GB.yml
en.yml Revamp post filtering system (#18058) 2022-06-28 09:42:13 +02:00
en_GB.yml
eo.yml
es-AR.yml
es-MX.yml
es.yml
et.yml
eu.yml
fa.yml
fi.yml
fr.yml
fy.yml
ga.yml
gd.yml
gl.yml
he.yml
hi.yml
hr.yml
hu.yml
hy.yml
id.yml
io.yml
is.yml
it.yml
ja.yml
ka.yml
kab.yml
kk.yml
kn.yml
ko.yml
ku.yml
kw.yml
lt.yml
lv.yml
mk.yml
ml.yml
mr.yml
ms.yml
nl.yml
nn.yml
no.yml
oc.yml
pa.yml
pl.yml
pt-BR.yml
pt-PT.yml
ro.yml
ru.yml
sa.yml
sc.yml
si.yml
simple_form.af.yml
simple_form.ar.yml
simple_form.ast.yml
simple_form.bg.yml
simple_form.bn.yml
simple_form.br.yml
simple_form.ca.yml
simple_form.ckb.yml
simple_form.co.yml
simple_form.cs.yml
simple_form.cy.yml
simple_form.da.yml
simple_form.de.yml
simple_form.el.yml
simple_form.en-GB.yml
simple_form.en.yml Revamp post filtering system (#18058) 2022-06-28 09:42:13 +02:00
simple_form.en_GB.yml
simple_form.eo.yml
simple_form.es-AR.yml
simple_form.es-MX.yml
simple_form.es.yml
simple_form.et.yml
simple_form.eu.yml
simple_form.fa.yml
simple_form.fi.yml
simple_form.fr.yml
simple_form.fy.yml
simple_form.ga.yml
simple_form.gd.yml
simple_form.gl.yml
simple_form.he.yml
simple_form.hi.yml
simple_form.hr.yml
simple_form.hu.yml
simple_form.hy.yml
simple_form.id.yml
simple_form.io.yml
simple_form.is.yml
simple_form.it.yml
simple_form.ja.yml
simple_form.ka.yml
simple_form.kab.yml
simple_form.kk.yml
simple_form.kn.yml
simple_form.ko.yml
simple_form.ku.yml
simple_form.kw.yml
simple_form.lt.yml
simple_form.lv.yml
simple_form.mk.yml
simple_form.ml.yml
simple_form.mr.yml
simple_form.ms.yml
simple_form.nl.yml
simple_form.nn.yml
simple_form.no.yml
simple_form.oc.yml
simple_form.pa.yml
simple_form.pl.yml
simple_form.pt-BR.yml
simple_form.pt-PT.yml
simple_form.ro.yml
simple_form.ru.yml
simple_form.sa.yml
simple_form.sc.yml
simple_form.si.yml
simple_form.sk.yml
simple_form.sl.yml
simple_form.sq.yml
simple_form.sr-Latn.yml
simple_form.sr.yml
simple_form.sv.yml
simple_form.szl.yml
simple_form.ta.yml
simple_form.tai.yml
simple_form.te.yml
simple_form.th.yml
simple_form.tr.yml
simple_form.tt.yml
simple_form.ug.yml
simple_form.uk.yml
simple_form.ur.yml
simple_form.vi.yml
simple_form.zgh.yml
simple_form.zh-CN.yml
simple_form.zh-HK.yml
simple_form.zh-TW.yml
sk.yml
sl.yml
sq.yml
sr-Latn.rb
sr-Latn.yml
sr.rb
sr.yml
sv.yml
szl.yml
ta.yml
tai.yml
te.yml
th.yml
tr.yml
tt.yml
ug.yml
uk.yml
ur.yml
vi.yml
zgh.yml
zh-CN.yml
zh-HK.yml
zh-TW.yml