mirror of https://github.com/langgenius/dify.git
chore: category i18n
This commit is contained in:
parent
41a069f86b
commit
08c86ab70a
|
|
@ -1,8 +1,11 @@
|
|||
'use client'
|
||||
import React, { FC } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import exploreI18n from '@/i18n/lang/explore.en'
|
||||
import cn from 'classnames'
|
||||
|
||||
const categoryI18n = exploreI18n.category
|
||||
|
||||
export interface ICategoryProps {
|
||||
className?: string
|
||||
list: string[]
|
||||
|
|
@ -36,7 +39,7 @@ const Category: FC<ICategoryProps> = ({
|
|||
style={itemStyle(name === value)}
|
||||
onClick={() => onChange(name)}
|
||||
>
|
||||
{name}
|
||||
{(categoryI18n as any)[name] ? t(`explore.category.${name}`) : name}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,12 @@ const translation = {
|
|||
subTitle: 'App icon & name',
|
||||
nameRequired: 'App name is required',
|
||||
},
|
||||
category: {
|
||||
'News': 'News',
|
||||
'Music': 'Music',
|
||||
'Games': 'Games',
|
||||
'Sports': 'Sports',
|
||||
}
|
||||
}
|
||||
|
||||
export default translation
|
||||
|
|
|
|||
|
|
@ -26,6 +26,12 @@ const translation = {
|
|||
subTitle: '应用程序图标和名称',
|
||||
nameRequired: '应用程序名称不能为空',
|
||||
},
|
||||
category: {
|
||||
'News': '新闻',
|
||||
'Music': '音乐',
|
||||
'Games': '游戏',
|
||||
'Sports': '体育',
|
||||
}
|
||||
}
|
||||
|
||||
export default translation
|
||||
|
|
|
|||
Loading…
Reference in New Issue