diff --git a/app/routes/analyzer.tsx b/app/routes/analyzer.tsx index b753ea502..0870b0bb5 100644 --- a/app/routes/analyzer.tsx +++ b/app/routes/analyzer.tsx @@ -7,7 +7,7 @@ import { Main } from "~/components/Main"; import type { Stat } from "~/modules/analyzer"; import { useAnalyzeBuild } from "~/modules/analyzer"; import type { AnalyzedBuild, FullInkTankOption } from "~/modules/analyzer"; -import type { MainWeaponId } from "~/modules/in-game-lists"; +import type { MainWeaponId, SubWeaponId } from "~/modules/in-game-lists"; import styles from "~/styles/analyzer.css"; import { Image } from "~/components/Image"; import { specialWeaponImageUrl, subWeaponImageUrl } from "~/utils/urls"; @@ -64,7 +64,10 @@ export default function BuildAnalyzerPage() { title="Actions per ink tank" containerClassName="analyzer__consumption-table-container" > - + @@ -148,8 +151,14 @@ function StatCard({ ); } -function ConsumptionTable({ options }: { options: Array }) { - const { t } = useTranslation("analyzer"); +function ConsumptionTable({ + options, + subWeaponId, +}: { + options: Array; + subWeaponId: SubWeaponId; +}) { + const { t } = useTranslation(["analyzer", "weapons"]); const maxSubsToUse = Math.max(...options.map((opt) => opt.subsUsed)); const types = Array.from(new Set(options.map((opt) => opt.type))); @@ -158,9 +167,9 @@ function ConsumptionTable({ options }: { options: Array }) { - + {types.map((type) => ( - + ))} @@ -180,7 +189,7 @@ function ConsumptionTable({ options }: { options: Array }) {
{t("stat.consumption.bomb")}{t(`weapons:SUB_${subWeaponId}`)}{t(`stat.consumption.${type}`)}{t(`analyzer:stat.consumption.${type}`)}
- {t("consumptionExplanation", { maxSubsToUse })} + {t("analyzer:consumptionExplanation", { maxSubsToUse })}
); diff --git a/public/locales/en/analyzer.json b/public/locales/en/analyzer.json index 626b38db8..4d90deb48 100644 --- a/public/locales/en/analyzer.json +++ b/public/locales/en/analyzer.json @@ -1,7 +1,6 @@ { "stat.specialPoints": "Points to special", "stat.specialLost": "Special lost when splatted", - "stat.consumption.bomb": "Bombs", "stat.consumption.NORMAL": "Shots", "stat.consumption.SWING": "Swings", "stat.consumption.VERTICAL_SWING": "Vertical swings",