From c7849cedd85612345d80ecafa4f02b8f9295bd9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 14 Oct 2019 16:12:21 +0200 Subject: [PATCH] Rename report reason category names to have '_' instead '-' --- backend/src/seed/seed-db.js | 2 +- cypress/integration/moderation/ReportContent.feature | 2 +- shared/moderation/report.js | 12 ++++++------ webapp/locales/de.json | 12 ++++++------ webapp/locales/en.json | 12 ++++++------ 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/backend/src/seed/seed-db.js b/backend/src/seed/seed-db.js index 9a16a8306..789211373 100644 --- a/backend/src/seed/seed-db.js +++ b/backend/src/seed/seed-db.js @@ -673,7 +673,7 @@ import { gql } from '../jest/helpers' mutation: reportMutation, variables: { resourceId: 'p1', - reasonCategory: 'discrimination-etc', + reasonCategory: 'discrimination_etc', reasonDescription: 'This post is bigoted', }, }), diff --git a/cypress/integration/moderation/ReportContent.feature b/cypress/integration/moderation/ReportContent.feature index 5701841cf..4eceb4bdf 100644 --- a/cypress/integration/moderation/ReportContent.feature +++ b/cypress/integration/moderation/ReportContent.feature @@ -51,7 +51,7 @@ Feature: Report and Moderate Scenario: Review reported content Given somebody reported the following posts: | submitterEmail | resourceId | reasonCategory | reasonDescription | - | p1.submitter@example.org | p1 | discrimination-etc | Offensive content | + | p1.submitter@example.org | p1 | discrimination_etc | Offensive content | And I am logged in with a "moderator" role When I click on the avatar menu in the top right corner And I click on "Moderation" diff --git a/shared/moderation/report.js b/shared/moderation/report.js index a90837f67..aad4aeed4 100644 --- a/shared/moderation/report.js +++ b/shared/moderation/report.js @@ -1,12 +1,12 @@ export const reportReasonCategoriesDatabaseList = () => { return [ 'other', // element # zero, because it is the nutral one - 'discrimination-etc', - 'pornographic-content-links', - 'glorific-trivia-of-cruel-inhuman-acts', + 'discrimination_etc', + 'pornographic_content_links', + 'glorific_trivia_of_cruel_inhuman_acts', 'doxing', - 'intentional-intimidation-stalking-persecution', - 'advert-products-services-commercial', - 'criminal-behavior-violation-german-law', + 'intentional_intimidation_stalking_persecution', + 'advert_products_services_commercial', + 'criminal_behavior_violation_german_law', ] } diff --git a/webapp/locales/de.json b/webapp/locales/de.json index 333f9ceea..6620bb6b2 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -498,13 +498,13 @@ "label": "Wähle eine Kategorie:", "placeholder": "Kategorie …", "options": { - "discrimination-etc": "Diskriminierende Beiträge, Kommentare, Äußerungen oder Beleidigungen.", - "pornographic-content-links": "Das Posten oder Verlinken eindeutig pornografischen Materials.", - "glorific-trivia-of-cruel-inhuman-acts": "Verherrlichung oder Verharmlosung grausamer oder unmenschlicher Gewalttätigkeiten.", + "discrimination_etc": "Diskriminierende Beiträge, Kommentare, Äußerungen oder Beleidigungen.", + "pornographic_content_links": "Das Posten oder Verlinken eindeutig pornografischen Materials.", + "glorific_trivia_of_cruel_inhuman_acts": "Verherrlichung oder Verharmlosung grausamer oder unmenschlicher Gewalttätigkeiten.", "doxing": "Das Veröffentlichen von personenbezogenen Daten anderer ohne deren Einverständnis oder das Androhen dessen (\"Doxing\").", - "intentional-intimidation-stalking-persecution": "Absichtliche Einschüchterung, Stalking oder Verfolgung.", - "advert-products-services-commercial": "Bewerben von Produkten und Dienstleistungen mit kommerzieller Absicht.", - "criminal-behavior-violation-german-law": "Strafbares Verhalten bzw. Verstoß gegen deutsches Recht.", + "intentional_intimidation_stalking_persecution": "Absichtliche Einschüchterung, Stalking oder Verfolgung.", + "advert_products_services_commercial": "Bewerben von Produkten und Dienstleistungen mit kommerzieller Absicht.", + "criminal_behavior_violation_german_law": "Strafbares Verhalten bzw. Verstoß gegen deutsches Recht.", "other": "Andere …" } }, diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 638ea94c5..7a901ebd1 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -499,13 +499,13 @@ "label": "Select a category:", "placeholder": "Category …", "options": { - "discrimination-etc": "Discriminatory posts, comments, utterances or insults.", - "pornographic-content-links": "Posting or linking of clearly pornographic material.", - "glorific-trivia-of-cruel-inhuman-acts": "Glorification or trivialization of cruel or inhuman acts of violence.", + "discrimination_etc": "Discriminatory posts, comments, utterances or insults.", + "pornographic_content_links": "Posting or linking of clearly pornographic material.", + "glorific_trivia_of_cruel_inhuman_acts": "Glorification or trivialization of cruel or inhuman acts of violence.", "doxing": "The disclosure of others' personal information without their consent or threat there of (\"doxing\").", - "intentional-intimidation-stalking-persecution": "Intentional intimidation, stalking or persecution.", - "advert-products-services-commercial": "Advertising products and services with commercial intent.", - "criminal-behavior-violation-german-law": "Criminal behavior or violation of German law.", + "intentional_intimidation_stalking_persecution": "Intentional intimidation, stalking or persecution.", + "advert_products_services_commercial": "Advertising products and services with commercial intent.", + "criminal_behavior_violation_german_law": "Criminal behavior or violation of German law.", "other": "Other …" } },