From 8470be6411dbc0cf4c62ca2922e3f6f96a09a2e5 Mon Sep 17 00:00:00 2001 From: hjlarry Date: Thu, 25 Sep 2025 09:41:59 +0800 Subject: [PATCH] improve delete comment i18n --- web/app/components/workflow/index.tsx | 14 ++++++++------ web/i18n/de-DE/workflow.ts | 6 ++++++ web/i18n/en-US/workflow.ts | 6 ++++++ web/i18n/es-ES/workflow.ts | 6 ++++++ web/i18n/fa-IR/workflow.ts | 6 ++++++ web/i18n/fr-FR/workflow.ts | 6 ++++++ web/i18n/hi-IN/workflow.ts | 6 ++++++ web/i18n/id-ID/workflow.ts | 6 ++++++ web/i18n/it-IT/workflow.ts | 6 ++++++ web/i18n/ja-JP/workflow.ts | 6 ++++++ web/i18n/ko-KR/workflow.ts | 6 ++++++ web/i18n/zh-Hans/workflow.ts | 6 ++++++ web/i18n/zh-Hant/workflow.ts | 6 ++++++ 13 files changed, 80 insertions(+), 6 deletions(-) diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsx index b199f519c1..25ac8ad2a4 100644 --- a/web/app/components/workflow/index.tsx +++ b/web/app/components/workflow/index.tsx @@ -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 = 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 = 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) diff --git a/web/i18n/de-DE/workflow.ts b/web/i18n/de-DE/workflow.ts index 6461ae7033..6c3c7369d1 100644 --- a/web/i18n/de-DE/workflow.ts +++ b/web/i18n/de-DE/workflow.ts @@ -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', diff --git a/web/i18n/en-US/workflow.ts b/web/i18n/en-US/workflow.ts index 915ad67bf3..0764076e91 100644 --- a/web/i18n/en-US/workflow.ts +++ b/web/i18n/en-US/workflow.ts @@ -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', diff --git a/web/i18n/es-ES/workflow.ts b/web/i18n/es-ES/workflow.ts index 2e375d8e70..cd308db6d4 100644 --- a/web/i18n/es-ES/workflow.ts +++ b/web/i18n/es-ES/workflow.ts @@ -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', diff --git a/web/i18n/fa-IR/workflow.ts b/web/i18n/fa-IR/workflow.ts index 093bf6e1cb..6c20d00312 100644 --- a/web/i18n/fa-IR/workflow.ts +++ b/web/i18n/fa-IR/workflow.ts @@ -200,6 +200,12 @@ const translation = { reply: 'پاسخ', editReply: 'ویرایش پاسخ', }, + confirm: { + deleteThreadTitle: 'این گفتگو حذف شود؟', + deleteThreadDesc: 'این عملیات گفتگو و تمام پاسخ‌های آن را برای همیشه حذف می‌کند و قابل بازگردانی نیست.', + deleteReplyTitle: 'این پاسخ حذف شود؟', + deleteReplyDesc: 'این پاسخ برای همیشه حذف خواهد شد.', + }, aria: { deleteComment: 'حذف دیدگاه', resolveComment: 'حل‌کردن دیدگاه', diff --git a/web/i18n/fr-FR/workflow.ts b/web/i18n/fr-FR/workflow.ts index 309ee33cdc..8fd98d4ca5 100644 --- a/web/i18n/fr-FR/workflow.ts +++ b/web/i18n/fr-FR/workflow.ts @@ -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', diff --git a/web/i18n/hi-IN/workflow.ts b/web/i18n/hi-IN/workflow.ts index 5f2e53a4b0..6f8d08eae1 100644 --- a/web/i18n/hi-IN/workflow.ts +++ b/web/i18n/hi-IN/workflow.ts @@ -203,6 +203,12 @@ const translation = { reply: 'जवाब दें', editReply: 'जवाब संपादित करें', }, + confirm: { + deleteThreadTitle: 'इस थ्रेड को हटाएं?', + deleteThreadDesc: 'यह क्रिया थ्रेड और उसकी सभी प्रतिक्रियाओं को स्थायी रूप से हटा देगी। इसे पूर्ववत नहीं किया जा सकता।', + deleteReplyTitle: 'इस जवाब को हटाएं?', + deleteReplyDesc: 'यह जवाब हमेशा के लिए हटा दिया जाएगा।', + }, aria: { deleteComment: 'टिप्पणी हटाएं', resolveComment: 'टिप्पणी समाधान करें', diff --git a/web/i18n/id-ID/workflow.ts b/web/i18n/id-ID/workflow.ts index cf03b0f794..c91b4fdcdf 100644 --- a/web/i18n/id-ID/workflow.ts +++ b/web/i18n/id-ID/workflow.ts @@ -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', diff --git a/web/i18n/it-IT/workflow.ts b/web/i18n/it-IT/workflow.ts index b977a07ad2..3da8066d24 100644 --- a/web/i18n/it-IT/workflow.ts +++ b/web/i18n/it-IT/workflow.ts @@ -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', diff --git a/web/i18n/ja-JP/workflow.ts b/web/i18n/ja-JP/workflow.ts index 3fd17afb92..c61013d899 100644 --- a/web/i18n/ja-JP/workflow.ts +++ b/web/i18n/ja-JP/workflow.ts @@ -204,6 +204,12 @@ const translation = { reply: '返信', editReply: '返信を編集', }, + confirm: { + deleteThreadTitle: 'このスレッドを削除しますか?', + deleteThreadDesc: 'この操作によりスレッドとその返信がすべて完全に削除され、元に戻せません。', + deleteReplyTitle: 'この返信を削除しますか?', + deleteReplyDesc: 'この返信は完全に削除されます。', + }, aria: { deleteComment: 'コメントを削除', resolveComment: 'コメントを解決', diff --git a/web/i18n/ko-KR/workflow.ts b/web/i18n/ko-KR/workflow.ts index 7e78f7788d..c617c7be8c 100644 --- a/web/i18n/ko-KR/workflow.ts +++ b/web/i18n/ko-KR/workflow.ts @@ -208,6 +208,12 @@ const translation = { reply: '답글', editReply: '답글 편집', }, + confirm: { + deleteThreadTitle: '이 스레드를 삭제하시겠습니까?', + deleteThreadDesc: '이 작업을 수행하면 스레드와 모든 답글이 영구적으로 삭제되며 되돌릴 수 없습니다.', + deleteReplyTitle: '이 답글을 삭제하시겠습니까?', + deleteReplyDesc: '이 답글은 영구적으로 삭제됩니다.', + }, aria: { deleteComment: '댓글 삭제', resolveComment: '댓글 해결', diff --git a/web/i18n/zh-Hans/workflow.ts b/web/i18n/zh-Hans/workflow.ts index 30b74f2255..b46e69f4fc 100644 --- a/web/i18n/zh-Hans/workflow.ts +++ b/web/i18n/zh-Hans/workflow.ts @@ -206,6 +206,12 @@ const translation = { reply: '回复', editReply: '编辑回复', }, + confirm: { + deleteThreadTitle: '删除此讨论?', + deleteThreadDesc: '此操作会永久删除该讨论及其所有回复,且无法恢复。', + deleteReplyTitle: '删除此回复?', + deleteReplyDesc: '此回复将被永久删除。', + }, aria: { deleteComment: '删除评论', resolveComment: '解决评论', diff --git a/web/i18n/zh-Hant/workflow.ts b/web/i18n/zh-Hant/workflow.ts index 91d190fb2b..951105f8ed 100644 --- a/web/i18n/zh-Hant/workflow.ts +++ b/web/i18n/zh-Hant/workflow.ts @@ -200,6 +200,12 @@ const translation = { reply: '回覆', editReply: '編輯回覆', }, + confirm: { + deleteThreadTitle: '刪除此討論串?', + deleteThreadDesc: '此操作會永久刪除該討論串及其所有回覆,且無法復原。', + deleteReplyTitle: '刪除此回覆?', + deleteReplyDesc: '此回覆將被永久刪除。', + }, aria: { deleteComment: '刪除評論', resolveComment: '解決評論',