diff --git a/bun.lockb b/bun.lockb index e09c2e0..292cda8 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 5fcebaf..fa6a879 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "@radix-ui/react-separator": "^1.1.1", "@radix-ui/react-slot": "^1.1.1", "@radix-ui/react-switch": "^1.1.2", - "@tanstack/react-query": "^5.62.14", - "@tanstack/react-query-devtools": "^5.62.14", + "@tanstack/react-query": "^5.62.15", + "@tanstack/react-query-devtools": "^5.62.15", "@tanstack/react-table": "^8.20.6", "@trivago/prettier-plugin-sort-imports": "^5.2.1", "@types/d3-geo": "^3.1.0", @@ -36,6 +36,7 @@ "d3-geo": "^3.1.1", "dayjs": "^1.11.13", "framer-motion": "^12.0.0-alpha.2", + "i18n-iso-countries": "^7.13.0", "i18next": "^24.2.0", "lucide-react": "^0.460.0", "luxon": "^3.5.0", diff --git a/src/components/ServerDetailOverview.tsx b/src/components/ServerDetailOverview.tsx index facc583..9b58b1e 100644 --- a/src/components/ServerDetailOverview.tsx +++ b/src/components/ServerDetailOverview.tsx @@ -7,6 +7,8 @@ import { useWebSocketContext } from "@/hooks/use-websocket-context" import { formatBytes } from "@/lib/format" import { cn, formatNezhaInfo } from "@/lib/utils" import { NezhaWebsocketResponse } from "@/types/nezha-api" +import countries from "i18n-iso-countries" +import enLocale from "i18n-iso-countries/langs/en.json" import { useEffect, useState } from "react" import { useTranslation } from "react-i18next" import { useNavigate } from "react-router-dom" @@ -77,6 +79,8 @@ export default function ServerDetailOverview({ server_id }: { server_id: string // @ts-expect-error CustomBackgroundImage is a global variable (window.CustomBackgroundImage as string) !== "" ? window.CustomBackgroundImage : undefined + countries.registerLocale(enLocale) + return (
{t("serverDetail.region")}