Skip to content

Commit

Permalink
Fix/plugin badge i18n (#14319)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh authored Feb 25, 2025
1 parent b44b386 commit 8c08153
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions web/app/components/plugins/base/badges/partner.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'
import IconWithTooltip from './icon-with-tooltip'
import PartnerDark from '@/app/components/base/icons/src/public/plugins/PartnerDark'
import PartnerLight from '@/app/components/base/icons/src/public/plugins/PartnerLight'
import useTheme from '@/hooks/use-theme'

type PartnerProps = {
className?: string
text: string
}

const Partner: FC<PartnerProps> = ({
className,
text,
}) => {
const { t } = useTranslation()
const { theme } = useTheme()

return (
Expand All @@ -21,7 +21,7 @@ const Partner: FC<PartnerProps> = ({
theme={theme}
BadgeIconLight={PartnerLight}
BadgeIconDark={PartnerDark}
popupContent={t('plugin.marketplace.partnerTip')}
popupContent={text}
/>
)
}
Expand Down
6 changes: 3 additions & 3 deletions web/app/components/plugins/base/badges/verified.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'
import IconWithTooltip from './icon-with-tooltip'
import VerifiedDark from '@/app/components/base/icons/src/public/plugins/VerifiedDark'
import VerifiedLight from '@/app/components/base/icons/src/public/plugins/VerifiedLight'
import useTheme from '@/hooks/use-theme'

type VerifiedProps = {
className?: string
text: string
}

const Verified: FC<VerifiedProps> = ({
className,
text,
}) => {
const { t } = useTranslation()
const { theme } = useTheme()

return (
Expand All @@ -21,7 +21,7 @@ const Verified: FC<VerifiedProps> = ({
theme={theme}
BadgeIconLight={VerifiedLight}
BadgeIconDark={VerifiedDark}
popupContent={t('plugin.marketplace.verifiedTip')}
popupContent={text}
/>
)
}
Expand Down
4 changes: 2 additions & 2 deletions web/app/components/plugins/card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const Card = ({
<div className="ml-3 w-0 grow">
<div className="flex items-center h-5">
<Title title={getLocalizedText(label)} />
{isPartner && <Partner className='w-4 h-4 ml-0.5' />}
{verified && <Verified className='w-4 h-4 ml-0.5' />}
{isPartner && <Partner className='w-4 h-4 ml-0.5' text={t('plugin.marketplace.partnerTip')} />}
{verified && <Verified className='w-4 h-4 ml-0.5' text={t('plugin.marketplace.verifiedTip')} />}
{titleLeft} {/* This can be version badge */}
</div>
<OrgInfo
Expand Down

0 comments on commit 8c08153

Please sign in to comment.