From 09a28d7e8137e961b258b65b7531ac212f9ac7e2 Mon Sep 17 00:00:00 2001
From: Carelle Djuffo Nzangue <carelle.djuffo.nzangue@mni.thm.de>
Date: Wed, 2 Jun 2021 17:23:07 +0200
Subject: [PATCH] add tooltip to tagcloud pop-up

---
 .../tag-cloud-pop-up/tag-cloud-pop-up.component.html | 12 ++++++------
 src/assets/i18n/participant/de.json                  |  8 +++++++-
 src/assets/i18n/participant/en.json                  |  8 +++++++-
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/src/app/components/shared/tag-cloud/tag-cloud-pop-up/tag-cloud-pop-up.component.html b/src/app/components/shared/tag-cloud/tag-cloud-pop-up/tag-cloud-pop-up.component.html
index f9b420b84..21df5143e 100644
--- a/src/app/components/shared/tag-cloud/tag-cloud-pop-up/tag-cloud-pop-up.component.html
+++ b/src/app/components/shared/tag-cloud/tag-cloud-pop-up/tag-cloud-pop-up.component.html
@@ -1,27 +1,27 @@
 <div class="popupContainer">
   <span>
-    <mat-icon>comment</mat-icon>
+    <mat-icon matTooltip="{{'tag-cloud.overview-question-topic-tooltip' | translate}}">comment</mat-icon>
     <p>
       {{tagData && tagData.comments.length}}
     </p>
-    <mat-icon>person</mat-icon>
+    <mat-icon matTooltip="{{'tag-cloud.overview-questioners-topic-tooltip' | translate}}">person</mat-icon>
     <p>
       {{tagData && tagData.distinctUsers.size}}
     </p>
-    <mat-icon>thumb_up</mat-icon>
+    <mat-icon matTooltip="{{'tag-cloud.upvote-topic' | translate}}">thumb_up</mat-icon>
     <p>
       {{tagData && tagData.cachedUpVotes}}
     </p>
-    <mat-icon>thumb_down</mat-icon>
+    <mat-icon matTooltip="{{'tag-cloud.downvote-topic' | translate}}">thumb_down</mat-icon>
     <p>
       {{tagData && tagData.cachedDownVotes}}
     </p>
-    <mat-icon>date_range</mat-icon>
+    <mat-icon matTooltip="{{'tag-cloud.period-since-first-comment' | translate}}">date_range</mat-icon>
     <p>
       {{timePeriodText}}
     </p>
     <button *ngIf="user && user.role >= 1" mat-button (click)="addBlacklistWord()">
-      <mat-icon>gavel</mat-icon>
+      <mat-icon matTooltip="{{'tag-cloud.blacklist-topic' | translate}}">gavel</mat-icon>
     </button>
   </span>
   <div *ngIf="categories && categories.length">
diff --git a/src/assets/i18n/participant/de.json b/src/assets/i18n/participant/de.json
index 32070bcf4..7035b4f50 100644
--- a/src/assets/i18n/participant/de.json
+++ b/src/assets/i18n/participant/de.json
@@ -232,7 +232,13 @@
   "tag-cloud": {
     "config": "Wolkenansicht ändern",
     "administration": "Wolkenthemen editieren",
-    "demo-data-topic": "Thema %d"
+    "demo-data-topic": "Thema %d",
+    "overview-question-topic-tooltip": "Anzahl gestellter Fragen mit diesem Thema",
+    "overview-questioners-topic-tooltip": "Anzahl Fragensteller*innen mit diesem Thema",
+    "period-since-first-comment":"Zeitraum seit erstem Kommentar",
+    "upvotes-topic": "Upvotes für dieses Thema",
+    "downvotes-topic": "Downvotes für dieses Thema",
+    "blacklist-topic": "Thema zur Blacklist hinzufügen"
   },
   "tag-cloud-popup": {
     "few-seconds": "wenige Sekunden",
diff --git a/src/assets/i18n/participant/en.json b/src/assets/i18n/participant/en.json
index 8abddbaed..4c41236b9 100644
--- a/src/assets/i18n/participant/en.json
+++ b/src/assets/i18n/participant/en.json
@@ -238,7 +238,13 @@
   "tag-cloud": {
     "config": "Modify cloud view",
     "administration": "Edit cloud topics",
-    "demo-data-topic": "Topic %d"
+    "demo-data-topic": "Topic %d",
+    "overview-question-topic-tooltip": "Number of questions with this topic",
+    "overview-questioners-topic-tooltip": "Number of questioners with this topic",
+    "period-since-first-comment":"Period since first comment",
+    "upvote-topic": "Upvotes for this topic",
+    "downvote-topic": "Downvotes for this topic",
+    "blacklist-topic": "Add topic to blacklist"
   },
   "tag-cloud-popup": {
     "few-seconds": "few seconds",
-- 
GitLab