mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 11:56:55 +08:00
fix missing i18n
This commit is contained in:
parent
1c5c28a82c
commit
61c46bea40
@ -1,5 +1,6 @@
|
|||||||
import { memo, useCallback, useMemo, useState } from 'react'
|
import { memo, useCallback, useMemo, useState } from 'react'
|
||||||
import { RiCheckLine, RiCheckboxCircleFill, RiCheckboxCircleLine, RiCloseLine, RiFilter3Line } from '@remixicon/react'
|
import { RiCheckLine, RiCheckboxCircleFill, RiCheckboxCircleLine, RiCloseLine, RiFilter3Line } from '@remixicon/react'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useStore } from '@/app/components/workflow/store'
|
import { useStore } from '@/app/components/workflow/store'
|
||||||
import type { WorkflowCommentList } from '@/service/workflow-comment'
|
import type { WorkflowCommentList } from '@/service/workflow-comment'
|
||||||
import { useWorkflowComment } from '@/app/components/workflow/hooks/use-workflow-comment'
|
import { useWorkflowComment } from '@/app/components/workflow/hooks/use-workflow-comment'
|
||||||
@ -13,6 +14,7 @@ import { useAppContext } from '@/context/app-context'
|
|||||||
import { collaborationManager } from '@/app/components/workflow/collaboration'
|
import { collaborationManager } from '@/app/components/workflow/collaboration'
|
||||||
|
|
||||||
const CommentsPanel = () => {
|
const CommentsPanel = () => {
|
||||||
|
const { t } = useTranslation()
|
||||||
const activeCommentId = useStore(s => s.activeCommentId)
|
const activeCommentId = useStore(s => s.activeCommentId)
|
||||||
const setActiveCommentId = useStore(s => s.setActiveCommentId)
|
const setActiveCommentId = useStore(s => s.setActiveCommentId)
|
||||||
const setControlMode = useStore(s => s.setControlMode)
|
const setControlMode = useStore(s => s.setControlMode)
|
||||||
@ -63,7 +65,7 @@ const CommentsPanel = () => {
|
|||||||
return (
|
return (
|
||||||
<div className={cn('relative flex h-full w-[420px] flex-col rounded-l-2xl border border-components-panel-border bg-components-panel-bg')}>
|
<div className={cn('relative flex h-full w-[420px] flex-col rounded-l-2xl border border-components-panel-border bg-components-panel-bg')}>
|
||||||
<div className='flex items-center justify-between p-4 pb-2'>
|
<div className='flex items-center justify-between p-4 pb-2'>
|
||||||
<div className='system-xl-semibold font-semibold leading-6 text-text-primary'>Comments</div>
|
<div className='system-xl-semibold font-semibold leading-6 text-text-primary'>{t('workflow.comments.panelTitle')}</div>
|
||||||
<div className='relative flex items-center gap-2'>
|
<div className='relative flex items-center gap-2'>
|
||||||
<button
|
<button
|
||||||
className='flex h-8 w-8 items-center justify-center rounded-md bg-components-panel-on-panel-item-bg hover:bg-state-base-hover'
|
className='flex h-8 w-8 items-center justify-center rounded-md bg-components-panel-on-panel-item-bg hover:bg-state-base-hover'
|
||||||
@ -154,7 +156,7 @@ const CommentsPanel = () => {
|
|||||||
{c.reply_count > 0 && (
|
{c.reply_count > 0 && (
|
||||||
<div className='mt-2 flex items-center justify-between'>
|
<div className='mt-2 flex items-center justify-between'>
|
||||||
<div className='system-2xs-regular text-text-tertiary'>
|
<div className='system-2xs-regular text-text-tertiary'>
|
||||||
{c.reply_count} replies
|
{c.reply_count} {t('workflow.comments.reply')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -163,7 +165,7 @@ const CommentsPanel = () => {
|
|||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
{!loading && filteredSorted.length === 0 && (
|
{!loading && filteredSorted.length === 0 && (
|
||||||
<div className='system-sm-regular mt-6 text-center text-text-tertiary'>No comments yet</div>
|
<div className='system-sm-regular mt-6 text-center text-text-tertiary'>{t('workflow.comments.noComments')}</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -195,6 +195,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: 'Kommentar',
|
panelTitle: 'Kommentar',
|
||||||
loading: 'Laden…',
|
loading: 'Laden…',
|
||||||
|
reply: 'Antworten',
|
||||||
|
noComments: 'Noch keine Kommentare',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: 'Kommentar hinzufügen',
|
add: 'Kommentar hinzufügen',
|
||||||
reply: 'Antworten',
|
reply: 'Antworten',
|
||||||
|
|||||||
@ -201,6 +201,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: 'Comment',
|
panelTitle: 'Comment',
|
||||||
loading: 'Loading…',
|
loading: 'Loading…',
|
||||||
|
reply: 'Reply',
|
||||||
|
noComments: 'No comments yet',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: 'Add a comment',
|
add: 'Add a comment',
|
||||||
reply: 'Reply',
|
reply: 'Reply',
|
||||||
|
|||||||
@ -195,6 +195,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: 'Comentario',
|
panelTitle: 'Comentario',
|
||||||
loading: 'Cargando…',
|
loading: 'Cargando…',
|
||||||
|
reply: 'Responder',
|
||||||
|
noComments: 'Aún no hay comentarios',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: 'Añadir un comentario',
|
add: 'Añadir un comentario',
|
||||||
reply: 'Responder',
|
reply: 'Responder',
|
||||||
|
|||||||
@ -195,6 +195,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: 'دیدگاه',
|
panelTitle: 'دیدگاه',
|
||||||
loading: 'در حال بارگذاری…',
|
loading: 'در حال بارگذاری…',
|
||||||
|
reply: 'پاسخ',
|
||||||
|
noComments: 'هنوز دیدگاهی ثبت نشده است',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: 'افزودن دیدگاه',
|
add: 'افزودن دیدگاه',
|
||||||
reply: 'پاسخ',
|
reply: 'پاسخ',
|
||||||
|
|||||||
@ -195,6 +195,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: 'Commentaire',
|
panelTitle: 'Commentaire',
|
||||||
loading: 'Chargement…',
|
loading: 'Chargement…',
|
||||||
|
reply: 'Répondre',
|
||||||
|
noComments: 'Aucun commentaire pour l’instant',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: 'Ajouter un commentaire',
|
add: 'Ajouter un commentaire',
|
||||||
reply: 'Répondre',
|
reply: 'Répondre',
|
||||||
|
|||||||
@ -198,6 +198,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: 'टिप्पणी',
|
panelTitle: 'टिप्पणी',
|
||||||
loading: 'लोड हो रहा है…',
|
loading: 'लोड हो रहा है…',
|
||||||
|
reply: 'जवाब दें',
|
||||||
|
noComments: 'अभी तक कोई टिप्पणी नहीं',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: 'टिप्पणी जोड़ें',
|
add: 'टिप्पणी जोड़ें',
|
||||||
reply: 'जवाब दें',
|
reply: 'जवाब दें',
|
||||||
|
|||||||
@ -189,6 +189,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: 'Komentar',
|
panelTitle: 'Komentar',
|
||||||
loading: 'Memuat…',
|
loading: 'Memuat…',
|
||||||
|
reply: 'Balas',
|
||||||
|
noComments: 'Belum ada komentar',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: 'Tambahkan komentar',
|
add: 'Tambahkan komentar',
|
||||||
reply: 'Balas',
|
reply: 'Balas',
|
||||||
|
|||||||
@ -200,6 +200,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: 'Commento',
|
panelTitle: 'Commento',
|
||||||
loading: 'Caricamento…',
|
loading: 'Caricamento…',
|
||||||
|
reply: 'Rispondi',
|
||||||
|
noComments: 'Ancora nessun commento',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: 'Aggiungi un commento',
|
add: 'Aggiungi un commento',
|
||||||
reply: 'Rispondi',
|
reply: 'Rispondi',
|
||||||
|
|||||||
@ -200,6 +200,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: 'コメント',
|
panelTitle: 'コメント',
|
||||||
loading: '読み込み中…',
|
loading: '読み込み中…',
|
||||||
|
reply: '返信',
|
||||||
|
noComments: 'まだコメントがありません',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: 'コメントを追加',
|
add: 'コメントを追加',
|
||||||
reply: '返信',
|
reply: '返信',
|
||||||
|
|||||||
@ -203,6 +203,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: '댓글',
|
panelTitle: '댓글',
|
||||||
loading: '불러오는 중…',
|
loading: '불러오는 중…',
|
||||||
|
reply: '답글',
|
||||||
|
noComments: '아직 댓글이 없습니다',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: '댓글 추가',
|
add: '댓글 추가',
|
||||||
reply: '답글',
|
reply: '답글',
|
||||||
|
|||||||
@ -201,6 +201,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: '评论',
|
panelTitle: '评论',
|
||||||
loading: '加载中…',
|
loading: '加载中…',
|
||||||
|
reply: '回复',
|
||||||
|
noComments: '暂无评论',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: '添加评论',
|
add: '添加评论',
|
||||||
reply: '回复',
|
reply: '回复',
|
||||||
|
|||||||
@ -195,6 +195,8 @@ const translation = {
|
|||||||
comments: {
|
comments: {
|
||||||
panelTitle: '評論',
|
panelTitle: '評論',
|
||||||
loading: '載入中…',
|
loading: '載入中…',
|
||||||
|
reply: '回覆',
|
||||||
|
noComments: '暫無評論',
|
||||||
placeholder: {
|
placeholder: {
|
||||||
add: '新增評論',
|
add: '新增評論',
|
||||||
reply: '回覆',
|
reply: '回覆',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user