diff --git a/web/app/(commonLayout)/plugins/page.tsx b/web/app/(commonLayout)/plugins/page.tsx index f28944ebbd..516cc138a2 100644 --- a/web/app/(commonLayout)/plugins/page.tsx +++ b/web/app/(commonLayout)/plugins/page.tsx @@ -1,12 +1,14 @@ import PluginPage from '@/app/components/plugins/plugin-page' import PluginsPanel from '@/app/components/plugins/plugin-page/plugins-panel' import Marketplace from '@/app/components/plugins/marketplace' +import { getLocaleOnServer } from '@/i18n/server' const PluginList = async () => { + const locale = await getLocaleOnServer() return ( } - marketplace={} + marketplace={} /> ) } diff --git a/web/app/components/plugins/marketplace/index.tsx b/web/app/components/plugins/marketplace/index.tsx index 0ffe94a048..5afb8c31ae 100644 --- a/web/app/components/plugins/marketplace/index.tsx +++ b/web/app/components/plugins/marketplace/index.tsx @@ -9,7 +9,7 @@ import { getMarketplaceCollectionsAndPlugins } from './utils' import { TanstackQueryIniter } from '@/context/query-client' type MarketplaceProps = { - locale?: string + locale: string showInstallButton?: boolean searchParams?: SearchParams } diff --git a/web/app/components/plugins/marketplace/list/index.tsx b/web/app/components/plugins/marketplace/list/index.tsx index 1fe1e7306b..9dec49fc70 100644 --- a/web/app/components/plugins/marketplace/list/index.tsx +++ b/web/app/components/plugins/marketplace/list/index.tsx @@ -10,7 +10,7 @@ type ListProps = { marketplaceCollectionPluginsMap: Record plugins?: Plugin[] showInstallButton?: boolean - locale?: string + locale: string } const List = ({ marketplaceCollections, 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 57b087d1f5..f60e056ed2 100644 --- a/web/app/components/plugins/marketplace/list/list-with-collection.tsx +++ b/web/app/components/plugins/marketplace/list/list-with-collection.tsx @@ -2,12 +2,13 @@ import type { MarketplaceCollection } from '../types' import CardWrapper from './card-wrapper' import type { Plugin } from '@/app/components/plugins/types' +import { getLanguage } from '@/i18n/language' type ListWithCollectionProps = { marketplaceCollections: MarketplaceCollection[] marketplaceCollectionPluginsMap: Record showInstallButton?: boolean - locale?: string + locale: string } const ListWithCollection = ({ marketplaceCollections, @@ -23,8 +24,8 @@ const ListWithCollection = ({ key={collection.name} className='py-3' > -
{collection.name}
-
{collection.description}
+
{collection.label[getLanguage(locale)]}
+
{collection.description[getLanguage(locale)]}
{ marketplaceCollectionPluginsMap[collection.name].map(plugin => ( diff --git a/web/app/components/plugins/marketplace/list/list-wrapper.tsx b/web/app/components/plugins/marketplace/list/list-wrapper.tsx index cf31bf9dee..124049f70f 100644 --- a/web/app/components/plugins/marketplace/list/list-wrapper.tsx +++ b/web/app/components/plugins/marketplace/list/list-wrapper.tsx @@ -11,7 +11,7 @@ type ListWrapperProps = { marketplaceCollections: MarketplaceCollection[] marketplaceCollectionPluginsMap: Record showInstallButton?: boolean - locale?: string + locale: string } const ListWrapper = ({ marketplaceCollections, diff --git a/web/app/components/plugins/marketplace/types.ts b/web/app/components/plugins/marketplace/types.ts index e2c4315f3d..fbe4595322 100644 --- a/web/app/components/plugins/marketplace/types.ts +++ b/web/app/components/plugins/marketplace/types.ts @@ -2,7 +2,8 @@ import type { Plugin } from '../types' export type MarketplaceCollection = { name: string - description: string + label: Record + description: Record rule: string created_at: string updated_at: string