mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: make it compile!
This commit is contained in:
1 parent
90a64d4ccf
commit
6319e438b1
24 files changed
+138
-175
No files matched your search
@@ -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>{title}</title>
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user