feat: localize game assets

This commit is contained in:
tresabhi committed 2025-01-14 19:22:41 -06:00
1 parent d8459d373c
commit ef9778ea96
90 files changed
+336 -251

No files matched your search

@@ -13,7 +13,7 @@ import {
type IndividualAccountInfo,
type IndividualTankStats,
} from '@blitzkit/core';
import strings from '@blitzkit/core/lang/en.json';
import strings from '@blitzkit/i18n/strings/en.json';
import {
ArrowDownIcon,
MagnifyingGlassIcon,
@@ -4,7 +4,6 @@ import { CalloutsSection } from '../../../../../components/Tankopedia/CalloutsSe
import { CharacteristicsSection } from '../../../../../components/Tankopedia/CharacteristicsSection';
import { GameModeSection } from '../../../../../components/Tankopedia/GameModeSection';
import { HeroSection } from '../../../../../components/Tankopedia/HeroSection';
import { HistorySection } from '../../../../../components/Tankopedia/HistorySection';
import { MetaSection } from '../../../../../components/Tankopedia/MetaSection';
import { TechTreeSection } from '../../../../../components/Tankopedia/TechTreeSection';
import { VideoSection } from '../../../../../components/Tankopedia/VideoSection';
@@ -3,7 +3,6 @@ import {
asset,
createDefaultProvisions,
createDefaultSkills,
DEFAULT_LOCALE,
fetchEquipmentDefinitions,
fetchModelDefinitions,
fetchProvisionDefinitions,
@@ -11,6 +10,7 @@ import {
fetchTankDefinitions,
TIER_ROMAN_NUMERALS,
} from '@blitzkit/core';
import { DEFAULT_LOCALE, unwrapper } from '@blitzkit/i18n';
import type { GetStaticPaths } from 'astro';
import { tankCharacteristics } from '../../../../../core/blitzkit/tankCharacteristics';
import { getStrings } from '../../../../../core/i18n/getStrings';
@@ -44,8 +44,9 @@ const tankModelDefinitions = await fetchModelDefinitions();
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, [
name,
unwrap(name),
TIER_ROMAN_NUMERALS[tank.tier],
strings.common.nations_adjectives[
tank.nation as keyof typeof strings.common.nations_adjectives
@@ -84,7 +85,7 @@ const characteristics = tankCharacteristics(
const description = literals(
strings.website.tools.tankopedia.tank_seo_description,
[
name,
unwrap(name),
Math.round(characteristics.dpm).toLocaleString(locale),
Math.round(characteristics.damage).toLocaleString(locale),
Math.round(characteristics.penetration).toLocaleString(locale),