From 6319e438b1933f360c6fb2374ecb4d637db4a8e9 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Wed, 19 Mar 2025 01:01:19 -0500 Subject: [PATCH] feat: make it compile! --- .../Armor/components/ShotDisplayCard.tsx | 14 ++-- .../website/src/components/Compare/Body.tsx | 2 +- .../src/components/Compare/CompareRow.tsx | 2 +- .../Characteristics/components/Heading.tsx | 24 +++---- .../components/InfoWithDelta.tsx | 4 +- .../components/Characteristics/index.tsx | 64 ++++++++----------- .../components/Consumables.tsx | 9 +-- .../components/Equipment.tsx | 4 +- .../components/Miscellaneous.tsx | 2 +- .../components/Modules.tsx | 6 +- .../components/Provisions.tsx | 4 +- .../components/Skills.tsx | 8 +-- .../CharacteristicsSection/index.tsx | 4 +- .../components/Tankopedia/GameModeSection.tsx | 4 +- .../Options/components/CustomShellButton.tsx | 29 ++++----- .../Options/components/Thicknesses.tsx | 10 +-- .../HeroSection/components/Options/index.tsx | 39 +++++------ .../Tankopedia/MetaSection/index.tsx | 34 +++++----- .../TechTreeSection/components/Node.tsx | 9 ++- .../Tankopedia/TechTreeSection/index.tsx | 4 +- .../components/Tankopedia/VideoSection.tsx | 8 +-- .../tools/tankopedia/[id]/index.astro | 23 +++---- .../src/pages/api/gallery/[avatar].webp.ts | 4 +- tsconfig.json | 2 +- 24 files changed, 138 insertions(+), 175 deletions(-) diff --git a/packages/website/src/components/Armor/components/ShotDisplayCard.tsx b/packages/website/src/components/Armor/components/ShotDisplayCard.tsx index fb7d56ffc..7cd9b9e1e 100644 --- a/packages/website/src/components/Armor/components/ShotDisplayCard.tsx +++ b/packages/website/src/components/Armor/components/ShotDisplayCard.tsx @@ -55,7 +55,7 @@ function LayerEntry({ {literals( - strings.website.tools.tankopedia.sandbox.dynamic.shot_card.stats + strings.website.tools.tanks.sandbox.dynamic.shot_card.stats .ricochet_loss, [Math.max(-100, -50 * layer.distance).toFixed(0)], )} @@ -78,7 +78,7 @@ function LayerEntry({ {literals( angle === undefined ? strings.common.units.mm - : strings.website.tools.tankopedia.sandbox.dynamic.shot_card + : strings.website.tools.tanks.sandbox.dynamic.shot_card .stats.thickness_and_angle, [ Math.round(layer.thicknessAngled).toLocaleString(locale), @@ -89,7 +89,7 @@ function LayerEntry({ {literals( - strings.website.tools.tankopedia.sandbox.dynamic.shot_card.stats + strings.website.tools.tanks.sandbox.dynamic.shot_card.stats .nominal, [Math.round(layer.thickness).toLocaleString(locale)], )} @@ -120,7 +120,7 @@ export function ShotDisplayCard({ shot, ...props }: ShotDisplayCardProps) { {literals( - strings.website.tools.tankopedia.sandbox.dynamic.shot_card.status[ + strings.website.tools.tanks.sandbox.dynamic.shot_card.status[ shot.in.status ], [Math.round(shot.damage).toLocaleString(locale)], @@ -130,7 +130,7 @@ export function ShotDisplayCard({ shot, ...props }: ShotDisplayCardProps) { {shot.in.layers.map((layer, index) => { const layerName = - strings.website.tools.tankopedia.sandbox.dynamic.shot_card + strings.website.tools.tanks.sandbox.dynamic.shot_card .element[ layer.type === ArmorType.External ? layer.variant @@ -186,7 +186,7 @@ export function ShotDisplayCard({ shot, ...props }: ShotDisplayCardProps) { {literals( - strings.website.tools.tankopedia.sandbox.dynamic.shot_card + strings.website.tools.tanks.sandbox.dynamic.shot_card .status[shot.out.status], [Math.round(shot.damage).toLocaleString(locale)], )} @@ -195,7 +195,7 @@ export function ShotDisplayCard({ shot, ...props }: ShotDisplayCardProps) { {shot.out.layers.map((layer, index) => { const layerName = - strings.website.tools.tankopedia.sandbox.dynamic.shot_card + strings.website.tools.tanks.sandbox.dynamic.shot_card .element[ layer.type === ArmorType.External ? layer.variant diff --git a/packages/website/src/components/Compare/Body.tsx b/packages/website/src/components/Compare/Body.tsx index b4c0afd57..98643b72a 100644 --- a/packages/website/src/components/Compare/Body.tsx +++ b/packages/website/src/components/Compare/Body.tsx @@ -81,7 +81,7 @@ export function Body({ stats }: BodyProps) { stats.shellReload ?? diff --git a/packages/website/src/components/Compare/CompareRow.tsx b/packages/website/src/components/Compare/CompareRow.tsx index af717f5df..9c52d0226 100644 --- a/packages/website/src/components/Compare/CompareRow.tsx +++ b/packages/website/src/components/Compare/CompareRow.tsx @@ -52,7 +52,7 @@ export function CompareRow({ const id = useRef(Math.random()); const name = typeof props.value === 'string' - ? strings.website.tools.tankopedia.characteristics.values[props.value] + ? strings.website.tools.tanks.characteristics.values[props.value] : props.name; return ( diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/Heading.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/Heading.tsx index f03b81077..f903f5964 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/Heading.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/Heading.tsx @@ -23,11 +23,11 @@ export function CharacteristicsHeading() { direction="column" > - {strings.website.tools.tankopedia.characteristics.title} + {strings.website.tools.tanks.characteristics.title} - {strings.website.tools.tankopedia.characteristics.compare.label} + {strings.website.tools.tanks.characteristics.compare.label} - {literals( - strings.website.tools.tankopedia.characteristics.compare.class, - [ - TIER_ROMAN_NUMERALS[tank.tier], - strings.common.tank_class_short_plural_lowercase[tank.class], - ], - )} + {literals(strings.website.tools.tanks.characteristics.compare.class, [ + TIER_ROMAN_NUMERALS[tank.tier], + strings.common.tank_class_short_plural_lowercase[tank.class], + ])} - {literals( - strings.website.tools.tankopedia.characteristics.compare.tier, - [TIER_ROMAN_NUMERALS[tank.tier]], - )} + {literals(strings.website.tools.tanks.characteristics.compare.tier, [ + TIER_ROMAN_NUMERALS[tank.tier], + ])} - {strings.website.tools.tankopedia.characteristics.compare.all} + {strings.website.tools.tanks.characteristics.compare.all} diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/InfoWithDelta.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/InfoWithDelta.tsx index e035d72c6..6ea241ea6 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/InfoWithDelta.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/InfoWithDelta.tsx @@ -145,9 +145,7 @@ export function InfoWithDelta({ name={ 'name' in props ? props.name - : strings.website.tools.tankopedia.characteristics.values[ - props.value - ] + : strings.website.tools.tanks.characteristics.values[props.value] } delta={delta} > diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/index.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/index.tsx index e7636fb0b..b140c7a0d 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/index.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/index.tsx @@ -147,7 +147,7 @@ export function Characteristics() { - {strings.website.tools.tankopedia.firepower.title} + {strings.website.tools.tanks.firepower.title} @@ -189,9 +189,7 @@ export function Characteristics() { {strings.common.gun_types[gun.gun_type!.$case]} @@ -218,7 +216,7 @@ export function Characteristics() { @@ -226,7 +224,7 @@ export function Characteristics() { { - strings.website.tools.tankopedia.characteristics.values + strings.website.tools.tanks.characteristics.values .at_distance_slider_label } @@ -404,7 +402,7 @@ export function Characteristics() { /> @@ -528,9 +525,7 @@ export function Characteristics() { - - {strings.website.tools.tankopedia.crew.title} - + {strings.website.tools.tanks.crew.title} @@ -542,7 +537,7 @@ export function Characteristics() { - {strings.website.tools.tankopedia.crew.info} + {strings.website.tools.tanks.crew.info} @@ -557,7 +552,7 @@ export function Characteristics() { stats={stats} key={`${member.type}-root`} name={`${ - strings.website.tools.tankopedia.crew[ + strings.website.tools.tanks.crew[ CREW_MEMBER_NAMES[member.type] ] }${ @@ -591,7 +586,7 @@ export function Characteristics() { {member.substitute .map((sub, index) => index === 0 - ? strings.website.tools.tankopedia.crew[ + ? strings.website.tools.tanks.crew[ CREW_MEMBER_NAMES[sub] ] : sub, @@ -613,10 +608,10 @@ export function Characteristics() { - {strings.website.tools.tankopedia.maneuverability.title} + {strings.website.tools.tanks.maneuverability.title} @@ -668,7 +663,7 @@ export function Characteristics() { /> - {strings.website.tools.tankopedia.survivability.title} + {strings.website.tools.tanks.survivability.title} @@ -797,7 +787,7 @@ export function Characteristics() { stats={stats} indent name={ - strings.website.tools.tankopedia.characteristics.values + strings.website.tools.tanks.characteristics.values .camouflageMoving } decimals={2} @@ -806,7 +796,7 @@ export function Characteristics() { stats={stats} indent name={ - strings.website.tools.tankopedia.characteristics.values + strings.website.tools.tanks.characteristics.values .camouflageShootingStill } decimals={2} @@ -816,7 +806,7 @@ export function Characteristics() { stats={stats} indent name={ - strings.website.tools.tankopedia.characteristics.values + strings.website.tools.tanks.characteristics.values .camouflageShootingMoving } decimals={2} @@ -826,7 +816,7 @@ export function Characteristics() { stats={stats} indent name={ - strings.website.tools.tankopedia.characteristics.values + strings.website.tools.tanks.characteristics.values .camouflageCaughtOnFire } decimals={2} diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Consumables.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Consumables.tsx index 0eac29077..85c797fbc 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Consumables.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Consumables.tsx @@ -42,7 +42,7 @@ export function Consumables() { - {strings.website.tools.tankopedia.configuration.consumables.title} + {strings.website.tools.tanks.configuration.consumables.title} @@ -54,10 +54,7 @@ export function Consumables() { - { - strings.website.tools.tankopedia.configuration.consumables - .info - } + {strings.website.tools.tanks.configuration.consumables.info} @@ -72,7 +69,7 @@ export function Consumables() { }); }} > - {strings.website.tools.tankopedia.configuration.consumables.clear} + {strings.website.tools.tanks.configuration.consumables.clear} diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Equipment.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Equipment.tsx index 67e35f4f1..32ab6200e 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Equipment.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Equipment.tsx @@ -21,7 +21,7 @@ export function Equipment() { - {strings.website.tools.tankopedia.configuration.equipment.title} + {strings.website.tools.tanks.configuration.equipment.title} diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Miscellaneous.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Miscellaneous.tsx index 0627c6a4b..e50183384 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Miscellaneous.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Miscellaneous.tsx @@ -17,7 +17,7 @@ export function Miscellaneous() { return ( - {strings.website.tools.tankopedia.configuration.miscellaneous.title} + {strings.website.tools.tanks.configuration.miscellaneous.title} diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Modules.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Modules.tsx index 14949404d..e09c527d7 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Modules.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Modules.tsx @@ -356,7 +356,7 @@ export function Modules() { - {strings.website.tools.tankopedia.configuration.modules.title} + {strings.website.tools.tanks.configuration.modules.title} {hasUpgrades && ( @@ -375,7 +375,7 @@ export function Modules() { }); }} > - {strings.website.tools.tankopedia.configuration.modules.stock} + {strings.website.tools.tanks.configuration.modules.stock} )} diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Provisions.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Provisions.tsx index 88179bcb4..fb630af55 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Provisions.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Provisions.tsx @@ -19,7 +19,7 @@ export function Provisions() { - {strings.website.tools.tankopedia.configuration.provisions.title} + {strings.website.tools.tanks.configuration.provisions.title} diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Skills.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Skills.tsx index 45f488ecf..a9700dd99 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Skills.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Skills.tsx @@ -22,7 +22,7 @@ export function Skills() { - {strings.website.tools.tankopedia.configuration.skills.title} + {strings.website.tools.tanks.configuration.skills.title} @@ -35,7 +35,7 @@ export function Skills() { - {strings.website.tools.tankopedia.configuration.skills.info} + {strings.website.tools.tanks.configuration.skills.info} @@ -53,7 +53,7 @@ export function Skills() { }); }} > - {strings.website.tools.tankopedia.configuration.skills.clear} + {strings.website.tools.tanks.configuration.skills.clear} diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/index.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/index.tsx index 840f4c1c4..425ae4325 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/index.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/index.tsx @@ -27,9 +27,7 @@ export function CharacteristicsSection() { maxWidth="21rem" align={{ initial: 'center', sm: 'start' }} > - - {strings.website.tools.tankopedia.configuration.title} - + {strings.website.tools.tanks.configuration.title} diff --git a/packages/website/src/components/Tankopedia/GameModeSection.tsx b/packages/website/src/components/Tankopedia/GameModeSection.tsx index 0c7e48196..9c9357dac 100644 --- a/packages/website/src/components/Tankopedia/GameModeSection.tsx +++ b/packages/website/src/components/Tankopedia/GameModeSection.tsx @@ -22,9 +22,7 @@ export function GameModeSection() { return ( - - {strings.website.tools.tankopedia.game_modes.title} - + {strings.website.tools.tanks.game_modes.title} {roles.map(([key, value]) => { diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/CustomShellButton.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/CustomShellButton.tsx index 3a4d1b214..29270c823 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/CustomShellButton.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/CustomShellButton.tsx @@ -58,8 +58,8 @@ export function CustomShellButton() { { - strings.website.tools.tankopedia.sandbox.dynamic - .custom_shell.type + strings.website.tools.tanks.sandbox.dynamic.custom_shell + .type } { - strings.website.tools.tankopedia.sandbox.dynamic - .custom_shell.caliber + strings.website.tools.tanks.sandbox.dynamic.custom_shell + .caliber } { - strings.website.tools.tankopedia.sandbox.dynamic - .custom_shell.penetration + strings.website.tools.tanks.sandbox.dynamic.custom_shell + .penetration } { - strings.website.tools.tankopedia.sandbox.dynamic - .custom_shell.normalization + strings.website.tools.tanks.sandbox.dynamic.custom_shell + .normalization } @@ -234,8 +234,8 @@ export function CustomShellButton() { { - strings.website.tools.tankopedia.sandbox.dynamic - .custom_shell.ricochet + strings.website.tools.tanks.sandbox.dynamic.custom_shell + .ricochet } @@ -297,8 +297,8 @@ export function CustomShellButton() { @@ -310,10 +310,7 @@ export function CustomShellButton() { }); }} > - { - strings.website.tools.tankopedia.sandbox.dynamic.custom_shell - .reset - } + {strings.website.tools.tanks.sandbox.dynamic.custom_shell.reset} diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/Thicknesses.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/Thicknesses.tsx index 7aa365e85..1c0333408 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/Thicknesses.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/Thicknesses.tsx @@ -60,7 +60,7 @@ export function Thicknesses({ thicknessRange }: ThicknessesProps) { ])} - {strings.website.tools.tankopedia.sandbox.static.primary} + {strings.website.tools.tanks.sandbox.static.primary} {literals(strings.common.units.mm, ['0'])} @@ -101,7 +101,7 @@ export function Thicknesses({ thicknessRange }: ThicknessesProps) { ])} - {strings.website.tools.tankopedia.sandbox.static.spaced} + {strings.website.tools.tanks.sandbox.static.spaced} {literals(strings.common.units.mm, ['0'])} @@ -135,7 +135,7 @@ export function Thicknesses({ thicknessRange }: ThicknessesProps) { > - {strings.website.tools.tankopedia.sandbox.static.external} + {strings.website.tools.tanks.sandbox.static.external} @@ -168,7 +168,7 @@ export function Thicknesses({ thicknessRange }: ThicknessesProps) { }} > - {strings.website.tools.tankopedia.sandbox.static.edit.label} + {strings.website.tools.tanks.sandbox.static.edit.label} @@ -186,7 +186,7 @@ export function Thicknesses({ thicknessRange }: ThicknessesProps) { }} > - {strings.website.tools.tankopedia.sandbox.static.edit.reset} + {strings.website.tools.tanks.sandbox.static.edit.reset} diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/Options/index.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/Options/index.tsx index 4a81b15ac..213bde9d9 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/Options/index.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/Options/index.tsx @@ -346,13 +346,13 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { > - {strings.website.tools.tankopedia.sandbox.dynamic.advanced} + {strings.website.tools.tanks.sandbox.dynamic.advanced} - {strings.website.tools.tankopedia.sandbox.dynamic.shooter} + {strings.website.tools.tanks.sandbox.dynamic.shooter} - + @@ -418,7 +416,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { @@ -427,7 +425,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { @@ -452,15 +450,15 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { poseEvent.emit(Pose.HullDown)}> - {strings.website.tools.tankopedia.sandbox.poses.hull_down} + {strings.website.tools.tanks.sandbox.poses.hull_down} poseEvent.emit(Pose.FaceHug)}> - {strings.website.tools.tankopedia.sandbox.poses.face_hug} + {strings.website.tools.tanks.sandbox.poses.face_hug} poseEvent.emit(Pose.Default)}> - {strings.website.tools.tankopedia.sandbox.poses.default} + {strings.website.tools.tanks.sandbox.poses.default} @@ -476,7 +474,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { {display === TankopediaDisplay.DynamicArmor && ( <> - {strings.website.tools.tankopedia.sandbox.settings.armor} + {strings.website.tools.tanks.sandbox.settings.armor} { - strings.website.tools.tankopedia.sandbox.settings + strings.website.tools.tanks.sandbox.settings .green_penetration } @@ -502,7 +500,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { }} > { - strings.website.tools.tankopedia.sandbox.settings + strings.website.tools.tanks.sandbox.settings .hide_model_under_armor } @@ -515,7 +513,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { }); }} > - {strings.website.tools.tankopedia.sandbox.settings.opaque} + {strings.website.tools.tanks.sandbox.settings.opaque} {developerMode && ( @@ -528,7 +526,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { }} > { - strings.website.tools.tankopedia.sandbox.settings + strings.website.tools.tanks.sandbox.settings .dev_wireframe } @@ -537,7 +535,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { )} - {strings.website.tools.tankopedia.sandbox.settings.environment} + {strings.website.tools.tanks.sandbox.settings.environment} - {strings.website.tools.tankopedia.sandbox.settings.show_grid} + {strings.website.tools.tanks.sandbox.settings.show_grid} @@ -581,10 +579,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { }} > - { - strings.website.tools.tankopedia.sandbox.screenshot - .download - } + {strings.website.tools.tanks.sandbox.screenshot.download} @@ -603,7 +598,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { }} > - {strings.website.tools.tankopedia.sandbox.screenshot.copy} + {strings.website.tools.tanks.sandbox.screenshot.copy} diff --git a/packages/website/src/components/Tankopedia/MetaSection/index.tsx b/packages/website/src/components/Tankopedia/MetaSection/index.tsx index 312b98289..85ae6f03d 100644 --- a/packages/website/src/components/Tankopedia/MetaSection/index.tsx +++ b/packages/website/src/components/Tankopedia/MetaSection/index.tsx @@ -47,7 +47,7 @@ export function MetaSection() { @@ -57,7 +57,7 @@ export function MetaSection() { > @@ -73,8 +73,8 @@ export function MetaSection() { {assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH) === 'opentest' - ? strings.website.tools.tankopedia.meta.vanilla - : strings.website.tools.tankopedia.meta.opentest} + ? strings.website.tools.tanks.meta.vanilla + : strings.website.tools.tanks.meta.opentest} )} @@ -83,13 +83,13 @@ export function MetaSection() { - {strings.website.tools.tankopedia.meta.swap.title} + {strings.website.tools.tanks.meta.swap.title} {protagonist.name_full && ( - + {unwrap(protagonist.name_full)} )} - + - + {strings.common.tank_class_short[protagonist.class]} - + {TIER_ROMAN_NUMERALS[protagonist.tier]} {developerMode && ( - + {protagonist.id} )} {protagonist.type === TankType.PREMIUM && ( - + {protagonist.price.value / 400} @@ -204,7 +204,7 @@ export function MetaSection() { /> - + {(protagonist.price.value / 2).toLocaleString(locale)} {protagonist.research_cost && ( - + {( protagonist.research_cost.research_cost_type! diff --git a/packages/website/src/components/Tankopedia/TechTreeSection/components/Node.tsx b/packages/website/src/components/Tankopedia/TechTreeSection/components/Node.tsx index 6ea625045..a52e94f9b 100644 --- a/packages/website/src/components/Tankopedia/TechTreeSection/components/Node.tsx +++ b/packages/website/src/components/Tankopedia/TechTreeSection/components/Node.tsx @@ -132,11 +132,10 @@ export function Node({ id, highlight, nextIds, skeleton }: NodeProps) { {skeleton && } {!skeleton && (games === 1 - ? strings.website.tools.tankopedia.tech_tree.battle - : literals( - strings.website.tools.tankopedia.tech_tree.battles, - [`${games}`], - ))} + ? strings.website.tools.tanks.tech_tree.battle + : literals(strings.website.tools.tanks.tech_tree.battles, [ + `${games}`, + ]))} )} diff --git a/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx b/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx index d34874c68..f7162124e 100644 --- a/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx +++ b/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx @@ -93,7 +93,7 @@ export function TechTreeSection({ skeleton }: MaybeSkeletonComponentProps) { > - {strings.website.tools.tankopedia.tech_tree.title} + {strings.website.tools.tanks.tech_tree.title} {master.tier > 1 && ( @@ -219,7 +219,7 @@ export function TechTreeSection({ skeleton }: MaybeSkeletonComponentProps) { - {literals(strings.website.tools.tankopedia.tech_tree.route, [ + {literals(strings.website.tools.tanks.tech_tree.route, [ `${lineIndex + 1}`, `${lines.length}`, ])} diff --git a/packages/website/src/components/Tankopedia/VideoSection.tsx b/packages/website/src/components/Tankopedia/VideoSection.tsx index f910b2cde..483829e6d 100644 --- a/packages/website/src/components/Tankopedia/VideoSection.tsx +++ b/packages/website/src/components/Tankopedia/VideoSection.tsx @@ -22,12 +22,10 @@ export function VideoSection({ skeleton }: MaybeSkeletonComponentProps) { - - {strings.website.tools.tankopedia.review.title} - + {strings.website.tools.tanks.review.title} - {strings.website.tools.tankopedia.review.disclaimer} + {strings.website.tools.tanks.review.disclaimer} @@ -117,7 +115,7 @@ export function VideoSection({ skeleton }: MaybeSkeletonComponentProps) { width: '9rem', }} > - {literals(strings.website.tools.tankopedia.review.join, [ + {literals(strings.website.tools.tanks.review.join, [ 'BlitzKit', ])} diff --git a/packages/website/src/pages/[...locale]/tools/tankopedia/[id]/index.astro b/packages/website/src/pages/[...locale]/tools/tankopedia/[id]/index.astro index 29fdad238..f048dc556 100644 --- a/packages/website/src/pages/[...locale]/tools/tankopedia/[id]/index.astro +++ b/packages/website/src/pages/[...locale]/tools/tankopedia/[id]/index.astro @@ -11,10 +11,10 @@ import { TIER_ROMAN_NUMERALS, } from '@blitzkit/core'; import { DEFAULT_LOCALE, unwrapper } from '@blitzkit/i18n'; +import { literals } from '@blitzkit/i18n/src/literals'; import type { GetStaticPaths } from 'astro'; import { tankCharacteristics } from '../../../../../core/blitzkit/tankCharacteristics'; import { getStrings } from '../../../../../core/i18n/getStrings'; -import { literals } from '@blitzkit/i18n/src/literals'; import BaseLayout from '../../../../../layouts/BaseLayout.astro'; import { genericDefaultEquipmentMatrix } from '../../../../../stores/duel/constants'; import { getStaticPaths as parentGetStaticPaths } from '../index.astro'; @@ -45,7 +45,7 @@ const tank = tankDefinitions.tanks[id]; const tankModelDefinition = tankModelDefinitions.models[tank.id]; const name = tank.name_full ?? tank.name; const unwrap = unwrapper(locale); -const title = literals(strings.website.tools.tankopedia.tank_seo_title, [ +const title = literals(strings.website.tools.tanks.tank_seo_title, [ unwrap(name), TIER_ROMAN_NUMERALS[tank.tier], strings.common.nations_adjectives[ @@ -82,17 +82,14 @@ const characteristics = tankCharacteristics( }, { equipmentDefinitions, provisionDefinitions, tankModelDefinition }, ); -const description = literals( - strings.website.tools.tankopedia.tank_seo_description, - [ - unwrap(name), - Math.round(characteristics.dpm).toLocaleString(locale), - Math.round(characteristics.damage).toLocaleString(locale), - Math.round(characteristics.penetration).toLocaleString(locale), - Math.round(characteristics.speedForwards).toLocaleString(locale), - Math.round(characteristics.health).toLocaleString(locale), - ], -); +const description = literals(strings.website.tools.tanks.tank_seo_description, [ + unwrap(name), + Math.round(characteristics.dpm).toLocaleString(locale), + Math.round(characteristics.damage).toLocaleString(locale), + Math.round(characteristics.penetration).toLocaleString(locale), + Math.round(characteristics.speedForwards).toLocaleString(locale), + Math.round(characteristics.health).toLocaleString(locale), +]); --- {title} diff --git a/packages/website/src/pages/api/gallery/[avatar].webp.ts b/packages/website/src/pages/api/gallery/[avatar].webp.ts index 80fbb0a83..88e78151a 100644 --- a/packages/website/src/pages/api/gallery/[avatar].webp.ts +++ b/packages/website/src/pages/api/gallery/[avatar].webp.ts @@ -16,9 +16,9 @@ const glossary = await fetchGlossary(DEFAULT_LOCALE); /** * Returns an in-game avatar image. Use gallery/list.json to get all valid ids. - * Not all ids may have images due to poor Wargaming CDNs. Some images may be - * animated. Not all images share the same dimensions. + * Some images may be animated. Not all images share the same dimensions. * + * @warning Not all ids have images due to poor Wargaming CDN. * @param avatar The avatar id. * @returns A webp image. */ diff --git a/tsconfig.json b/tsconfig.json index f5912f4e8..499afcf7f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "ESNext", "module": "ESNext", - "moduleResolution": "Node", + "moduleResolution": "bundler", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true,