Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #10804 Prevent creation of duplicate tags #10850

Merged
merged 3 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.da-DK.json
Original file line number Diff line number Diff line change
Expand Up @@ -3960,6 +3960,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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.fi-FI.json
Original file line number Diff line number Diff line change
Expand Up @@ -2784,6 +2784,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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.hr-HR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.is-IS.json
Original file line number Diff line number Diff line change
Expand Up @@ -3993,6 +3993,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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.nl-NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.sk-SK.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.sv-SE.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.vi-VN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions web/client/translations/data.zh-ZH.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down