diff --git a/backend/src/schema/types/type/Category.gql b/backend/src/schema/types/type/Category.gql index 5920ebbdb..9ee628d76 100644 --- a/backend/src/schema/types/type/Category.gql +++ b/backend/src/schema/types/type/Category.gql @@ -10,4 +10,4 @@ type Category { posts: [Post]! @relation(name: "CATEGORIZED", direction: "IN") postCount: Int! @cypher(statement: "MATCH (this)<-[:CATEGORIZED]-(r:Post) RETURN COUNT(r)") -} \ No newline at end of file +} diff --git a/backend/src/seed/seed-db.js b/backend/src/seed/seed-db.js index c3a05248d..adfdb57b7 100644 --- a/backend/src/seed/seed-db.js +++ b/backend/src/seed/seed-db.js @@ -180,13 +180,13 @@ import Factory from './factories' f.create('Category', { id: 'cat1', name: 'Just For Fun', - slug: 'justforfun', + slug: 'just-for-fun', icon: 'smile', }), f.create('Category', { id: 'cat2', - name: 'Happyness & Values', - slug: 'happyness-values', + name: 'Happiness & Values', + slug: 'happiness-values', icon: 'heart-o', }), f.create('Category', { @@ -204,13 +204,13 @@ import Factory from './factories' f.create('Category', { id: 'cat5', name: 'Animal Protection', - slug: 'animalprotection', + slug: 'animal-protection', icon: 'paw', }), f.create('Category', { id: 'cat6', - name: 'Humanrights Justice', - slug: 'humanrights-justice', + name: 'Human Rights & Justice', + slug: 'human-rights-justice', icon: 'balance-scale', }), f.create('Category', { @@ -246,19 +246,19 @@ import Factory from './factories' f.create('Category', { id: 'cat12', name: 'IT, Internet & Data Privacy', - slug: 'it-internet-dataprivacy', + slug: 'it-internet-data-privacy', icon: 'mouse-pointer', }), f.create('Category', { id: 'cat13', - name: 'Art, Curlure & Sport', + name: 'Art, Culture & Sport', slug: 'art-culture-sport', icon: 'paint-brush', }), f.create('Category', { id: 'cat14', name: 'Freedom of Speech', - slug: 'freedomofspeech', + slug: 'freedom-of-speech', icon: 'bullhorn', }), f.create('Category', { @@ -270,7 +270,7 @@ import Factory from './factories' f.create('Category', { id: 'cat16', name: 'Global Peace & Nonviolence', - slug: 'globalpeace-nonviolence', + slug: 'global-peace-nonviolence', icon: 'angellist', }), ]) diff --git a/deployment/legacy-migration/maintenance-worker/migration/neo4j/categories/categories.cql b/deployment/legacy-migration/maintenance-worker/migration/neo4j/categories/categories.cql index 0862fe0d9..5d4958876 100644 --- a/deployment/legacy-migration/maintenance-worker/migration/neo4j/categories/categories.cql +++ b/deployment/legacy-migration/maintenance-worker/migration/neo4j/categories/categories.cql @@ -43,11 +43,13 @@ c.updatedAt = category.updatedAt.`$date` MATCH (c:Category) WHERE (c.icon = "categories-justforfun") SET c.icon = 'smile' +SET c.slug = 'just-for-fun' ; MATCH (c:Category) WHERE (c.icon = "categories-luck") SET c.icon = 'heart-o' +SET c.slug = 'happiness-values' ; MATCH (c:Category) @@ -63,11 +65,14 @@ SET c.icon = 'tree' MATCH (c:Category) WHERE (c.icon = "categories-animal-justice") SET c.icon = 'paw' +SET c.slug = 'animal-protection' ; MATCH (c:Category) WHERE (c.icon = "categories-human-rights") SET c.icon = 'balance-scale' +SET c.slug = 'human-rights-justice' + ; MATCH (c:Category) @@ -98,6 +103,7 @@ SET c.icon = 'flash' MATCH (c:Category) WHERE (c.icon = "categories-internet") SET c.icon = 'mouse-pointer' +SET c.slug = 'it-internet-data-privacy' ; MATCH (c:Category) @@ -108,6 +114,7 @@ SET c.icon = 'paint-brush' MATCH (c:Category) WHERE (c.icon = "categories-freedom-of-speech") SET c.icon = 'bullhorn' +SET c.slug = 'freedom-of-speech' ; MATCH (c:Category) @@ -118,4 +125,5 @@ SET c.icon = 'shopping-cart' MATCH (c:Category) WHERE (c.icon = "categories-peace") SET c.icon = 'angellist' +SET c.slug = 'global-peace-nonviolence' ; diff --git a/deployment/legacy-migration/maintenance-worker/migration/neo4j/users/users.cql b/deployment/legacy-migration/maintenance-worker/migration/neo4j/users/users.cql index 7574fd3b2..a1045bdeb 100644 --- a/deployment/legacy-migration/maintenance-worker/migration/neo4j/users/users.cql +++ b/deployment/legacy-migration/maintenance-worker/migration/neo4j/users/users.cql @@ -117,7 +117,7 @@ MERGE (e:EmailAddress { verifiedAt: toString(datetime()) }) MERGE (e)-[:BELONGS_TO]->(u) -MERGE (u)<-[:PRIMARY_EMAIL]-(e) +MERGE (u)-[:PRIMARY_EMAIL]->(e) WITH u, user, user.badgeIds AS badgeIds UNWIND badgeIds AS badgeId MATCH (b:Badge {id: badgeId}) diff --git a/webapp/components/CategoriesSelect/CategoriesSelect.vue b/webapp/components/CategoriesSelect/CategoriesSelect.vue index 94276a958..dd4b6224d 100644 --- a/webapp/components/CategoriesSelect/CategoriesSelect.vue +++ b/webapp/components/CategoriesSelect/CategoriesSelect.vue @@ -10,7 +10,7 @@ :disabled="isDisabled(category.id)" > - {{ category.name }} + {{ $t(`contribution.category.name.${category.slug}`) }} @@ -88,6 +88,7 @@ export default { return CategoryQuery() }, result(result) { + console.log('result', result) this.categories = result.data.Category }, }, diff --git a/webapp/components/FilterPosts/FilterPostsMenuItems.vue b/webapp/components/FilterPosts/FilterPostsMenuItems.vue index 4db44aa41..c761070b7 100644 --- a/webapp/components/FilterPosts/FilterPostsMenuItems.vue +++ b/webapp/components/FilterPosts/FilterPostsMenuItems.vue @@ -5,7 +5,7 @@ {{ $t('filter-posts.categories.header') }} - + - + diff --git a/webapp/graphql/CategoryQuery.js b/webapp/graphql/CategoryQuery.js index a11dcc8e1..a6a49e2c0 100644 --- a/webapp/graphql/CategoryQuery.js +++ b/webapp/graphql/CategoryQuery.js @@ -4,7 +4,7 @@ export default () => { return gql(`{ Category { id - name + slug icon } }`) diff --git a/webapp/locales/de.json b/webapp/locales/de.json index d009240d9..046704195 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -436,6 +436,26 @@ "cry": "Zum Weinen", "angry": "Verärgert", "emoted": "angegeben" + }, + "category": { + "name": { + "freedom-of-speech": "Redefreiheit", + "consumption-sustainability": "Verbrauch & Nachhaltigkeit", + "global-peace-nonviolence": "Globaler Frieden & Gewaltlosigkeit", + "just-for-fun": "Nur zum Spaß", + "happiness-values": "Glück & Werte", + "health-wellbeing": "Gesundheit & Wohlbefinden", + "environment-nature": "Umwelt & Natur", + "animal-protection": "Schutz der Tiere", + "human-rights-justice": "Menschenrechte & Gerechtigkeit", + "education-sciences": "Bildung & Wissenschaft", + "cooperation-development": "Zusammenarbeit & Entwicklung", + "democracy-politics": "Demokratie & Politik", + "economy-finances": "Wirtschaft & Finanzen", + "energy-technology": "Energie & Technologie", + "it-internet-data-privacy": "IT, Internet & Datenschutz", + "art-culture-sport": "Kunst, Kultur & Sport" + } } }, "changelog": { diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 474a5a232..3ac767e00 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -436,6 +436,26 @@ "cry": "Cry", "angry": "Angry", "emoted": "emoted" + }, + "category": { + "name": { + "freedom-of-speech": "Freedom of Speech", + "consumption-sustainability": "Consumption & Sustainability", + "global-peace-nonviolence": "Global Peace & Nonviolence", + "just-for-fun": "Just for Fun", + "happiness-values": "Happiness & Values", + "health-wellbeing": "Health & Wellbeing", + "environment-nature": "Environment & Nature", + "animal-protection": "Animal Protection", + "human-rights-justice": "Human Rights & Justice", + "education-sciences": "Education & Sciences", + "cooperation-development": "Cooperation & Development", + "democracy-politics": "Democracy & Politics", + "economy-finances": "Economy & Finances", + "energy-technology": "Energy & Technology", + "it-internet-data-privacy": "IT, Internet & Data Privacy", + "art-culture-sport": "Art, Culture, & Sport" + } } }, "changelog": {