mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-20 12:24:55 +01:00
localize a few things
This commit is contained in:
5 files changed
+26
-5
No files matched your search
@@ -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 && (
|
||||
<Tooltip
|
||||
tooltip={playing ? "Pause animations" : "Play animations"}
|
||||
tooltip={
|
||||
playing
|
||||
? strings.tanks.skin_switcher.pause_animations
|
||||
: strings.tanks.skin_switcher.play_animations
|
||||
}
|
||||
side="left"
|
||||
>
|
||||
<IconButton
|
||||
|
||||
@@ -66,6 +66,7 @@ export const tools: Record<string, Tool> = {
|
||||
banner_background_position: "bottom",
|
||||
},
|
||||
tier_list: {
|
||||
disabled: true,
|
||||
id: "tier_list",
|
||||
slug: "tier-list",
|
||||
banner_background_position: "bottom",
|
||||
|
||||
@@ -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);
|
||||
---
|
||||
|
||||
<BaseLayout accent="blue" {locale}>
|
||||
<div class="page">
|
||||
<Heading size="3">404: page not found</Heading>
|
||||
<Text lowContrast>Where would you like to go?</Text>
|
||||
<Heading size="3">{strings.website.not_found.title}</Heading>
|
||||
<Text lowContrast>{strings.website.not_found.body}</Text>
|
||||
|
||||
<div class="actions">
|
||||
<LinkI18n {locale} href="/" underline="never">
|
||||
<Button>
|
||||
<HomeIcon />
|
||||
Home
|
||||
{strings.navbar.home}
|
||||
</Button>
|
||||
</LinkI18n>
|
||||
|
||||
<Link href={discordLink} underline="never">
|
||||
<Button variant="outline">
|
||||
<DiscordLogoIcon />
|
||||
Discord
|
||||
{strings.website.home.discord.action}
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -61,3 +61,5 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, () => {
|
||||
<HomeTechnical {locale} />
|
||||
</Section>
|
||||
</BaseLayout>
|
||||
|
||||
<!-- TODO: read temp/notes.md for user testing fixes -->
|
||||
Reference in new issue
Block a user