diff --git a/web/app/components/app/overview/settings/index.spec.tsx b/web/app/components/app/overview/settings/index.spec.tsx index 8deae7f952..41d86047f0 100644 --- a/web/app/components/app/overview/settings/index.spec.tsx +++ b/web/app/components/app/overview/settings/index.spec.tsx @@ -15,11 +15,10 @@ vi.mock('react-i18next', async () => { ...actual, useTranslation: () => ({ t: (key: string, options?: Record) => { + const prefix = options?.ns ? `${options.ns}.` : '' if (options?.returnObjects) - return [`${key}-feature-1`, `${key}-feature-2`] - if (options) - return `${key}:${JSON.stringify(options)}` - return key + return [`${prefix}${key}-feature-1`, `${prefix}${key}-feature-2`] + return `${prefix}${key}` }, i18n: { language: 'en', diff --git a/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.spec.tsx b/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.spec.tsx index 610d9264f0..cf2cde82f6 100644 --- a/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.spec.tsx +++ b/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.spec.tsx @@ -16,9 +16,9 @@ const featuresTranslations: Record = { vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string, options?: Record) => { - if (options?.returnObjects) - return featuresTranslations[key] || [] const prefix = options?.ns ? `${options.ns}.` : '' + if (options?.returnObjects) + return featuresTranslations[`${prefix}${key}`] || [] return `${prefix}${key}` }, }),