From dba6601fedc7cf82ced99ea123322beeb20025ee Mon Sep 17 00:00:00 2001
From: Kalle <38327916+Sendouc@users.noreply.github.com>
Date: Sun, 8 Nov 2026 12:10:45 +0200
Subject: [PATCH] Drop unneeded `as any` casts on translation keys so they are
type-checked again
---
app/components/BuildCard.tsx | 8 ++++----
app/features/admin/routes/og-images.tsx | 2 +-
app/features/comp-analyzer/components/DamageComboBar.tsx | 4 ++--
app/features/info/routes/support.tsx | 2 +-
app/features/info/routes/welcome.tsx | 6 ++----
.../routes/object-damage-calculator.tsx | 4 ++--
6 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/app/components/BuildCard.tsx b/app/components/BuildCard.tsx
index 7667ef938..cc0522a29 100644
--- a/app/components/BuildCard.tsx
+++ b/app/components/BuildCard.tsx
@@ -116,8 +116,8 @@ export function BuildCard({
{modes.map((mode) => (
}
>
- {t(`weapons:MAIN_${weapon.weaponSplId}` as any)}
+ {t(`weapons:MAIN_${weapon.weaponSplId}`)}
))}
@@ -426,7 +426,7 @@ function RoundWeaponImage({
return (
diff --git a/app/features/admin/routes/og-images.tsx b/app/features/admin/routes/og-images.tsx
index eddf385be..a67c86c97 100644
--- a/app/features/admin/routes/og-images.tsx
+++ b/app/features/admin/routes/og-images.tsx
@@ -63,7 +63,7 @@ export default function OgImages() {
{OG_IMAGE_PAGES.map((page) => (
-
+
))}
diff --git a/app/features/comp-analyzer/components/DamageComboBar.tsx b/app/features/comp-analyzer/components/DamageComboBar.tsx
index f1cc30684..b4e847372 100644
--- a/app/features/comp-analyzer/components/DamageComboBar.tsx
+++ b/app/features/comp-analyzer/components/DamageComboBar.tsx
@@ -70,7 +70,7 @@ function DamageComboBar({
key={index}
segment={segment}
totalDamage={totalWithInk}
- damageTypeLabel={t(`analyzer:damage.${segment.damageType}` as any)}
+ damageTypeLabel={t(`analyzer:damage.${segment.damageType}`)}
onToggleFilter={onToggleFilter}
/>
))}
@@ -234,7 +234,7 @@ function FilteredItem({ filterKey, onRestore }: FilteredItemProps) {
isSubWeapon={filterKey.weaponType === "sub"}
isSpecialWeapon={filterKey.weaponType === "special"}
/>
- {t(`analyzer:damage.${filterKey.damageType}` as any)}
+ {t(`analyzer:damage.${filterKey.damageType}`)}
);
}
diff --git a/app/features/info/routes/support.tsx b/app/features/info/routes/support.tsx
index 6f36e6e45..b6b530a0e 100644
--- a/app/features/info/routes/support.tsx
+++ b/app/features/info/routes/support.tsx
@@ -212,7 +212,7 @@ function SupportTable() {
}
>
- {t(`support.perk.${perk.name}.extra` as any)}
+ {t(`support.perk.${perk.name}.extra`)}
>
) : null}
diff --git a/app/features/info/routes/welcome.tsx b/app/features/info/routes/welcome.tsx
index a0a7d93e3..f6b2d9072 100644
--- a/app/features/info/routes/welcome.tsx
+++ b/app/features/info/routes/welcome.tsx
@@ -135,10 +135,8 @@ export default function WelcomePage() {
{t("welcome:title")}
{SECTION_KEYS.map((sectionKey) => (
-
- {t(`welcome:${sectionKey}.header` as any)}
-
- {(t(`welcome:${sectionKey}.body` as any) as string)
+ {t(`welcome:${sectionKey}.header`)}
+ {(t(`welcome:${sectionKey}.body`) as string)
.split("\n\n")
.map((paragraph) => (
diff --git a/app/features/object-damage-calculator/routes/object-damage-calculator.tsx b/app/features/object-damage-calculator/routes/object-damage-calculator.tsx
index bf6e43c21..adc7c4500 100644
--- a/app/features/object-damage-calculator/routes/object-damage-calculator.tsx
+++ b/app/features/object-damage-calculator/routes/object-damage-calculator.tsx
@@ -175,7 +175,7 @@ function ObjectDamagePage({ weapon }: { weapon: AnyWeapon }) {
handleChange({ newDamageType: optionDamageType })
}
>
- {t(`analyzer:damage.${optionDamageType}` as any)}
+ {t(`analyzer:damage.${optionDamageType}`)}
))}
@@ -473,7 +473,7 @@ function DamageReceiversGrid({
})}
- {t(`analyzer:damage.${damage.type}` as any)}
+ {t(`analyzer:damage.${damage.type}`)}
{damage.objectShredder ? (
) : null}