mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: fixed localize tankopedia chars
This commit is contained in:
1 parent
c4f1d9f3b0
commit
6233c16b88
4 files changed
+30
-19
No files matched your search
@@ -1,11 +1,5 @@
|
|||||||
import { times } from 'lodash-es';
|
import { times } from 'lodash-es';
|
||||||
import {
|
import { CrewType, ShellType, TankClass, TankType } from '../../protos';
|
||||||
CrewType,
|
|
||||||
GunDefinition,
|
|
||||||
ShellType,
|
|
||||||
TankClass,
|
|
||||||
TankType,
|
|
||||||
} from '../../protos';
|
|
||||||
|
|
||||||
export const SHELL_NAMES: Record<ShellType, string> = {
|
export const SHELL_NAMES: Record<ShellType, string> = {
|
||||||
[ShellType.AP]: 'AP',
|
[ShellType.AP]: 'AP',
|
||||||
@@ -20,14 +14,7 @@ export const CREW_MEMBER_NAMES = {
|
|||||||
[CrewType.LOADER]: 'loader',
|
[CrewType.LOADER]: 'loader',
|
||||||
[CrewType.RADIOMAN]: 'radioman',
|
[CrewType.RADIOMAN]: 'radioman',
|
||||||
} as const;
|
} as const;
|
||||||
export const GUN_TYPE_NAMES: Record<
|
|
||||||
Exclude<GunDefinition['gun_type'], undefined>['$case'],
|
|
||||||
string
|
|
||||||
> = {
|
|
||||||
auto_loader: 'Auto loader',
|
|
||||||
auto_reloader: 'Auto reloader',
|
|
||||||
regular: 'Regular',
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use svg
|
* @deprecated use svg
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -14,6 +14,12 @@
|
|||||||
"x": "x%s1"
|
"x": "x%s1"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"gun_types": {
|
||||||
|
"auto_loader": "Auto loader",
|
||||||
|
"auto_reloader": "Auto reloader",
|
||||||
|
"regular": "Regular"
|
||||||
|
},
|
||||||
|
|
||||||
"shells": {
|
"shells": {
|
||||||
"ap": "AP",
|
"ap": "AP",
|
||||||
"apcr": "APCR",
|
"apcr": "APCR",
|
||||||
@@ -817,7 +823,8 @@
|
|||||||
},
|
},
|
||||||
"other_projects": {
|
"other_projects": {
|
||||||
"title": "Other cool projects"
|
"title": "Other cool projects"
|
||||||
}
|
},
|
||||||
|
"help_translate": "Please help translate %s1 to %s2!"
|
||||||
},
|
},
|
||||||
|
|
||||||
"tools": {
|
"tools": {
|
||||||
|
|||||||
+1
-2
@@ -3,7 +3,6 @@ import {
|
|||||||
coefficient,
|
coefficient,
|
||||||
CREW_MEMBER_NAMES,
|
CREW_MEMBER_NAMES,
|
||||||
CrewType,
|
CrewType,
|
||||||
GUN_TYPE_NAMES,
|
|
||||||
isExplosive,
|
isExplosive,
|
||||||
resolvePenetrationCoefficient,
|
resolvePenetrationCoefficient,
|
||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
@@ -192,7 +191,7 @@ export function Characteristics() {
|
|||||||
strings.website.tools.tankopedia.characteristics.values.gunType
|
strings.website.tools.tankopedia.characteristics.values.gunType
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{GUN_TYPE_NAMES[gun.gun_type!.$case]}
|
{strings.common.gun_types[gun.gun_type!.$case]}
|
||||||
</Info>
|
</Info>
|
||||||
<InfoWithDelta
|
<InfoWithDelta
|
||||||
stats={stats}
|
stats={stats}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { assertSecret } from '@blitzkit/core';
|
import { assertSecret } from '@blitzkit/core';
|
||||||
import { DEFAULT_LOCALE, SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
import { DEFAULT_LOCALE, SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
||||||
import { Box, Flex, Heading } from '@radix-ui/themes';
|
import { Box, Flex, Heading, Link } from '@radix-ui/themes';
|
||||||
import type { GetStaticPaths } from 'astro';
|
import type { GetStaticPaths } from 'astro';
|
||||||
import { AesonPlug } from '../../components/AesonPlug';
|
import { AesonPlug } from '../../components/AesonPlug';
|
||||||
import { HomeLocaleSwitcher } from '../../components/Home/HomeLocaleSwitcher';
|
import { HomeLocaleSwitcher } from '../../components/Home/HomeLocaleSwitcher';
|
||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
tierListTool,
|
tierListTool,
|
||||||
} from '../../constants/tools';
|
} from '../../constants/tools';
|
||||||
import { getStrings } from '../../core/i18n/getStrings';
|
import { getStrings } from '../../core/i18n/getStrings';
|
||||||
|
import { literals } from '../../core/i18n/literals';
|
||||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||||
|
|
||||||
const PUBLIC_ASSET_BRANCH = assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH);
|
const PUBLIC_ASSET_BRANCH = assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH);
|
||||||
@@ -43,6 +44,23 @@ export const getStaticPaths = (() => {
|
|||||||
|
|
||||||
<HomeLocaleSwitcher {locale} client:load />
|
<HomeLocaleSwitcher {locale} client:load />
|
||||||
|
|
||||||
|
{
|
||||||
|
locale !== DEFAULT_LOCALE && (
|
||||||
|
<Flex justify="center" mb="4">
|
||||||
|
<Link
|
||||||
|
href="https://crowdin.com/project/blitzkrieg"
|
||||||
|
target="_blank"
|
||||||
|
underline="always"
|
||||||
|
>
|
||||||
|
{literals(strings.website.home.help_translate, [
|
||||||
|
'BlitzKit',
|
||||||
|
strings.common.locales[locale],
|
||||||
|
])}
|
||||||
|
</Link>
|
||||||
|
</Flex>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
<Plugs client:idle />
|
<Plugs client:idle />
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user