From 2ad3bb071030fe716636cfef2fdaf02bb1563e34 Mon Sep 17 00:00:00 2001 From: allyoucanmap Date: Tue, 25 Feb 2025 11:53:49 +0100 Subject: [PATCH 1/2] Fix #10804 Prevent creation of duplicate tags --- .../plugins/ResourcesCatalog/containers/TagsManager.jsx | 7 +++++-- web/client/translations/data.da-DK.json | 1 + web/client/translations/data.de-DE.json | 1 + web/client/translations/data.en-US.json | 1 + web/client/translations/data.es-ES.json | 1 + web/client/translations/data.fi-FI.json | 1 + web/client/translations/data.fr-FR.json | 1 + web/client/translations/data.hr-HR.json | 1 + web/client/translations/data.is-IS.json | 1 + web/client/translations/data.it-IT.json | 1 + web/client/translations/data.nl-NL.json | 1 + web/client/translations/data.pt-PT.json | 1 + web/client/translations/data.sk-SK.json | 1 + web/client/translations/data.sv-SE.json | 1 + web/client/translations/data.vi-VN.json | 1 + web/client/translations/data.zh-ZH.json | 1 + 16 files changed, 20 insertions(+), 2 deletions(-) diff --git a/web/client/plugins/ResourcesCatalog/containers/TagsManager.jsx b/web/client/plugins/ResourcesCatalog/containers/TagsManager.jsx index ac956501cf..a453280ac4 100644 --- a/web/client/plugins/ResourcesCatalog/containers/TagsManager.jsx +++ b/web/client/plugins/ResourcesCatalog/containers/TagsManager.jsx @@ -108,8 +108,11 @@ function TagsManager({ setNewTag(null); } })) - .catch(() => isMounted(() => { - setErrorId('resourcesCatalog.errorUpdatingTag'); + .catch((error) => isMounted(() => { + setErrorId(error.status === 409 + ? 'resourcesCatalog.errorTagNameAlreadyExist' + : 'resourcesCatalog.errorUpdatingTag' + ); })) .finally(() => isMounted(() => { setLoading(false); diff --git a/web/client/translations/data.da-DK.json b/web/client/translations/data.da-DK.json index 68fcde53c9..c7ade8b361 100644 --- a/web/client/translations/data.da-DK.json +++ b/web/client/translations/data.da-DK.json @@ -3961,6 +3961,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.de-DE.json b/web/client/translations/data.de-DE.json index 43599d21c5..94b9a11c95 100644 --- a/web/client/translations/data.de-DE.json +++ b/web/client/translations/data.de-DE.json @@ -4380,6 +4380,7 @@ "manageTags": "Tags verwalten", "errorLoadingTags": "Es ist nicht möglich, Tags zu laden", "errorUpdatingTag": "Es ist nicht möglich, das Tag zu aktualisieren", + "errorTagNameAlreadyExist": "Ein Tag mit dem gleichen Namen existiert bereits", "errorDeletingTag": "Es ist nicht möglich, das Tag zu löschen", "removeFromFavorites": "Aus Favoriten entfernen", "addToFavorites": "Zu Favoriten hinzufügen", diff --git a/web/client/translations/data.en-US.json b/web/client/translations/data.en-US.json index 921039edd4..729ec42ab6 100644 --- a/web/client/translations/data.en-US.json +++ b/web/client/translations/data.en-US.json @@ -4353,6 +4353,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.es-ES.json b/web/client/translations/data.es-ES.json index 1af52bf1d0..2bebd05657 100644 --- a/web/client/translations/data.es-ES.json +++ b/web/client/translations/data.es-ES.json @@ -4342,6 +4342,7 @@ "manageTags": "Administrar etiquetas", "errorLoadingTags": "No es posible cargar etiquetas", "errorUpdatingTag": "No es posible actualizar la etiqueta", + "errorTagNameAlreadyExist": "Ya existe una etiqueta con el mismo nombre", "errorDeletingTag": "No es posible eliminar la etiqueta", "removeFromFavorites": "Eliminar de favoritos", "addToFavorites": "Añadir a favoritos", diff --git a/web/client/translations/data.fi-FI.json b/web/client/translations/data.fi-FI.json index 066f6e43f3..6aa5e194d4 100644 --- a/web/client/translations/data.fi-FI.json +++ b/web/client/translations/data.fi-FI.json @@ -2785,6 +2785,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.fr-FR.json b/web/client/translations/data.fr-FR.json index 0ad1644fea..16467356ac 100644 --- a/web/client/translations/data.fr-FR.json +++ b/web/client/translations/data.fr-FR.json @@ -4342,6 +4342,7 @@ "manageTags": "Gérer les tags", "errorLoadingTags": "Il n'est pas possible de charger des balises", "errorUpdatingTag": "Il n'est pas possible de mettre à jour la balise", + "errorTagNameAlreadyExist": "Une balise portant le même nom existe déjà", "errorDeletingTag": "Il n'est pas possible de supprimer la balise", "removeFromFavorites": "Supprimer des favoris", "addToFavorites": "Ajouter aux favoris", diff --git a/web/client/translations/data.hr-HR.json b/web/client/translations/data.hr-HR.json index d738615a8a..1a0df29602 100644 --- a/web/client/translations/data.hr-HR.json +++ b/web/client/translations/data.hr-HR.json @@ -2183,6 +2183,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.is-IS.json b/web/client/translations/data.is-IS.json index ee08572109..3e8cbf8654 100644 --- a/web/client/translations/data.is-IS.json +++ b/web/client/translations/data.is-IS.json @@ -3994,6 +3994,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.it-IT.json b/web/client/translations/data.it-IT.json index 2b98751224..b7ca7e1270 100644 --- a/web/client/translations/data.it-IT.json +++ b/web/client/translations/data.it-IT.json @@ -4340,6 +4340,7 @@ "manageTags": "Gestisci tag", "errorLoadingTags": "Impossibile caricare i tag", "errorUpdatingTag": "Impossibile aggiornare il tag", + "errorTagNameAlreadyExist": "Esiste già un tag con lo stesso nome", "errorDeletingTag": "Impossibile eliminare il tag", "removeFromFavorites": "Rimuovi dai preferiti", "addToFavorites": "Aggiungi ai preferiti", diff --git a/web/client/translations/data.nl-NL.json b/web/client/translations/data.nl-NL.json index 2c15c8f07a..53e77f3095 100644 --- a/web/client/translations/data.nl-NL.json +++ b/web/client/translations/data.nl-NL.json @@ -4328,6 +4328,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.pt-PT.json b/web/client/translations/data.pt-PT.json index 311f65bd05..6c7fa0a926 100644 --- a/web/client/translations/data.pt-PT.json +++ b/web/client/translations/data.pt-PT.json @@ -2140,6 +2140,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.sk-SK.json b/web/client/translations/data.sk-SK.json index 2f75397ca7..c310dc131e 100644 --- a/web/client/translations/data.sk-SK.json +++ b/web/client/translations/data.sk-SK.json @@ -3500,6 +3500,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.sv-SE.json b/web/client/translations/data.sv-SE.json index 363d452513..29a2c8f47e 100644 --- a/web/client/translations/data.sv-SE.json +++ b/web/client/translations/data.sv-SE.json @@ -3539,6 +3539,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.vi-VN.json b/web/client/translations/data.vi-VN.json index eab62a4ff9..d651e0f756 100644 --- a/web/client/translations/data.vi-VN.json +++ b/web/client/translations/data.vi-VN.json @@ -2169,6 +2169,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.zh-ZH.json b/web/client/translations/data.zh-ZH.json index 0954b59f49..7738cfb88f 100644 --- a/web/client/translations/data.zh-ZH.json +++ b/web/client/translations/data.zh-ZH.json @@ -2116,6 +2116,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "A tag with the same name already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", From 2b6a144aa8cabec22567e21b8f8d27d6e99f7096 Mon Sep 17 00:00:00 2001 From: allyoucanmap Date: Tue, 25 Feb 2025 17:11:24 +0100 Subject: [PATCH 2/2] update translations --- web/client/translations/data.da-DK.json | 2 +- web/client/translations/data.de-DE.json | 1 + web/client/translations/data.en-US.json | 1 + web/client/translations/data.es-ES.json | 1 + web/client/translations/data.fi-FI.json | 2 +- web/client/translations/data.fr-FR.json | 1 + web/client/translations/data.hr-HR.json | 1 + web/client/translations/data.is-IS.json | 2 +- web/client/translations/data.it-IT.json | 1 + web/client/translations/data.nl-NL.json | 1 + web/client/translations/data.pt-PT.json | 1 + web/client/translations/data.sk-SK.json | 1 + web/client/translations/data.sv-SE.json | 1 + web/client/translations/data.vi-VN.json | 1 + web/client/translations/data.zh-ZH.json | 1 + 15 files changed, 15 insertions(+), 3 deletions(-) diff --git a/web/client/translations/data.da-DK.json b/web/client/translations/data.da-DK.json index 11f6ecfc83..d58768546b 100644 --- a/web/client/translations/data.da-DK.json +++ b/web/client/translations/data.da-DK.json @@ -3960,7 +3960,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", - "errorTagNameAlreadyExist": "A tag with the same name already exists", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.de-DE.json b/web/client/translations/data.de-DE.json index 5c256cf645..bce161e5e6 100644 --- a/web/client/translations/data.de-DE.json +++ b/web/client/translations/data.de-DE.json @@ -4378,6 +4378,7 @@ "manageTags": "Tags verwalten", "errorLoadingTags": "Es ist nicht möglich, Tags zu laden", "errorUpdatingTag": "Es ist nicht möglich, das Tag zu aktualisieren", + "errorTagNameAlreadyExist": "Das Tag, das Sie erstellen möchten, existiert bereits", "errorDeletingTag": "Es ist nicht möglich, das Tag zu löschen", "removeFromFavorites": "Aus Favoriten entfernen", "addToFavorites": "Zu Favoriten hinzufügen", diff --git a/web/client/translations/data.en-US.json b/web/client/translations/data.en-US.json index fbee13fd7c..552768804e 100644 --- a/web/client/translations/data.en-US.json +++ b/web/client/translations/data.en-US.json @@ -4349,6 +4349,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.es-ES.json b/web/client/translations/data.es-ES.json index da39989c03..b1fdeb9284 100644 --- a/web/client/translations/data.es-ES.json +++ b/web/client/translations/data.es-ES.json @@ -4339,6 +4339,7 @@ "manageTags": "Administrar etiquetas", "errorLoadingTags": "No es posible cargar etiquetas", "errorUpdatingTag": "No es posible actualizar la etiqueta", + "errorTagNameAlreadyExist": "La etiqueta que estás intentando crear ya existe", "errorDeletingTag": "No es posible eliminar la etiqueta", "removeFromFavorites": "Eliminar de favoritos", "addToFavorites": "Añadir a favoritos", diff --git a/web/client/translations/data.fi-FI.json b/web/client/translations/data.fi-FI.json index 4861e9ed40..fdb881aeff 100644 --- a/web/client/translations/data.fi-FI.json +++ b/web/client/translations/data.fi-FI.json @@ -2784,7 +2784,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", - "errorTagNameAlreadyExist": "A tag with the same name already exists", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.fr-FR.json b/web/client/translations/data.fr-FR.json index aeb660c721..7acb64a9d7 100644 --- a/web/client/translations/data.fr-FR.json +++ b/web/client/translations/data.fr-FR.json @@ -4340,6 +4340,7 @@ "manageTags": "Gérer les tags", "errorLoadingTags": "Il n'est pas possible de charger des balises", "errorUpdatingTag": "Il n'est pas possible de mettre à jour la balise", + "errorTagNameAlreadyExist": "La balise que vous essayez de créer existe déjà", "errorDeletingTag": "Il n'est pas possible de supprimer la balise", "removeFromFavorites": "Supprimer des favoris", "addToFavorites": "Ajouter aux favoris", diff --git a/web/client/translations/data.hr-HR.json b/web/client/translations/data.hr-HR.json index 00aea34245..27a251478e 100644 --- a/web/client/translations/data.hr-HR.json +++ b/web/client/translations/data.hr-HR.json @@ -2180,6 +2180,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.is-IS.json b/web/client/translations/data.is-IS.json index f9b0188524..17ab73cbf5 100644 --- a/web/client/translations/data.is-IS.json +++ b/web/client/translations/data.is-IS.json @@ -3993,7 +3993,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", - "errorTagNameAlreadyExist": "A tag with the same name already exists", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.it-IT.json b/web/client/translations/data.it-IT.json index 1988fa4904..3789d476e4 100644 --- a/web/client/translations/data.it-IT.json +++ b/web/client/translations/data.it-IT.json @@ -4342,6 +4342,7 @@ "manageTags": "Gestisci tag", "errorLoadingTags": "Impossibile caricare i tag", "errorUpdatingTag": "Impossibile aggiornare il tag", + "errorTagNameAlreadyExist": "Il tag che stai tentando di creare esiste già", "errorDeletingTag": "Impossibile eliminare il tag", "removeFromFavorites": "Rimuovi dai preferiti", "addToFavorites": "Aggiungi ai preferiti", diff --git a/web/client/translations/data.nl-NL.json b/web/client/translations/data.nl-NL.json index 923bba44c7..d22035ef72 100644 --- a/web/client/translations/data.nl-NL.json +++ b/web/client/translations/data.nl-NL.json @@ -4324,6 +4324,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.pt-PT.json b/web/client/translations/data.pt-PT.json index f53c864e2d..c52a6a9b10 100644 --- a/web/client/translations/data.pt-PT.json +++ b/web/client/translations/data.pt-PT.json @@ -2138,6 +2138,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.sk-SK.json b/web/client/translations/data.sk-SK.json index 514a1474e9..af79954818 100644 --- a/web/client/translations/data.sk-SK.json +++ b/web/client/translations/data.sk-SK.json @@ -3498,6 +3498,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.sv-SE.json b/web/client/translations/data.sv-SE.json index d6f1af1b3e..27a349c490 100644 --- a/web/client/translations/data.sv-SE.json +++ b/web/client/translations/data.sv-SE.json @@ -3535,6 +3535,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.vi-VN.json b/web/client/translations/data.vi-VN.json index 396a32e99e..84f5500d8f 100644 --- a/web/client/translations/data.vi-VN.json +++ b/web/client/translations/data.vi-VN.json @@ -2168,6 +2168,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites", diff --git a/web/client/translations/data.zh-ZH.json b/web/client/translations/data.zh-ZH.json index b010ad2caf..daed4f588d 100644 --- a/web/client/translations/data.zh-ZH.json +++ b/web/client/translations/data.zh-ZH.json @@ -2113,6 +2113,7 @@ "manageTags": "Manage tags", "errorLoadingTags": "It is not possible to load tags", "errorUpdatingTag": "It is not possible to update the tag", + "errorTagNameAlreadyExist": "The tag you are trying to create already exists", "errorDeletingTag": "It is not possible to delete the tag", "removeFromFavorites": "Remove from favorites", "addToFavorites": "Add to favorites",