diff --git a/src/app/(dashboard)/dashboard/providers/page.tsx b/src/app/(dashboard)/dashboard/providers/page.tsx index 7ab21fcae9..c51591df2d 100644 --- a/src/app/(dashboard)/dashboard/providers/page.tsx +++ b/src/app/(dashboard)/dashboard/providers/page.tsx @@ -23,6 +23,7 @@ import Link from "next/link"; import { getErrorCode, getRelativeTime } from "@/shared/utils"; import { useNotificationStore } from "@/store/notificationStore"; import ModelAvailabilityBadge from "./components/ModelAvailabilityBadge"; +import { useTranslations } from "next-intl"; // Shared helper function to avoid code duplication between ProviderCard and ApiKeyProviderCard function getStatusDisplay(connected, error, errorCode) { @@ -97,6 +98,8 @@ export default function ProvidersPage() { const [testingMode, setTestingMode] = useState(null); const [testResults, setTestResults] = useState(null); const notify = useNotificationStore(); + const t = useTranslations("providers"); + const tc = useTranslations("common"); useEffect(() => { const fetchData = async () => { @@ -194,12 +197,12 @@ export default function ProvidersPage() { setTestResults(data); if (data.summary) { const { passed, failed, total } = data.summary; - if (failed === 0) notify.success(`All ${total} tests passed`); - else notify.warning(`${passed}/${total} passed, ${failed} failed`); + if (failed === 0) notify.success(t("allTestsPassed", { total })); + else notify.warning(t("testSummary", { passed, failed, total })); } } catch (error) { - setTestResults({ error: "Test request failed" }); - notify.error("Provider test failed"); + setTestResults({ error: t("providerTestFailed") }); + notify.error(t("providerTestFailed")); } finally { setTestingMode(null); } @@ -239,7 +242,8 @@ export default function ProvidersPage() {
No compatible providers added yet
- Use the buttons above to add OpenAI or Anthropic compatible endpoints -
{t("noCompatibleYet")}
{t("compatibleHint")}