From 06832e156ff64d15847e193242b0e20bee242531 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Fri, 29 May 2026 14:09:53 -0500 Subject: [PATCH] names --- packages/i18n/strings/en.json | 46 +++++++++++++++++++ packages/website-ue/src/api/client.ts | 2 +- .../index.module.css | 1 + .../TankopediaCharacteristics/index.tsx | 10 +++- .../src/tankopedia/characteristicsOrder.tsx | 3 +- 5 files changed, 59 insertions(+), 3 deletions(-) diff --git a/packages/i18n/strings/en.json b/packages/i18n/strings/en.json index e6bd6a8e7..f3e24bf4c 100644 --- a/packages/i18n/strings/en.json +++ b/packages/i18n/strings/en.json @@ -208,6 +208,52 @@ "firepower": "Firepower", "maneuverability": "Maneuverability", "survivability": "Survivability" + }, + + "items": { + "name": "Name", + "class": "Class", + "type": "Type", + "nation": "Nation", + "tier": "Tier", + "compensation": "Compensation", + "id": "ID", + "slug": "Slug", + "gun_type": "Gun type", + "dpm": "Damage per minute", + "reload": "Reload", + "reloads": "Reloads", + "damage": "Damage", + "module_damage": "Module damage", + "clip_size": "Clip size", + "intra_clip": "Intra-clip", + "penetration": "Penetration", + "caliber": "Caliber", + "normalization": "Normalization", + "ricochet": "Ricochet", + "shell_velocity": "Shell velocity", + "shell_range": "Shell range", + "shell_capacity": "Shell capacity", + "aim_time": "Aim time", + "dispersion": "Dispersion", + "gun_depression": "Gun depression", + "gun_elevation": "Gun elevation", + "speed_forward": "Speed forward", + "speed_backward": "Speed backward", + "engine_power": "Engine power", + "weight": "Weight", + "terrain_coefficient": "Terrain coefficient", + "power_to_weight": "Power to weight", + "hull_traverse_speed": "Hull traverse speed", + "turret_traverse_speed": "Turret traverse speed", + "health": "Health", + "fire_chance": "Fire chance", + "view_range": "View range", + "camouflage": "Camouflage", + "width": "Width", + "height": "Height", + "length": "Length", + "volume": "Volume" } }, diff --git a/packages/website-ue/src/api/client.ts b/packages/website-ue/src/api/client.ts index 2de7e8e6c..f2f28e486 100644 --- a/packages/website-ue/src/api/client.ts +++ b/packages/website-ue/src/api/client.ts @@ -77,7 +77,7 @@ export class ClientAPI extends AbstractAPI { return fetchPB("/api/sets.pb", Sets); } - @Cache() + @Cache(true) async strings(locale: string) { const response = await fetch(`/api/strings/${locale}.json`); const json = (await response.json()) as Strings; diff --git a/packages/website-ue/src/components/TankopediaCharacteristics/index.module.css b/packages/website-ue/src/components/TankopediaCharacteristics/index.module.css index e510ab302..3ad74f6ef 100644 --- a/packages/website-ue/src/components/TankopediaCharacteristics/index.module.css +++ b/packages/website-ue/src/components/TankopediaCharacteristics/index.module.css @@ -56,6 +56,7 @@ display: flex; flex-direction: column; + justify-content: center; gap: var(--space-2); .value { diff --git a/packages/website-ue/src/components/TankopediaCharacteristics/index.tsx b/packages/website-ue/src/components/TankopediaCharacteristics/index.tsx index 7ac6c56ee..4eb88fa35 100644 --- a/packages/website-ue/src/components/TankopediaCharacteristics/index.tsx +++ b/packages/website-ue/src/components/TankopediaCharacteristics/index.tsx @@ -55,10 +55,18 @@ interface ToyProps { } function Item({ name }: CharacteristicRenderConfig) { + const strings = useStrings(); + return (
- {name} + + { + (strings.tanks.characteristics.items as Record)[ + name + ] + } + 123
diff --git a/packages/website-ue/src/tankopedia/characteristicsOrder.tsx b/packages/website-ue/src/tankopedia/characteristicsOrder.tsx index fdbaf1f88..f93bf1d10 100644 --- a/packages/website-ue/src/tankopedia/characteristicsOrder.tsx +++ b/packages/website-ue/src/tankopedia/characteristicsOrder.tsx @@ -121,7 +121,6 @@ export const characteristicsOrder: CharacteristicsGroup[] = [ { toy: "flexibility" }, { name: "gun_depression", decimals: 0, units: "deg" }, { name: "gun_elevation", decimals: 0, units: "deg" }, - ], }, { @@ -150,6 +149,8 @@ export const characteristicsOrder: CharacteristicsGroup[] = [ { name: "view_range", units: "m" }, { name: "camouflage", decimals: 0, units: "%" }, + // TODO: implement width + // { name: "width", units: "m" }, { name: "height", units: "m" }, { name: "length", units: "m" }, { name: "volume", units: "m" },