From 191be0f8e43ea20b2a4e9888978eb32379cea212 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 2 Mar 2021 17:34:28 +0100 Subject: [PATCH] Fix success message when validating group follower Closes #612 Signed-off-by: Thomas Citharel --- js/src/i18n/en_US.json | 3 ++- js/src/i18n/fr_FR.json | 3 ++- js/src/views/Group/GroupFollowers.vue | 13 ++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index 5746d4a0a..a4c991b78 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -956,5 +956,6 @@ "The group's avatar was changed.": "The group's avatar was changed.", "The group's banner was changed.": "The group's banner was changed.", "The group's short description was changed.": "The group's short description was changed.", - "No information": "No information" + "No information": "No information", + "@{username}'s follow request was accepted": "@{username}'s follow request was accepted" } diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index a4fa938e7..8ad571e53 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -1050,5 +1050,6 @@ "{title} ({count} todos)": "{title} ({count} todos)", "{username} was invited to {group}": "{username} a été invité à {group}", "© The OpenStreetMap Contributors": "© Les Contributeur⋅ices OpenStreetMap", - "No information": "Non renseigné" + "No information": "Non renseigné", + "@{username}'s follow request was accepted": "@{username}'s follow request was accepted" } diff --git a/js/src/views/Group/GroupFollowers.vue b/js/src/views/Group/GroupFollowers.vue index 712a34fec..47f24c97b 100644 --- a/js/src/views/Group/GroupFollowers.vue +++ b/js/src/views/Group/GroupFollowers.vue @@ -245,11 +245,14 @@ export default class GroupFollowers extends mixins(GroupMixin) { }, ], }); - this.$notifier.success( - this.$t("@{username}'s follow request was rejected", { - username: follower.actor.preferredUsername, - }) as string - ); + const message = approved + ? this.$t("@{username}'s follow request was accepted", { + username: follower.actor.preferredUsername, + }) + : this.$t("@{username}'s follow request was rejected", { + username: follower.actor.preferredUsername, + }); + this.$notifier.success(message as string); } catch (error) { console.error(error); if (error.graphQLErrors && error.graphQLErrors.length > 0) {