[WEB-4196]fix: toast message for sub work item quick actions (#7688)

* fix: toast message for sub work item quick actions

* chore: updated translation files
This commit is contained in:
Vamsi Krishna 2025-09-02 18:02:30 +05:30 committed by GitHub
parent 779a96acb8
commit 569b2fba83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 100 additions and 6 deletions

View file

@ -46,7 +46,10 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub
type: TOAST_TYPE.SUCCESS,
title: t("common.link_copied"),
message: t("entity.link_copied_to_clipboard", {
entity: t("epic.label", { count: 1 }),
entity:
issueServiceType === EIssueServiceType.ISSUES
? t("common.sub_work_items", { count: 1 })
: t("issue.label", { count: 1 }),
}),
});
});
@ -77,7 +80,7 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub
entity:
issueServiceType === EIssueServiceType.ISSUES
? t("common.sub_work_items")
: t("issue.label", { count: 2 }),
: t("issue.label", { count: issueIds.length }),
}),
});
} catch {
@ -88,7 +91,7 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub
entity:
issueServiceType === EIssueServiceType.ISSUES
? t("common.sub_work_items")
: t("issue.label", { count: 2 }),
: t("issue.label", { count: issueIds.length }),
}),
});
}
@ -169,7 +172,12 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub
setToast({
type: TOAST_TYPE.SUCCESS,
title: t("toast.success"),
message: t("sub_work_item.remove.success"),
message: t("entity.remove.success", {
entity:
issueServiceType === EIssueServiceType.ISSUES
? t("common.sub_work_items")
: t("issue.label", { count: 1 }),
}),
});
captureSuccess({
eventName: WORK_ITEM_TRACKER_EVENTS.sub_issue.remove,
@ -185,7 +193,12 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub
setToast({
type: TOAST_TYPE.ERROR,
title: t("toast.error"),
message: t("sub_work_item.remove.error"),
message: t("entity.remove.failed", {
entity:
issueServiceType === EIssueServiceType.ISSUES
? t("common.sub_work_items")
: t("issue.label", { count: 1 }),
}),
});
}
},
@ -208,7 +221,12 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub
setToast({
type: TOAST_TYPE.ERROR,
title: t("toast.error"),
message: t("issue.delete.error"),
message: t("entity.delete.failed", {
entity:
issueServiceType === EIssueServiceType.ISSUES
? t("common.sub_work_items")
: t("issue.label", { count: 1 }),
}),
});
}
},

View file

@ -916,6 +916,10 @@
"add": {
"success": "{entity} úspěšně přidána",
"failed": "Chyba při přidávání {entity}"
},
"remove": {
"success": "{entity} úspěšně odebrána",
"failed": "Chyba při odebírání {entity}"
}
},
"epic": {

View file

@ -916,6 +916,10 @@
"add": {
"success": "{entity} erfolgreich hinzugefügt",
"failed": "Fehler beim Hinzufügen von {entity}"
},
"remove": {
"success": "{entity} erfolgreich entfernt",
"failed": "Fehler beim Entfernen von {entity}"
}
},
"epic": {

View file

@ -759,6 +759,10 @@
"add": {
"success": "{entity} added successfully",
"failed": "Error adding {entity}"
},
"remove": {
"success": "{entity} removed successfully",
"failed": "Error removing {entity}"
}
},
"epic": {

View file

@ -919,6 +919,10 @@
"add": {
"success": "{entity} agregado correctamente",
"failed": "Error al agregar {entity}"
},
"remove": {
"success": "{entity} eliminado correctamente",
"failed": "Error al eliminar {entity}"
}
},
"epic": {

View file

@ -917,6 +917,10 @@
"add": {
"success": "{entity} ajouté avec succès",
"failed": "Erreur lors de l'ajout de {entity}"
},
"remove": {
"success": "{entity} supprimé avec succès",
"failed": "Erreur lors de la suppression de {entity}"
}
},
"epic": {

View file

@ -916,6 +916,10 @@
"add": {
"success": "{entity} berhasil ditambahkan",
"failed": "Terjadi kesalahan saat menambahkan {entity}"
},
"remove": {
"success": "{entity} berhasil dihapus",
"failed": "Terjadi kesalahan saat menghapus {entity}"
}
},
"epic": {

View file

@ -915,6 +915,10 @@
"add": {
"success": "{entity} aggiunto con successo",
"failed": "Errore nell'aggiunta di {entity}"
},
"remove": {
"success": "{entity} rimosso con successo",
"failed": "Errore nella rimozione di {entity}"
}
},
"epic": {

View file

@ -917,6 +917,10 @@
"add": {
"success": "{entity}を追加しました",
"failed": "{entity}の追加中にエラーが発生しました"
},
"remove": {
"success": "{entity}を削除しました",
"failed": "{entity}の削除中にエラーが発生しました"
}
},
"epic": {

View file

@ -918,6 +918,10 @@
"add": {
"success": "{entity}가 성공적으로 추가되었습니다",
"failed": "{entity} 추가 중 오류 발생"
},
"remove": {
"success": "{entity}가 성공적으로 제거되었습니다",
"failed": "{entity} 제거 중 오류 발생"
}
},
"epic": {

View file

@ -918,6 +918,10 @@
"add": {
"success": "{entity} dodano pomyślnie",
"failed": "Błąd podczas dodawania {entity}"
},
"remove": {
"success": "{entity} usunięto pomyślnie",
"failed": "Błąd podczas usuwania {entity}"
}
},
"epic": {

View file

@ -918,6 +918,10 @@
"add": {
"success": "{entity} adicionado com sucesso",
"failed": "Erro ao adicionar {entity}"
},
"remove": {
"success": "{entity} removido com sucesso",
"failed": "Erro ao remover {entity}"
}
},
"epic": {

View file

@ -916,6 +916,10 @@
"add": {
"success": "{entity} a fost adăugată cu succes",
"failed": "Eroare la adăugarea {entity}"
},
"remove": {
"success": "{entity} a fost eliminată cu succes",
"failed": "Eroare la eliminarea {entity}"
}
},
"epic": {

View file

@ -918,6 +918,10 @@
"add": {
"success": "{entity} успешно добавлен",
"failed": "Ошибка добавления {entity}"
},
"remove": {
"success": "{entity} успешно удален",
"failed": "Ошибка удаления {entity}"
}
},
"epic": {

View file

@ -918,6 +918,10 @@
"add": {
"success": "{entity} bola úspešne pridaná",
"failed": "Chyba pri pridávaní {entity}"
},
"remove": {
"success": "{entity} bola úspešne odstránená",
"failed": "Chyba pri odstrávaní {entity}"
}
},
"epic": {

View file

@ -920,6 +920,10 @@
"add": {
"success": "{entity} başarıyla eklendi",
"failed": "{entity} eklenirken hata oluştu"
},
"remove": {
"success": "{entity} başarıyla kaldırıldı",
"failed": "{entity} kaldırılırken hata oluştu"
}
},
"epic": {

View file

@ -918,6 +918,10 @@
"add": {
"success": "{entity} успішно додано",
"failed": "Помилка під час додавання {entity}"
},
"remove": {
"success": "{entity} успішно видалено",
"failed": "Помилка під час видалення {entity}"
}
},
"epic": {

View file

@ -917,6 +917,10 @@
"add": {
"success": "Đã thêm {entity} thành công",
"failed": "Đã xảy ra lỗi khi thêm {entity}"
},
"remove": {
"success": "Đã xóa {entity} thành công",
"failed": "Đã xảy ra lỗi khi xóa {entity}"
}
},
"epic": {

View file

@ -917,6 +917,10 @@
"add": {
"success": "{entity}添加成功",
"failed": "添加{entity}时出错"
},
"remove": {
"success": "{entity}删除成功",
"failed": "删除{entity}时出错"
}
},
"epic": {

View file

@ -918,6 +918,10 @@
"add": {
"success": "{entity} 新增成功",
"failed": "新增 {entity} 時發生錯誤"
},
"remove": {
"success": "{entity} 刪除成功",
"failed": "刪除 {entity} 時發生錯誤"
}
},
"epic": {