diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index 0786985fac..7eb9fdbced 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -48,12 +48,14 @@ module Admin def approve authorize @account.user, :approve? + log_action :approve, @account.user @account.user.approve! redirect_to admin_accounts_path(status: 'pending'), notice: I18n.t('admin.accounts.approved_msg', username: @account.acct) end def reject authorize @account.user, :reject? + log_action :reject, @account.user, username: @account.username DeleteAccountService.new.call(@account, reserve_email: false, reserve_username: false) redirect_to admin_accounts_path(status: 'pending'), notice: I18n.t('admin.accounts.rejected_msg', username: @account.acct) end diff --git a/app/controllers/admin/reports_controller.rb b/app/controllers/admin/reports_controller.rb index 7c831b3d4c..d7fa4c31b1 100644 --- a/app/controllers/admin/reports_controller.rb +++ b/app/controllers/admin/reports_controller.rb @@ -48,7 +48,7 @@ module Admin private def filtered_reports - ReportFilter.new(filter_params).results.order(id: :desc).includes(:account, :target_account) + ReportFilter.new(filter_params).results.includes(:account, :target_account) end def filter_params diff --git a/app/controllers/api/v1/admin/accounts_controller.rb b/app/controllers/api/v1/admin/accounts_controller.rb index 63cc521ed0..db5ced860b 100644 --- a/app/controllers/api/v1/admin/accounts_controller.rb +++ b/app/controllers/api/v1/admin/accounts_controller.rb @@ -15,24 +15,7 @@ class Api::V1::Admin::AccountsController < Api::BaseController after_action :insert_pagination_headers, only: :index - FILTER_PARAMS = %i( - local - remote - by_domain - active - pending - disabled - sensitized - silenced - suspended - username - display_name - email - ip - staff - ).freeze - - PAGINATION_PARAMS = (%i(limit) + FILTER_PARAMS).freeze + PAGINATION_PARAMS = (%i(limit) + AccountFilter::KEYS).freeze def index authorize :account, :index? @@ -53,12 +36,14 @@ class Api::V1::Admin::AccountsController < Api::BaseController def approve authorize @account.user, :approve? + log_action(:approve, @account.user) @account.user.approve! render json: @account, serializer: REST::Admin::AccountSerializer end def reject authorize @account.user, :reject? + log_action(:reject, @account.user, username: @account.username) DeleteAccountService.new.call(@account, reserve_email: false, reserve_username: false) render json: @account, serializer: REST::Admin::AccountSerializer end @@ -94,7 +79,7 @@ class Api::V1::Admin::AccountsController < Api::BaseController private def set_accounts - @accounts = filtered_accounts.order(id: :desc).includes(user: [:invite_request, :invite]).to_a_paginated_by_id(limit_param(LIMIT), params_slice(:max_id, :since_id, :min_id)) + @accounts = filtered_accounts.to_a_paginated_by_id(limit_param(LIMIT), params_slice(:max_id, :since_id, :min_id)) end def set_account @@ -102,11 +87,11 @@ class Api::V1::Admin::AccountsController < Api::BaseController end def filtered_accounts - AccountFilter.new(filter_params).results + AccountFilter.new(filter_params.with_defaults(order: 'recent')).results end def filter_params - params.permit(*FILTER_PARAMS) + params.slice(*AccountFilter::KEYS).permit(*AccountFilter::KEYS) end def insert_pagination_headers diff --git a/app/controllers/api/v1/admin/reports_controller.rb b/app/controllers/api/v1/admin/reports_controller.rb index c8f4cd8d80..a2ee1dcfbf 100644 --- a/app/controllers/api/v1/admin/reports_controller.rb +++ b/app/controllers/api/v1/admin/reports_controller.rb @@ -14,13 +14,7 @@ class Api::V1::Admin::ReportsController < Api::BaseController after_action :insert_pagination_headers, only: :index - FILTER_PARAMS = %i( - resolved - account_id - target_account_id - ).freeze - - PAGINATION_PARAMS = (%i(limit) + FILTER_PARAMS).freeze + PAGINATION_PARAMS = (%i(limit) + ReportFilter::KEYS).freeze def index authorize :report, :index? @@ -75,7 +69,7 @@ class Api::V1::Admin::ReportsController < Api::BaseController end def filter_params - params.permit(*FILTER_PARAMS) + params.slice(*ReportFilter::KEYS).permit(*ReportFilter::KEYS) end def insert_pagination_headers diff --git a/app/models/account_filter.rb b/app/models/account_filter.rb index defd531acb..c9000b54c7 100644 --- a/app/models/account_filter.rb +++ b/app/models/account_filter.rb @@ -21,7 +21,7 @@ class AccountFilter end def results - scope = Account.includes(:account_stat, user: [:session_activations, :invite_request]).without_instance_actor.reorder(nil) + scope = Account.includes(:account_stat, user: [:ips, :invite, :invite_request]).without_instance_actor.reorder(nil) params.each do |key, value| scope.merge!(scope_for(key, value.to_s.strip)) if value.present? diff --git a/app/models/report_filter.rb b/app/models/report_filter.rb index a91a6baeb2..ee58251085 100644 --- a/app/models/report_filter.rb +++ b/app/models/report_filter.rb @@ -2,10 +2,10 @@ class ReportFilter KEYS = %i( - resolved + status account_id target_account_id - by_target_domain + target_domain target_origin ).freeze @@ -16,7 +16,7 @@ class ReportFilter end def results - scope = Report.unresolved + scope = Report.order(id: :desc) params.each do |key, value| scope = scope.merge scope_for(key, value) @@ -27,10 +27,10 @@ class ReportFilter def scope_for(key, value) case key.to_sym - when :by_target_domain + when :target_domain Report.where(target_account: Account.where(domain: value)) - when :resolved - Report.resolved + when :status + status_scope(value) when :account_id Report.where(account_id: value) when :target_account_id @@ -52,4 +52,15 @@ class ReportFilter raise "Unknown value: #{value}" end end + + def status_scope(value) + case value.to_sym + when :resolved + Report.resolved + when :unresolved + Report.unresolved + else + raise "Unknown value: #{value}" + end + end end diff --git a/app/views/admin/reports/index.html.haml b/app/views/admin/reports/index.html.haml index 6191733733..dc2d79be4c 100644 --- a/app/views/admin/reports/index.html.haml +++ b/app/views/admin/reports/index.html.haml @@ -5,8 +5,8 @@ .filter-subset %strong= t('admin.reports.status') %ul - %li= filter_link_to t('admin.reports.unresolved'), resolved: nil - %li= filter_link_to t('admin.reports.resolved'), resolved: '1' + %li= filter_link_to t('admin.reports.unresolved'), status: 'unresolved' + %li= filter_link_to t('admin.reports.resolved'), status: 'resolved' .filter-subset %strong= t('admin.reports.target_origin') %ul @@ -19,7 +19,7 @@ - ReportFilter::KEYS.each do |key| = hidden_field_tag key, params[key] if params[key].present? - - %i(by_target_domain).each do |key| + - %i(target_domain).each do |key| .input.string.optional = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.reports.#{key}") diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 6c3cccdb38..38da35c5ac 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -571,7 +571,6 @@ ar: are_you_sure: هل أنت متأكد ؟ assign_to_self: عين لي assigned: تعين رئيس - by_target_domain: نطاق الحساب المبلّغ عنه comment: none: لا شيء created_at: ذكرت @@ -592,6 +591,7 @@ ar: resolved: معالجة resolved_msg: تم حل تقرير بنجاح! status: الحالة + target_domain: نطاق الحساب المبلّغ عنه target_origin: مصدر الحساب المبلغ عنه title: الشكاوى unassign: إلغاء تعيين diff --git a/config/locales/ca.yml b/config/locales/ca.yml index c0aef6c375..704f3cb0dd 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -554,7 +554,6 @@ ca: are_you_sure: N'estàs segur? assign_to_self: Assignar-me assigned: Moderador assignat - by_target_domain: Domini del compte reportat comment: none: Cap created_at: Reportat @@ -575,6 +574,7 @@ ca: resolved: Resolt resolved_msg: Informe resolt amb èxit! status: Estat + target_domain: Domini del compte reportat target_origin: Origen del compte reportat title: Informes unassign: Treu l'assignació diff --git a/config/locales/co.yml b/config/locales/co.yml index f2f278678c..878cdb5335 100644 --- a/config/locales/co.yml +++ b/config/locales/co.yml @@ -532,7 +532,6 @@ co: are_you_sure: Site sicuru·a? assign_to_self: Assignallu à mè assigned: Muderatore assignatu - by_target_domain: Duminiu di u contu signalatu comment: none: Nisunu created_at: Palisatu @@ -553,6 +552,7 @@ co: resolved: Scioltu è chjosu resolved_msg: Signalamentu scioltu! status: Statutu + target_domain: Duminiu di u contu signalatu title: Signalamenti unassign: Disassignà unresolved: Micca sciolti diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 19428252b2..704f703c6e 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -578,7 +578,6 @@ cs: are_you_sure: Opravu? assign_to_self: Přidělit ke mně assigned: Přiřazený moderátor - by_target_domain: Doména nahlášeného účtu comment: none: Žádné created_at: Nahlášené @@ -599,6 +598,7 @@ cs: resolved: Vyřešeno resolved_msg: Hlášení úspěšně vyřešeno! status: Stav + target_domain: Doména nahlášeného účtu target_origin: Původ nahlášeného účtu title: Hlášení unassign: Odebrat diff --git a/config/locales/cy.yml b/config/locales/cy.yml index 8e899ebd0d..005643e035 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -435,7 +435,6 @@ cy: are_you_sure: Ydych chi'n sicr? assign_to_self: Aseinio i mi assigned: Arolygwr wedi'i aseinio - by_target_domain: Parth cyfrif a adroddir comment: none: Dim created_at: Adroddwyd @@ -454,6 +453,7 @@ cy: resolved: Wedi ei ddatrys resolved_msg: Llwyddwyd i ddatrys yr adroddiad! status: Statws + target_domain: Parth cyfrif a adroddir title: Adroddiadau unassign: Dadneilltuo unresolved: Heb ei ddatrys diff --git a/config/locales/da.yml b/config/locales/da.yml index 128d3ece91..3300698387 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -553,7 +553,6 @@ da: are_you_sure: Sikker? assign_to_self: Tildel til mig assigned: Tildelt moderator - by_target_domain: Domæne for anmeldt konto comment: none: Ingen created_at: Anmeldt @@ -574,6 +573,7 @@ da: resolved: Løst resolved_msg: Anmeldelse er nu løst! status: Status + target_domain: Domæne for anmeldt konto target_origin: Anmeldte kontos oprindelse title: Anmeldelser unassign: Utildel diff --git a/config/locales/de.yml b/config/locales/de.yml index 4e59f7b34c..080e44fc06 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -535,7 +535,6 @@ de: are_you_sure: Bist du dir sicher? assign_to_self: Mir zuweisen assigned: Zugewiesener Moderator - by_target_domain: Domain des gemeldeten Kontos comment: none: Kein created_at: Gemeldet @@ -556,6 +555,7 @@ de: resolved: Gelöst resolved_msg: Meldung erfolgreich gelöst! status: Zustand + target_domain: Domain des gemeldeten Kontos target_origin: Domain des gemeldeten Kontos title: Meldungen unassign: Zuweisung entfernen diff --git a/config/locales/el.yml b/config/locales/el.yml index 7b91dd9e9d..2f888e62f9 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -452,7 +452,6 @@ el: are_you_sure: Σίγουρα; assign_to_self: Ανάθεση σε μένα assigned: Αρμόδιος συντονιστής - by_target_domain: Κόμβος του λογαριασμού υπό καταγγελία comment: none: Κανένα created_at: Καταγγέλθηκε @@ -473,6 +472,7 @@ el: resolved: Επιλύθηκε resolved_msg: Η καταγγελία επιλύθηκε επιτυχώς! status: Κατάσταση + target_domain: Κόμβος του λογαριασμού υπό καταγγελία title: Αναφορές unassign: Αποσύνδεση unresolved: Άλυτη diff --git a/config/locales/en.yml b/config/locales/en.yml index 32b48dbfff..73217ff0d6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -561,7 +561,6 @@ en: are_you_sure: Are you sure? assign_to_self: Assign to me assigned: Assigned moderator - by_target_domain: Domain of reported account comment: none: None created_at: Reported @@ -582,6 +581,7 @@ en: resolved: Resolved resolved_msg: Report successfully resolved! status: Status + target_domain: Domain of reported account target_origin: Origin of reported account title: Reports unassign: Unassign diff --git a/config/locales/eo.yml b/config/locales/eo.yml index 6841bb4394..7e98f328ce 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -475,7 +475,6 @@ eo: are_you_sure: Ĉu vi certas? assign_to_self: Asigni al mi assigned: Asignita kontrolanto - by_target_domain: Domajno de la signalita konto comment: none: Nenio created_at: Signalita @@ -496,6 +495,7 @@ eo: resolved: Solvitaj resolved_msg: Signalo sukcese solvita! status: Mesaĝoj + target_domain: Domajno de la signalita konto title: Signaloj unassign: Malasigni unresolved: Nesolvitaj diff --git a/config/locales/es-AR.yml b/config/locales/es-AR.yml index bcfab74c85..15a7cdb607 100644 --- a/config/locales/es-AR.yml +++ b/config/locales/es-AR.yml @@ -535,7 +535,6 @@ es-AR: are_you_sure: "¿Estás seguro?" assign_to_self: Asignármela a mí assigned: Moderador asignado - by_target_domain: Dominio de la cuenta denunciada comment: none: Ninguno created_at: Denunciado @@ -556,6 +555,7 @@ es-AR: resolved: Resueltas resolved_msg: "¡Denuncia exitosamente resuelta!" status: Estado + target_domain: Dominio de la cuenta denunciada target_origin: Origen de la cuenta denunciada title: Denuncias unassign: Desasignar diff --git a/config/locales/es-MX.yml b/config/locales/es-MX.yml index 0260febabc..668b437277 100644 --- a/config/locales/es-MX.yml +++ b/config/locales/es-MX.yml @@ -535,7 +535,6 @@ es-MX: are_you_sure: "¿Estás seguro?" assign_to_self: Asignármela a mí assigned: Moderador asignado - by_target_domain: Dominio de la cuenta reportada comment: none: Ninguno created_at: Denunciado @@ -556,6 +555,7 @@ es-MX: resolved: Resuelto resolved_msg: "¡La denuncia se ha resuelto correctamente!" status: Estado + target_domain: Dominio de la cuenta reportada target_origin: Origen de la cuenta reportada title: Reportes unassign: Desasignar diff --git a/config/locales/es.yml b/config/locales/es.yml index 6bd81c8a20..29d19720f1 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -554,7 +554,6 @@ es: are_you_sure: "¿Estás seguro?" assign_to_self: Asignármela a mí assigned: Moderador asignado - by_target_domain: Dominio de la cuenta reportada comment: none: Ninguno created_at: Denunciado @@ -575,6 +574,7 @@ es: resolved: Resuelto resolved_msg: "¡La denuncia se ha resuelto correctamente!" status: Estado + target_domain: Dominio de la cuenta reportada target_origin: Origen de la cuenta reportada title: Reportes unassign: Desasignar diff --git a/config/locales/et.yml b/config/locales/et.yml index 3fcca0ad51..a5d1966668 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -404,7 +404,6 @@ et: are_you_sure: Olete kindel? assign_to_self: Määra mulle assigned: Määratud moderaator - by_target_domain: Teavitatud konto domeen comment: none: Pole created_at: Teavitatud @@ -423,6 +422,7 @@ et: resolved: Lahendatud resolved_msg: Teavituse lahendamine õnnestus! status: Staatus + target_domain: Teavitatud konto domeen title: Teavitused unassign: Eemalda määramine unresolved: Lahendamata diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 7fd8fdd93b..e0fc86b482 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -523,7 +523,6 @@ eu: are_you_sure: Ziur zaude? assign_to_self: Esleitu niri assigned: Esleitutako moderatzailea - by_target_domain: Jakinarazitako kontuaren domeinua comment: none: Bat ere ez created_at: Salatua @@ -544,6 +543,7 @@ eu: resolved: Konponduta resolved_msg: Salaketa ongi konpondu da! status: Mezua + target_domain: Jakinarazitako kontuaren domeinua title: Salaketak unassign: Kendu esleipena unresolved: Konpondu gabea diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 8d4dab2b11..0baad6e6ab 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -534,7 +534,6 @@ fa: are_you_sure: مطمئنید؟ assign_to_self: به عهدهٔ من بگذار assigned: مدیر عهده‌دار - by_target_domain: دامنهٔ حساب گزارش‌شده comment: none: هیچ created_at: گزارش‌شده @@ -555,6 +554,7 @@ fa: resolved: حل‌شده resolved_msg: گزارش با موفقیت حل شد! status: نوشته + target_domain: دامنهٔ حساب گزارش‌شده target_origin: خاستگاه حساب گزارش‌شده title: گزارش‌ها unassign: پس‌گرفتن مسئولیت diff --git a/config/locales/fi.yml b/config/locales/fi.yml index c8376023bb..86c6c955c8 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -522,7 +522,6 @@ fi: are_you_sure: Oletko varma? assign_to_self: Ota tehtäväksi assigned: Määritetty valvoja - by_target_domain: Ilmoitetun tilin verkkotunnus comment: none: Ei mitään created_at: Raportoitu @@ -543,6 +542,7 @@ fi: resolved: Ratkaistut resolved_msg: Raportti onnistuneesti ratkaistu! status: Tila + target_domain: Ilmoitetun tilin verkkotunnus target_origin: Raportoidun tilin alkuperä title: Raportit unassign: Määrittämätön diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 6fc8408242..1e4892d82e 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -554,7 +554,6 @@ fr: are_you_sure: Voulez-vous vraiment faire ça ? assign_to_self: Me l’assigner assigned: Modérateur assigné - by_target_domain: Domaine du compte signalé comment: none: Aucun created_at: Signalé @@ -575,6 +574,7 @@ fr: resolved: Résolus resolved_msg: Signalement résolu avec succès ! status: Statut + target_domain: Domaine du compte signalé target_origin: Origine du compte signalé title: Signalements unassign: Dés-assigner diff --git a/config/locales/gd.yml b/config/locales/gd.yml index 357a12b253..cb1130635d 100644 --- a/config/locales/gd.yml +++ b/config/locales/gd.yml @@ -553,7 +553,6 @@ gd: are_you_sure: A bheil thu cinnteach? assign_to_self: Iomruin dhomh-sa assigned: Maor iomruinte - by_target_domain: Àrainn cunntas a’ ghearain comment: none: Chan eil gin created_at: Chaidh an gearan a dhèanamh @@ -574,6 +573,7 @@ gd: resolved: Air fhuasgladh resolved_msg: Chaidh an gearan fhuasgladh! status: Staid + target_domain: Àrainn cunntas a’ ghearain target_origin: Tùs cunntas a’ ghearain title: Gearanan unassign: Dì-iomruin diff --git a/config/locales/gl.yml b/config/locales/gl.yml index d740d2b739..6ffa1af15c 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -552,7 +552,6 @@ gl: are_you_sure: Estás seguro? assign_to_self: Asignarme assigned: Moderador asignado - by_target_domain: Dominio da conta denunciada comment: none: Ningún created_at: Denunciado @@ -573,6 +572,7 @@ gl: resolved: Resolto resolved_msg: Resolveuse con éxito a denuncia! status: Estado + target_domain: Dominio da conta denunciada target_origin: Orixe da conta denunciada title: Denuncias unassign: Non asignar diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 720cc7350a..c3a0812b9a 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -556,7 +556,6 @@ hu: are_you_sure: Biztos vagy benne? assign_to_self: Magamhoz rendelés assigned: Hozzárendelt moderátor - by_target_domain: A bejelentett fiók domainje comment: none: Egyik sem created_at: Jelentve @@ -577,6 +576,7 @@ hu: resolved: Megoldott resolved_msg: A bejelentést sikeresen megoldottuk! status: Állapot + target_domain: A bejelentett fiók domainje target_origin: A jelentett fiók eredete title: Bejelentések unassign: Hozzárendelés törlése diff --git a/config/locales/id.yml b/config/locales/id.yml index d3987ceb71..c8121c4bbe 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -540,7 +540,6 @@ id: are_you_sure: Apakah Anda yakin? assign_to_self: Tugaskan kpd saya assigned: Moderator tertugas - by_target_domain: Domain akun yang dilaporkan comment: none: Tidak ada created_at: Dilaporkan @@ -561,6 +560,7 @@ id: resolved: Terseleseikan resolved_msg: Laporan berhasil diselesaikan! status: Status + target_domain: Domain akun yang dilaporkan target_origin: Akun asal yang dilaporkan title: Laporan unassign: Bebas Tugas diff --git a/config/locales/is.yml b/config/locales/is.yml index f17977aa94..02a3065530 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -535,7 +535,6 @@ is: are_you_sure: Ertu viss? assign_to_self: Úthluta mér assigned: Úthlutaður umsjónarmaður - by_target_domain: Lén kærða notandaaðgangsins comment: none: Ekkert created_at: Tilkynnt @@ -556,6 +555,7 @@ is: resolved: Leyst resolved_msg: Það tókst að leysa kæruna! status: Staða + target_domain: Lén kærða notandaaðgangsins target_origin: Uppruni kærða notandaaðgangsins title: Kærur unassign: Aftengja úthlutun diff --git a/config/locales/it.yml b/config/locales/it.yml index 8194e4a2cb..2a997d339f 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -551,7 +551,6 @@ it: are_you_sure: Sei sicuro? assign_to_self: Assegna a me assigned: Moderatore assegnato - by_target_domain: Dominio dell'account segnalato comment: none: Nessuno created_at: Segnalato @@ -572,6 +571,7 @@ it: resolved: Risolto resolved_msg: Rapporto risolto! status: Stato + target_domain: Dominio dell'account segnalato target_origin: Origine dell'account segnalato title: Rapporti unassign: Non assegnare diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 85c22a0f4d..8d9b5ac1cf 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -516,7 +516,6 @@ ja: are_you_sure: 本当に実行しますか? assign_to_self: 担当になる assigned: 担当者 - by_target_domain: ドメイン comment: none: なし created_at: 通報日時 @@ -537,6 +536,7 @@ ja: resolved: 解決済み resolved_msg: 通報を解決済みにしました! status: ステータス + target_domain: ドメイン title: 通報 unassign: 担当を外す unresolved: 未解決 diff --git a/config/locales/kk.yml b/config/locales/kk.yml index 1c4445ee96..05fd2c72e2 100644 --- a/config/locales/kk.yml +++ b/config/locales/kk.yml @@ -346,7 +346,6 @@ kk: are_you_sure: Шынымен бе? assign_to_self: Мені тағайындау assigned: Модератор тағайындау - by_target_domain: Шағымдалған аккаунт домені comment: none: Ештеңе created_at: Шағым тасталды @@ -365,6 +364,7 @@ kk: resolved: Қайта шешілді resolved_msg: Шағым қайтадан шешілді! status: Статус + target_domain: Шағымдалған аккаунт домені title: Шағымдар unassign: Қайтып алу unresolved: Шешілмеген diff --git a/config/locales/kmr.yml b/config/locales/kmr.yml index 5a275b4c96..981446d4bf 100644 --- a/config/locales/kmr.yml +++ b/config/locales/kmr.yml @@ -554,7 +554,6 @@ kmr: are_you_sure: Gelo tu bawerî? assign_to_self: Bo min diyar bike assigned: Çavdêrê diyarkirî - by_target_domain: Navperê ya ajimêrê ragihandî comment: none: Ne yek created_at: Hate ragihandin @@ -575,6 +574,7 @@ kmr: resolved: Çareserkirî resolved_msg: Ragihandin bi awayekî serkeftî hate çareserkirin! status: Rewş + target_domain: Navperê ya ajimêrê ragihandî target_origin: Jêdera ajimêrê ragihandî title: Ragihandinên unassign: Diyar neke diff --git a/config/locales/ko.yml b/config/locales/ko.yml index c9d5238eee..41ec90327a 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -528,7 +528,6 @@ ko: are_you_sure: 정말로 실행하시겠습니까? assign_to_self: 나에게 할당하기 assigned: 할당 된 중재자 - by_target_domain: 신고된 계정의 도메인 comment: none: 없음 created_at: 리포트 시각 @@ -549,6 +548,7 @@ ko: resolved: 해결됨 resolved_msg: 리포트가 성공적으로 해결되었습니다! status: 상태 + target_domain: 신고된 계정의 도메인 target_origin: 신고된 계정의 소속 title: 신고 unassign: 할당 해제 diff --git a/config/locales/ku.yml b/config/locales/ku.yml index d421b42a76..7b8dde598f 100644 --- a/config/locales/ku.yml +++ b/config/locales/ku.yml @@ -467,7 +467,6 @@ ku: are_you_sure: دڵنیای? assign_to_self: دیاریکردن بۆ من assigned: بەڕێوەبەری بەرپرس - by_target_domain: دۆمەینی هەژمارەی گوزارشتدراو comment: none: هیچ created_at: گوزارشتکرا @@ -486,6 +485,7 @@ ku: resolved: چارەسەرکرا resolved_msg: گوزارشتکردن بە سەرکەوتوویی چارەسەر کرا! status: دۆخ + target_domain: دۆمەینی هەژمارەی گوزارشتدراو title: گوزارشتکرا unassign: دیارینەکراوە unresolved: چارەسەر نەکراوە diff --git a/config/locales/ms.yml b/config/locales/ms.yml index 3305c17c9d..fb890e6185 100644 --- a/config/locales/ms.yml +++ b/config/locales/ms.yml @@ -516,7 +516,6 @@ ms: are_you_sure: Adakah anda pasti? assign_to_self: Menugaskan kepada saya assigned: Penyederhana yang ditugaskan - by_target_domain: Domain bagi akaun yang dilaporkan comment: none: Tiada created_at: Dilaporkan @@ -537,6 +536,7 @@ ms: resolved: Diselesaikan resolved_msg: Laporan berjaya diselesaikan! status: Status + target_domain: Domain bagi akaun yang dilaporkan title: Laporan unassign: Nyahtugaskan unresolved: Nyahselesaikan diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 7a7773f468..c83c7224a8 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -523,7 +523,6 @@ nl: are_you_sure: Weet je het zeker? assign_to_self: Aan mij toewijzen assigned: Toegewezen moderator - by_target_domain: Domein van gerapporteerde account comment: none: Geen created_at: Gerapporteerd op @@ -544,6 +543,7 @@ nl: resolved: Opgelost resolved_msg: Rapportage succesvol opgelost! status: Toot + target_domain: Domein van gerapporteerde account title: Rapportages unassign: Niet langer toewijzen unresolved: Onopgelost diff --git a/config/locales/nn.yml b/config/locales/nn.yml index 005523a9fc..d3d2be46f8 100644 --- a/config/locales/nn.yml +++ b/config/locales/nn.yml @@ -476,7 +476,6 @@ nn: are_you_sure: Er du sikker? assign_to_self: Tilegn til meg assigned: Tilsett moderator - by_target_domain: Domenet av rapportert bruker comment: none: Ingen created_at: Rapportert @@ -497,6 +496,7 @@ nn: resolved: Oppløyst resolved_msg: Rapporten er løyst! status: Status + target_domain: Domenet av rapportert bruker target_origin: Opprinnelse for innrapportert konto title: Rapportar unassign: Avset diff --git a/config/locales/no.yml b/config/locales/no.yml index 668efca9c5..2caa10b715 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -492,7 +492,6 @@ are_you_sure: Er du sikker? assign_to_self: Tilegn til meg assigned: Tilegnet moderator - by_target_domain: Domenet av rapportert bruker comment: none: Ingen created_at: Rapportert @@ -513,6 +512,7 @@ resolved: Løst resolved_msg: Rapport løst! status: Status + target_domain: Domenet av rapportert bruker target_origin: Opprinnelse for innrapportert konto title: Rapporter unassign: Fjern tilegning diff --git a/config/locales/oc.yml b/config/locales/oc.yml index 64035d34a8..8313e0ae4b 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -434,7 +434,6 @@ oc: are_you_sure: Es segur ? assign_to_self: Me l’assignar assigned: Moderador assignat - by_target_domain: Domeni del compte senhalat comment: none: Pas cap created_at: Creacion @@ -453,6 +452,7 @@ oc: resolved: Resolgut resolved_msg: Rapòrt corrèctament resolgut ! status: Estatut + target_domain: Domeni del compte senhalat title: Senhalament unassign: Levar unresolved: Pas resolgut diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 8023251c9a..3ab586569b 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -578,7 +578,6 @@ pl: are_you_sure: Czy na pewno? assign_to_self: Przypisz do siebie assigned: Przypisany moderator - by_target_domain: Domena zgłaszanego konta comment: none: Brak created_at: Zgłoszono @@ -599,6 +598,7 @@ pl: resolved: Rozwiązane resolved_msg: Pomyślnie rozwiązano zgłoszenie. status: Stan + target_domain: Domena zgłaszanego konta target_origin: Pochodzenie zgłaszanego konta title: Zgłoszenia unassign: Cofnij przypisanie diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 8129728674..e5088e7122 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -456,7 +456,6 @@ pt-BR: are_you_sure: Você tem certeza? assign_to_self: Pegar assigned: Moderador responsável - by_target_domain: Domínio da conta denunciada comment: none: Nenhum created_at: Denunciado @@ -476,6 +475,7 @@ pt-BR: reported_by: Denunciada por resolved: Resolvido resolved_msg: Denúncia resolvida com sucesso! + target_domain: Domínio da conta denunciada title: Denúncias unassign: Largar unresolved: Não resolvido diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml index 93b375c3d7..e420aafa3a 100644 --- a/config/locales/pt-PT.yml +++ b/config/locales/pt-PT.yml @@ -554,7 +554,6 @@ pt-PT: are_you_sure: Tens a certeza? assign_to_self: Atribuí-me a mim assigned: Atribuído ao moderador - by_target_domain: Domínio da conta reportada comment: none: Nenhum created_at: Relatado @@ -575,6 +574,7 @@ pt-PT: resolved: Resolvido resolved_msg: Relatório resolvido com sucesso! status: Estado + target_domain: Domínio da conta reportada target_origin: Origem da conta reportada title: Relatórios unassign: Não atribuir diff --git a/config/locales/ru.yml b/config/locales/ru.yml index a5f71ae106..fce70ae32b 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -583,7 +583,6 @@ ru: are_you_sure: Вы уверены? assign_to_self: Назначить себе assigned: Назначенный модератор - by_target_domain: Домен объекта жалобы comment: none: Нет created_at: Создана @@ -604,6 +603,7 @@ ru: resolved: Решённые resolved_msg: Жалоба обработана, спасибо! status: Статус + target_domain: Домен объекта жалобы target_origin: Происхождение объекта жалобы title: Жалобы unassign: Снять назначение diff --git a/config/locales/sc.yml b/config/locales/sc.yml index eeea2793de..3e74319e85 100644 --- a/config/locales/sc.yml +++ b/config/locales/sc.yml @@ -502,7 +502,6 @@ sc: are_you_sure: Seguru? assign_to_self: Assigna a mie assigned: Moderatzione assignada - by_target_domain: Domìniu de su contu signaladu comment: none: Perunu created_at: Sinnaladu @@ -523,6 +522,7 @@ sc: resolved: Isòrvidu resolved_msg: Informe isòrvidu. status: Istadu + target_domain: Domìniu de su contu signaladu title: Informes unassign: Boga s'assignatzione unresolved: No isòrvidu diff --git a/config/locales/si.yml b/config/locales/si.yml index 6fa12abec6..d5650f2d4b 100644 --- a/config/locales/si.yml +++ b/config/locales/si.yml @@ -201,7 +201,6 @@ si: status: තත්වය reports: are_you_sure: ඔබට විශ්වාසද? - by_target_domain: වාර්තා කළ ගිණුමෙහි වසම comment: none: කිසිවක් නැත notes: @@ -210,6 +209,7 @@ si: report: "@%{id} වාර්තා කරන්න" reported_account: වාර්තා කළ ගිණුම status: තත්වය + target_domain: වාර්තා කළ ගිණුමෙහි වසම title: වාර්තා rules: add_new: නීතිය එකතු කරන්න diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 0be6d3bfae..df7a0b6c23 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -449,7 +449,6 @@ sk: are_you_sure: Si si istý/á? assign_to_self: Priraď sebe assigned: Priradený moderátor - by_target_domain: Doména nahláseného účtu comment: none: Žiadne created_at: Nahlásené @@ -468,6 +467,7 @@ sk: resolved: Vyriešené resolved_msg: Hlásenie úspešne vyriešené! status: Stav + target_domain: Doména nahláseného účtu title: Hlásenia unassign: Odober unresolved: Nevyriešené diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 5c7e9c3fee..b3aeea9cdd 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -545,7 +545,6 @@ sq: are_you_sure: A jeni i sigurt? assign_to_self: Caktojani vetes assigned: Iu caktua moderator - by_target_domain: Përkatësi e llogarisë së raportuar comment: none: Asnjë created_at: Raportuar më @@ -566,6 +565,7 @@ sq: resolved: I zgjidhur resolved_msg: Raportimi u zgjidh me sukses! status: Gjendje + target_domain: Përkatësi e llogarisë së raportuar target_origin: Origjinë e llogarisë së raportuar title: Raportime unassign: Hiqja diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 44c7948338..4a6ed5137e 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -476,7 +476,6 @@ sv: are_you_sure: Är du säker? assign_to_self: Tilldela till mig assigned: Tilldelad moderator - by_target_domain: Domän för rapporterat konto comment: none: Ingen created_at: Anmäld @@ -497,6 +496,7 @@ sv: resolved: Löst resolved_msg: Anmälan har lösts framgångsrikt! status: Status + target_domain: Domän för rapporterat konto target_origin: Ursprung för anmält konto title: Anmälningar unassign: Otilldela diff --git a/config/locales/th.yml b/config/locales/th.yml index 8ef8cfda43..9a1b51f177 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -497,7 +497,6 @@ th: are_you_sure: คุณแน่ใจหรือไม่? assign_to_self: มอบหมายให้ฉัน assigned: ผู้ควบคุมที่ได้รับมอบหมาย - by_target_domain: โดเมนของบัญชีที่ได้รับการรายงาน comment: none: ไม่มี created_at: รายงานเมื่อ @@ -517,6 +516,7 @@ th: resolved: แก้ปัญหาแล้ว resolved_msg: แก้ปัญหารายงานสำเร็จ! status: สถานะ + target_domain: โดเมนของบัญชีที่ได้รับการรายงาน target_origin: จุดเริ่มต้นของบัญชีที่ได้รับการรายงาน title: รายงาน unassign: เลิกมอบหมาย diff --git a/config/locales/tr.yml b/config/locales/tr.yml index f78550a19a..1eb14a043b 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -554,7 +554,6 @@ tr: are_you_sure: Emin misiniz? assign_to_self: Bana ata assigned: Denetleyici atandı - by_target_domain: Şikayet edilen hesabın alan adı comment: none: Yok created_at: Şikayet edildi @@ -575,6 +574,7 @@ tr: resolved: Giderildi resolved_msg: Şikayet başarıyla çözümlendi! status: Durum + target_domain: Şikayet edilen hesabın alan adı target_origin: Şikayet edilen hesabın kökeni title: Şikayetler unassign: Atamayı geri al diff --git a/config/locales/uk.yml b/config/locales/uk.yml index f4e60f9218..e5cd1624e8 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -576,7 +576,6 @@ uk: are_you_sure: Ви впевнені? assign_to_self: Призначити мені assigned: Призначений модератор - by_target_domain: Домен облікового запису, на який скаржаться comment: none: Немає created_at: Створено @@ -597,6 +596,7 @@ uk: resolved: Вирішено resolved_msg: Скаргу успішно вирішено! status: Статус + target_domain: Домен облікового запису, на який скаржаться target_origin: Походження облікового запису, на який скаржаться title: Скарги unassign: Зняти призначення diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 01caf1ab0e..c02abef22f 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -524,7 +524,6 @@ vi: are_you_sure: Bạn có chắc không? assign_to_self: Giao cho tôi assigned: Người xử lý - by_target_domain: Tên tài khoản bị báo cáo comment: none: Không có mô tả created_at: Báo cáo lúc @@ -545,6 +544,7 @@ vi: resolved: Đã xử lý xong resolved_msg: Đã xử lý báo cáo xong! status: Trạng thái + target_domain: Tên tài khoản bị báo cáo target_origin: Nguồn đã báo cáo người dùng title: Báo cáo unassign: Bỏ qua diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 5fefb96f9e..41c47f60ea 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -524,7 +524,6 @@ zh-CN: are_you_sure: 你确定吗? assign_to_self: 接管 assigned: 已接管的监察员 - by_target_domain: 被举报账户的域名 comment: none: 没有 created_at: 举报时间 @@ -545,6 +544,7 @@ zh-CN: resolved: 已处理 resolved_msg: 举报处理成功! status: 状态 + target_domain: 被举报账户的域名 target_origin: 被举报账号的来源 title: 举报 unassign: 取消接管 diff --git a/config/locales/zh-HK.yml b/config/locales/zh-HK.yml index 185b88b511..bef228c139 100644 --- a/config/locales/zh-HK.yml +++ b/config/locales/zh-HK.yml @@ -526,7 +526,6 @@ zh-HK: are_you_sure: 你確認嗎? assign_to_self: 指派給自己 assigned: 指派版主 - by_target_domain: 被舉報帳號的域名 comment: none: 沒有 created_at: 日期 @@ -547,6 +546,7 @@ zh-HK: resolved: 已處理 resolved_msg: 舉報個案已被處理! status: 狀態 + target_domain: 被舉報帳號的域名 target_origin: 被檢舉帳號來源 title: 舉報 unassign: 取消指派 diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index b2cfeafac1..3cf511473f 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -542,7 +542,6 @@ zh-TW: are_you_sure: 你確定嗎? assign_to_self: 指派給自己 assigned: 指派負責人 - by_target_domain: 檢舉帳戶之網域 comment: none: 無 created_at: 日期 @@ -563,6 +562,7 @@ zh-TW: resolved: 已解決 resolved_msg: 檢舉已處理! status: 嘟文 + target_domain: 檢舉帳戶之網域 target_origin: 檢舉帳戶之來源 title: 檢舉 unassign: 取消指派 diff --git a/config/navigation.rb b/config/navigation.rb index fc03a2a778..05eb3f41a6 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -40,7 +40,7 @@ SimpleNavigation::Configuration.run do |navigation| n.item :moderation, safe_join([fa_icon('gavel fw'), t('moderation.title')]), admin_reports_url, if: proc { current_user.staff? } do |s| s.item :action_logs, safe_join([fa_icon('bars fw'), t('admin.action_logs.title')]), admin_action_logs_url - s.item :reports, safe_join([fa_icon('flag fw'), t('admin.reports.title')]), admin_reports_url, highlights_on: %r{/admin/reports} + s.item :reports, safe_join([fa_icon('flag fw'), t('admin.reports.title')]), admin_reports_url(status: :unresolved), highlights_on: %r{/admin/reports} s.item :accounts, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_accounts_url(origin: 'local'), highlights_on: %r{/admin/accounts|/admin/pending_accounts} s.item :invites, safe_join([fa_icon('user-plus fw'), t('admin.invites.title')]), admin_invites_path s.item :follow_recommendations, safe_join([fa_icon('user-plus fw'), t('admin.follow_recommendations.title')]), admin_follow_recommendations_path, highlights_on: %r{/admin/follow_recommendations}