From 60f3fb7727246be6cbd4c8cdae8310b2e1094c6c Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Thu, 19 Nov 2026 21:12:33 -0600 Subject: [PATCH] localize a few things --- packages/i18n/strings/en.json | 10 ++++++++++ .../src/components/TankopediaSkinSwitcher/index.tsx | 8 +++++++- packages/website/src/constants/tools.ts | 1 + packages/website/src/pages/404.astro | 10 ++++++---- .../pages/[...chunk_default]/[...locale]/index.astro | 2 ++ 5 files changed, 26 insertions(+), 5 deletions(-) diff --git a/packages/i18n/strings/en.json b/packages/i18n/strings/en.json index c6b649720..f010a371e 100644 --- a/packages/i18n/strings/en.json +++ b/packages/i18n/strings/en.json @@ -173,6 +173,11 @@ "equalize": "Equalize" }, + "skin_switcher": { + "play_animations": "Play animations", + "pause_animations": "Pause animations" + }, + "custom_shell": { "title": "Custom shell", "type": "Type", @@ -766,6 +771,11 @@ "body": "This page has moved. Redirecting..." }, + "not_found": { + "title": "404: page not found", + "body": "Where would you like to go?" + }, + "settings": { "title": "Settings", "description": "Change BlitzKit settings", diff --git a/packages/website/src/components/TankopediaSkinSwitcher/index.tsx b/packages/website/src/components/TankopediaSkinSwitcher/index.tsx index d9649894c..63ca29cf7 100644 --- a/packages/website/src/components/TankopediaSkinSwitcher/index.tsx +++ b/packages/website/src/components/TankopediaSkinSwitcher/index.tsx @@ -6,6 +6,7 @@ import { SKIN_NUMBER } from "../../constants/skinNumber"; import { useAbsoluteDisplay } from "../../hooks/useAbsoluteDisplay"; import { useDuelModules } from "../../hooks/useDuelModules"; import { hasSkinAnimations } from "../../hooks/useSkin"; +import { useStrings } from "../../hooks/useStrings"; import { useUnwrapper } from "../../hooks/useUnwrapper"; import { Tankopedia } from "../../stores/tankopedia"; import { TankopediaDisplay } from "../../stores/tankopediaPersistent/constants"; @@ -17,6 +18,7 @@ const camouflageDefinitions = await api.camouflages(); export function TankopediaSkinSwitcher() { const unwrap = useUnwrapper(); + const strings = useStrings(); const protagonist = useDuelModules("protagonist"); @@ -94,7 +96,11 @@ export function TankopediaSkinSwitcher() { {hasAnimations && ( = { banner_background_position: "bottom", }, tier_list: { + disabled: true, id: "tier_list", slug: "tier-list", banner_background_position: "bottom", diff --git a/packages/website/src/pages/404.astro b/packages/website/src/pages/404.astro index 2329b7a11..779286755 100644 --- a/packages/website/src/pages/404.astro +++ b/packages/website/src/pages/404.astro @@ -1,6 +1,7 @@ --- import locales from "@blitzkit/i18n/locales.json"; import { DiscordLogoIcon, HomeIcon } from "@radix-ui/react-icons"; +import { api } from "../api/dynamic"; import { Button } from "../components/Button"; import { Heading } from "../components/Heading"; import { Link } from "../components/Link"; @@ -11,25 +12,26 @@ import BaseLayout from "../layouts/BaseLayout.astro"; // the 404 page is not locale-scoped, so it always renders in the default locale const locale = locales.default; +const strings = await api.strings(locale); ---
- 404: page not found - Where would you like to go? + {strings.website.not_found.title} + {strings.website.not_found.body}
diff --git a/packages/website/src/pages/[...chunk_default]/[...locale]/index.astro b/packages/website/src/pages/[...chunk_default]/[...locale]/index.astro index 8907d7b58..aebd8bc84 100644 --- a/packages/website/src/pages/[...chunk_default]/[...locale]/index.astro +++ b/packages/website/src/pages/[...chunk_default]/[...locale]/index.astro @@ -61,3 +61,5 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, () => { + +