mirror of https://github.com/langgenius/dify.git
improve delete comment i18n
This commit is contained in:
parent
3d6295c622
commit
8470be6411
|
|
@ -9,6 +9,7 @@ import {
|
|||
useRef,
|
||||
useState,
|
||||
} from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { setAutoFreeze } from 'immer'
|
||||
import {
|
||||
useEventListener,
|
||||
|
|
@ -201,6 +202,7 @@ export const Workflow: FC<WorkflowProps> = memo(({
|
|||
const showUserComments = useStore(s => s.showUserComments)
|
||||
const showUserCursors = useStore(s => s.showUserCursors)
|
||||
const mousePosition = useStore(s => s.mousePosition)
|
||||
const { t } = useTranslation()
|
||||
|
||||
eventEmitter?.useSubscription((v: any) => {
|
||||
if (v.type === WORKFLOW_DATA_UPDATE) {
|
||||
|
|
@ -245,28 +247,28 @@ export const Workflow: FC<WorkflowProps> = memo(({
|
|||
const handleCommentDeleteClick = useCallback((commentId: string) => {
|
||||
if (!showConfirm) {
|
||||
setShowConfirm({
|
||||
title: 'Delete this thread?',
|
||||
desc: 'This action will permanently delete the thread and all its replies. This cannot be undone.',
|
||||
title: t('workflow.comments.confirm.deleteThreadTitle'),
|
||||
desc: t('workflow.comments.confirm.deleteThreadDesc'),
|
||||
onConfirm: async () => {
|
||||
await handleCommentDelete(commentId)
|
||||
setShowConfirm(undefined)
|
||||
},
|
||||
})
|
||||
}
|
||||
}, [showConfirm, setShowConfirm, handleCommentDelete])
|
||||
}, [showConfirm, setShowConfirm, handleCommentDelete, t])
|
||||
|
||||
const handleCommentReplyDeleteClick = useCallback((commentId: string, replyId: string) => {
|
||||
if (!showConfirm) {
|
||||
setShowConfirm({
|
||||
title: 'Delete this reply?',
|
||||
desc: 'This reply will be removed permanently.',
|
||||
title: t('workflow.comments.confirm.deleteReplyTitle'),
|
||||
desc: t('workflow.comments.confirm.deleteReplyDesc'),
|
||||
onConfirm: async () => {
|
||||
await handleCommentReplyDelete(commentId, replyId)
|
||||
setShowConfirm(undefined)
|
||||
},
|
||||
})
|
||||
}
|
||||
}, [showConfirm, setShowConfirm, handleCommentReplyDelete])
|
||||
}, [showConfirm, setShowConfirm, handleCommentReplyDelete, t])
|
||||
|
||||
useEffect(() => {
|
||||
document.addEventListener('visibilitychange', handleSyncWorkflowDraftWhenPageClose)
|
||||
|
|
|
|||
|
|
@ -200,6 +200,12 @@ const translation = {
|
|||
reply: 'Antworten',
|
||||
editReply: 'Antwort bearbeiten',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: 'Diesen Thread löschen?',
|
||||
deleteThreadDesc: 'Dadurch werden der Thread und alle Antworten dauerhaft gelöscht. Dies kann nicht rückgängig gemacht werden.',
|
||||
deleteReplyTitle: 'Diese Antwort löschen?',
|
||||
deleteReplyDesc: 'Diese Antwort wird dauerhaft entfernt.',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: 'Kommentar löschen',
|
||||
resolveComment: 'Kommentar abschließen',
|
||||
|
|
|
|||
|
|
@ -206,6 +206,12 @@ const translation = {
|
|||
reply: 'Reply',
|
||||
editReply: 'Edit reply',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: 'Delete this thread?',
|
||||
deleteThreadDesc: 'This action will permanently delete the thread and all its replies. This cannot be undone.',
|
||||
deleteReplyTitle: 'Delete this reply?',
|
||||
deleteReplyDesc: 'This reply will be removed permanently.',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: 'Delete comment',
|
||||
resolveComment: 'Resolve comment',
|
||||
|
|
|
|||
|
|
@ -200,6 +200,12 @@ const translation = {
|
|||
reply: 'Responder',
|
||||
editReply: 'Editar respuesta',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: '¿Eliminar esta conversación?',
|
||||
deleteThreadDesc: 'Esta acción eliminará permanentemente la conversación y todas sus respuestas. No se puede deshacer.',
|
||||
deleteReplyTitle: '¿Eliminar esta respuesta?',
|
||||
deleteReplyDesc: 'Esta respuesta se eliminará de forma permanente.',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: 'Eliminar comentario',
|
||||
resolveComment: 'Resolver comentario',
|
||||
|
|
|
|||
|
|
@ -200,6 +200,12 @@ const translation = {
|
|||
reply: 'پاسخ',
|
||||
editReply: 'ویرایش پاسخ',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: 'این گفتگو حذف شود؟',
|
||||
deleteThreadDesc: 'این عملیات گفتگو و تمام پاسخهای آن را برای همیشه حذف میکند و قابل بازگردانی نیست.',
|
||||
deleteReplyTitle: 'این پاسخ حذف شود؟',
|
||||
deleteReplyDesc: 'این پاسخ برای همیشه حذف خواهد شد.',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: 'حذف دیدگاه',
|
||||
resolveComment: 'حلکردن دیدگاه',
|
||||
|
|
|
|||
|
|
@ -200,6 +200,12 @@ const translation = {
|
|||
reply: 'Répondre',
|
||||
editReply: 'Modifier la réponse',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: 'Supprimer cette conversation ?',
|
||||
deleteThreadDesc: 'Cette action supprimera définitivement la conversation et toutes ses réponses. Cette opération est irréversible.',
|
||||
deleteReplyTitle: 'Supprimer cette réponse ?',
|
||||
deleteReplyDesc: 'Cette réponse sera supprimée définitivement.',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: 'Supprimer le commentaire',
|
||||
resolveComment: 'Résoudre le commentaire',
|
||||
|
|
|
|||
|
|
@ -203,6 +203,12 @@ const translation = {
|
|||
reply: 'जवाब दें',
|
||||
editReply: 'जवाब संपादित करें',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: 'इस थ्रेड को हटाएं?',
|
||||
deleteThreadDesc: 'यह क्रिया थ्रेड और उसकी सभी प्रतिक्रियाओं को स्थायी रूप से हटा देगी। इसे पूर्ववत नहीं किया जा सकता।',
|
||||
deleteReplyTitle: 'इस जवाब को हटाएं?',
|
||||
deleteReplyDesc: 'यह जवाब हमेशा के लिए हटा दिया जाएगा।',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: 'टिप्पणी हटाएं',
|
||||
resolveComment: 'टिप्पणी समाधान करें',
|
||||
|
|
|
|||
|
|
@ -194,6 +194,12 @@ const translation = {
|
|||
reply: 'Balas',
|
||||
editReply: 'Edit balasan',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: 'Hapus percakapan ini?',
|
||||
deleteThreadDesc: 'Tindakan ini akan menghapus percakapan dan semua balasannya secara permanen. Tidak dapat dibatalkan.',
|
||||
deleteReplyTitle: 'Hapus balasan ini?',
|
||||
deleteReplyDesc: 'Balasan ini akan dihapus secara permanen.',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: 'Hapus komentar',
|
||||
resolveComment: 'Selesaikan komentar',
|
||||
|
|
|
|||
|
|
@ -205,6 +205,12 @@ const translation = {
|
|||
reply: 'Rispondi',
|
||||
editReply: 'Modifica risposta',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: 'Eliminare questa conversazione?',
|
||||
deleteThreadDesc: 'Questa azione eliminerà in modo permanente la conversazione e tutte le risposte. Non sarà possibile annullare.',
|
||||
deleteReplyTitle: 'Eliminare questa risposta?',
|
||||
deleteReplyDesc: 'Questa risposta verrà rimossa definitivamente.',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: 'Elimina commento',
|
||||
resolveComment: 'Risolvi commento',
|
||||
|
|
|
|||
|
|
@ -204,6 +204,12 @@ const translation = {
|
|||
reply: '返信',
|
||||
editReply: '返信を編集',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: 'このスレッドを削除しますか?',
|
||||
deleteThreadDesc: 'この操作によりスレッドとその返信がすべて完全に削除され、元に戻せません。',
|
||||
deleteReplyTitle: 'この返信を削除しますか?',
|
||||
deleteReplyDesc: 'この返信は完全に削除されます。',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: 'コメントを削除',
|
||||
resolveComment: 'コメントを解決',
|
||||
|
|
|
|||
|
|
@ -208,6 +208,12 @@ const translation = {
|
|||
reply: '답글',
|
||||
editReply: '답글 편집',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: '이 스레드를 삭제하시겠습니까?',
|
||||
deleteThreadDesc: '이 작업을 수행하면 스레드와 모든 답글이 영구적으로 삭제되며 되돌릴 수 없습니다.',
|
||||
deleteReplyTitle: '이 답글을 삭제하시겠습니까?',
|
||||
deleteReplyDesc: '이 답글은 영구적으로 삭제됩니다.',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: '댓글 삭제',
|
||||
resolveComment: '댓글 해결',
|
||||
|
|
|
|||
|
|
@ -206,6 +206,12 @@ const translation = {
|
|||
reply: '回复',
|
||||
editReply: '编辑回复',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: '删除此讨论?',
|
||||
deleteThreadDesc: '此操作会永久删除该讨论及其所有回复,且无法恢复。',
|
||||
deleteReplyTitle: '删除此回复?',
|
||||
deleteReplyDesc: '此回复将被永久删除。',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: '删除评论',
|
||||
resolveComment: '解决评论',
|
||||
|
|
|
|||
|
|
@ -200,6 +200,12 @@ const translation = {
|
|||
reply: '回覆',
|
||||
editReply: '編輯回覆',
|
||||
},
|
||||
confirm: {
|
||||
deleteThreadTitle: '刪除此討論串?',
|
||||
deleteThreadDesc: '此操作會永久刪除該討論串及其所有回覆,且無法復原。',
|
||||
deleteReplyTitle: '刪除此回覆?',
|
||||
deleteReplyDesc: '此回覆將被永久刪除。',
|
||||
},
|
||||
aria: {
|
||||
deleteComment: '刪除評論',
|
||||
resolveComment: '解決評論',
|
||||
|
|
|
|||
Loading…
Reference in New Issue