diff --git a/web/app/components/plugins/marketplace/empty/index.tsx b/web/app/components/plugins/marketplace/empty/index.tsx
index ec78d6a669..c190f0affe 100644
--- a/web/app/components/plugins/marketplace/empty/index.tsx
+++ b/web/app/components/plugins/marketplace/empty/index.tsx
@@ -1,21 +1,23 @@
'use client'
-import { useTranslation } from 'react-i18next'
import { Group } from '@/app/components/base/icons/src/vender/other'
import Line from './line'
import cn from '@/utils/classnames'
+import { useMixedTranslation } from '@/app/components/plugins/marketplace/hooks'
type Props = {
text?: string
lightCard?: boolean
className?: string
+ locale?: string
}
const Empty = ({
text,
lightCard,
className,
+ locale,
}: Props) => {
- const { t } = useTranslation()
+ const { t } = useMixedTranslation(locale)
return (
+
)
}
>
diff --git a/web/app/components/plugins/marketplace/list/list-with-collection.tsx b/web/app/components/plugins/marketplace/list/list-with-collection.tsx
index 4195280351..aed84d77dd 100644
--- a/web/app/components/plugins/marketplace/list/list-with-collection.tsx
+++ b/web/app/components/plugins/marketplace/list/list-with-collection.tsx
@@ -1,6 +1,5 @@
'use client'
-import { useTranslation } from 'react-i18next'
import { RiArrowRightSLine } from '@remixicon/react'
import type { MarketplaceCollection } from '../types'
import CardWrapper from './card-wrapper'
@@ -8,6 +7,7 @@ import type { Plugin } from '@/app/components/plugins/types'
import { getLanguage } from '@/i18n/language'
import cn from '@/utils/classnames'
import type { SearchParamsFromCollection } from '@/app/components/plugins/marketplace/types'
+import { useMixedTranslation } from '@/app/components/plugins/marketplace/hooks'
type ListWithCollectionProps = {
marketplaceCollections: MarketplaceCollection[]
@@ -27,7 +27,7 @@ const ListWithCollection = ({
cardRender,
onMoreClick,
}: ListWithCollectionProps) => {
- const { t } = useTranslation()
+ const { t } = useMixedTranslation(locale)
return (
<>
diff --git a/web/app/components/plugins/marketplace/list/list-wrapper.tsx b/web/app/components/plugins/marketplace/list/list-wrapper.tsx
index 08b50ecc32..155dfe397a 100644
--- a/web/app/components/plugins/marketplace/list/list-wrapper.tsx
+++ b/web/app/components/plugins/marketplace/list/list-wrapper.tsx
@@ -1,12 +1,12 @@
'use client'
import { useEffect } from 'react'
-import { useTranslation } from 'react-i18next'
import type { Plugin } from '../../types'
import type { MarketplaceCollection } from '../types'
import { useMarketplaceContext } from '../context'
import List from './index'
import SortDropdown from '../sort-dropdown'
import Loading from '@/app/components/base/loading'
+import { useMixedTranslation } from '@/app/components/plugins/marketplace/hooks'
type ListWrapperProps = {
marketplaceCollections: MarketplaceCollection[]
@@ -20,7 +20,7 @@ const ListWrapper = ({
showInstallButton,
locale,
}: ListWrapperProps) => {
- const { t } = useTranslation()
+ const { t } = useMixedTranslation(locale)
const plugins = useMarketplaceContext(v => v.plugins)
const pluginsTotal = useMarketplaceContext(v => v.pluginsTotal)
const marketplaceCollectionsFromClient = useMarketplaceContext(v => v.marketplaceCollectionsFromClient)
@@ -43,7 +43,7 @@ const ListWrapper = ({
{t('plugin.marketplace.pluginsResult', { num: pluginsTotal })}
-
+
)
}
diff --git a/web/app/components/plugins/marketplace/plugin-type-switch.tsx b/web/app/components/plugins/marketplace/plugin-type-switch.tsx
index 3755a7bf2b..e4fef4aaea 100644
--- a/web/app/components/plugins/marketplace/plugin-type-switch.tsx
+++ b/web/app/components/plugins/marketplace/plugin-type-switch.tsx
@@ -4,7 +4,7 @@ import {
RiBrain2Line,
RiHammerLine,
RiPuzzle2Line,
- RiUmbrellaLine,
+ RiSpeakAiLine,
} from '@remixicon/react'
import { PluginType } from '../types'
import { useMarketplaceContext } from './context'
@@ -50,7 +50,7 @@ const PluginTypeSwitch = ({
{
value: PLUGIN_TYPE_SEARCH_MAP.agent,
text: t('plugin.category.agents'),
- icon: ,
+ icon: ,
},
{
value: PLUGIN_TYPE_SEARCH_MAP.extension,
diff --git a/web/app/components/plugins/marketplace/sort-dropdown/index.tsx b/web/app/components/plugins/marketplace/sort-dropdown/index.tsx
index a71cb249d5..b39cbe86ce 100644
--- a/web/app/components/plugins/marketplace/sort-dropdown/index.tsx
+++ b/web/app/components/plugins/marketplace/sort-dropdown/index.tsx
@@ -4,16 +4,21 @@ import {
RiArrowDownSLine,
RiCheckLine,
} from '@remixicon/react'
-import { useTranslation } from 'react-i18next'
import { useMarketplaceContext } from '../context'
import {
PortalToFollowElem,
PortalToFollowElemContent,
PortalToFollowElemTrigger,
} from '@/app/components/base/portal-to-follow-elem'
+import { useMixedTranslation } from '@/app/components/plugins/marketplace/hooks'
-const SortDropdown = () => {
- const { t } = useTranslation()
+type SortDropdownProps = {
+ locale?: string
+}
+const SortDropdown = ({
+ locale,
+}: SortDropdownProps) => {
+ const { t } = useMixedTranslation(locale)
const options = [
{
value: 'install_count',
diff --git a/web/i18n/zh-Hans/plugin.ts b/web/i18n/zh-Hans/plugin.ts
index 4d74c700b2..8185f37b40 100644
--- a/web/i18n/zh-Hans/plugin.ts
+++ b/web/i18n/zh-Hans/plugin.ts
@@ -3,7 +3,7 @@ const translation = {
all: '全部',
models: '模型',
tools: '工具',
- agents: 'Agent Strategy',
+ agents: 'Agent 策略',
extensions: '扩展',
bundles: '插件集',
},