Compare commits

...
25 Commits
Author SHA1 Message Date
TrèsAbhi 1e996cb970 New Crowdin updates (#172) 2025-10-04 22:15:25 -05:00
TrèsAbhi 8639b31b8f feat: logs 2025-10-04 22:13:50 -05:00
TrèsAbhi 889a92e98b fix: lighting toggler no longer fires on unload 2025-10-04 22:05:36 -05:00
TrèsAbhi e7fe3a4baf fix: signs of tankiopedia transofmr controls 2025-10-04 22:02:24 -05:00
TrèsAbhi ab10343704 fix: clearer controls of tankoepdia 2025-10-04 21:53:18 -05:00
TrèsAbhi 9412be2d7c feat: filter owned tanks 2025-10-04 21:35:12 -05:00
TrèsAbhi 66cf590f1c fix: hook call outside parent hook 2025-10-04 21:33:28 -05:00
TrèsAbhi 7c18549c00 fix: full screen table 2025-10-02 10:39:36 -05:00
TrèsAbhi 9b97d3e27d feat: guesser flag icons 2025-10-02 10:29:43 -05:00
TrèsAbhi aadc252e47 fix: use new quicklime controls enabled 2025-10-02 10:19:50 -05:00
TrèsAbhi 320a764d45 feat: migrate all 2025-10-02 10:15:38 -05:00
TrèsAbhi 5594c0ec3b feat: some progress 2025-10-01 22:45:21 -05:00
TrèsAbhi 3d69d464f5 feat: start on amending slugs 2025-10-01 22:41:23 -05:00
TrèsAbhi dd0b2bade7 feat: named slugs 2025-10-01 22:41:15 -05:00
TrèsAbhi 99c90cfa9e Merge branch 'dev' of https://github.com/blitzkit/blitzkit into dev 2025-10-01 22:24:10 -05:00
TrèsAbhi dd3ce21508 feat: gun rotation 2025-10-01 22:24:08 -05:00
TrèsAbhi b512cb2292 Update README.md 2025-09-30 20:22:06 -05:00
TrèsAbhi 907e71ce03 feat: turret rotation 2025-09-30 16:48:37 -05:00
TrèsAbhi 10942879a6 feat: start of rotation 2025-09-30 16:34:08 -05:00
TrèsAbhi d60551d30a fix: change blitzkit icons to big icons 2025-09-29 13:41:52 -05:00
TrèsAbhi b8c8528e1c Merge branch 'main' into dev 2025-09-29 13:39:13 -05:00
TrèsAbhi e9b7059cc0 feat: some linking 2025-09-29 13:30:10 -05:00
TrèsAbhi e5f7d72df3 feat: rearrange 2025-09-28 14:11:33 -05:00
TrèsAbhi 57092d8df0 feat: env vars 2025-09-28 14:10:34 -05:00
TrèsAbhi 86508d5413 feat: submodules and packages 2025-09-28 13:44:15 -05:00
102 changed files with 7968 additions and 2858 deletions

No files matched your search

+25 -1
View File
@@ -28,4 +28,28 @@ target
.vercel
/src
/packages/bot/src/prisma
dev-dist
dev-dist
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
+1
View File
@@ -86,6 +86,7 @@
"Fullscreen",
"fullstats",
"fuzzysort",
"gamemode",
"gameplay",
"glsl",
"GLTF",
+43 -7
View File
@@ -1,13 +1,49 @@
## BlitzKit
# BlitzKit
Your premier source for all things Blitz.
Tools for everything and anything, World of Tanks Blitz.
### https://blitzkit.app/
This GitHub repository contains the code for BlitzKit and all its services. If you are here, looking to use BlitzKit, go to https://blitzkit.app/.
![BlitzKit website](https://i.imgur.com/KaxUxmt.png)
If you intend to contribute to the code, note that you may need to check out sensitive, closed-source submodules to locally develop certain aspects of BlitzKit. Communicate with `@tresabhi` on Discord to get started or discuss sensitive content, such as environment variables or submodules.
## Invite the bot
## Packages
Go to [application directory for BlitzKit](https://discord.com/application-directory/1097673957865443370) and click "Add to Server." Voila! You're ready to go.
| Package | Title | Source | Memo |
| ------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| [packages/app](packages/app) | BlitzKit | [Play Store](https://play.google.com/store/apps/details?id=com.tresabhi.blitzkit), [App Store](https://apps.apple.com/app/4321), [Microsoft Store](https://apps.microsoft.com/detail/zyxw) | The native app of BlitzKit for all platforms. Unavailable from stores at this time. |
| [packages/bot](packages/bot) | BlitzKit Discord Bot | [Discord Application Directory](https://discord.com/discovery/applications/1097673957865443370) | The one-in-all Discord bot for statistics. |
| [packages/core](packages/core) | | | Mutual internal code shared between all other packages. |
| [packages/i18n](packages/i18n) | | [Crowdin](https://crowdin.com/project/blitzkrieg) | Translations served as JSON shared across all other packages, including some utility code. |
| [packages/scripts](packages/scripts) | | | CLI utilities for the development and deployment of BlitzKit services. |
| [packages/varuna](packages/varuna) | Varuna | [NPM](https://www.npmjs.com/package/varuna) | React and Astro-oriented state management library, awaiting separation from BlitzKit. Unavailable from NPM at this time. |
| [packages/website](packages/website) | BlitzKit | https://blitzkit.app | The BlitzKit website provides a wide range of tools, APIs, and interconnects all other services. |
![BlitzKit application directory](https://i.imgur.com/YWCtOuJ.png)
## Submodules
| Submodule | Title | Source | Memo |
| ------------------------------------------------------------ | ----------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [submodules/blitzkit-closed](submodules/blitzkit-closed) | ClosedKit | [blitzkit/closed](https://github.com/blitzkit/closed) | Closed source, sensitive code hidden from the public to prevent bad actors from abusing the game. Discuss with `@tresabhi` on Discord for **special permission** to access. |
| [submodules/blitzkit-internal](submodules/blitzkit-internal) | InternalKit | [blitzkit/internal](https://github.com/blitzkit/internal) | Closed source, sensitive internal documentation hidden from the public to prevent bad actors from abusing the game. Access to this submodule is **not negotiable**. |
| [submodules/CUE4Parse](submodules/CUE4Parse) | CUE4Parse | [FabianFG/CUE4Parse](https://github.com/FabianFG/CUE4Parse) | An Unreal Engine archives and packages parsing library in C#. |
## Environment Variables
| Name | Source | BlitzKit Default | Memo |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `PUBLIC_WARGAMING_APPLICATION_ID` | [Wargaming Developer's Room](https://developers.wargaming.net/) | | Application ID needed to communicate with Wargaming APIs. |
| `PUBLIC_PROMOTE_OPENTEST` | | `false` | Optional boolean dictating whether the website advertises [the opentest subdomain of BlitzKit](https://opentest.blitzkit.app/). |
| `ALLOW_ROBOTS` | | `true` | Toggles between `Allow: /` and `Disallow: /` in the website's `/robots.txt`. This is usually `false` for all BlitzKit's subdomains. |
| `WOTB_GLOSSARY`, `WOTB_GLOSSARY_DOMAIN`, `WOTB_GLOSSARY_PATH` | | | |
| `PUBLIC_GOOGLE_TAG_MANAGER_ID` | [Google Tag Manager](https://tagmanager.google.com/) | `G-GL2JVHCGPQ` | Google Tag Manager's unique identifier for analytical purposes. |
| `PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID` | [Google Analytics](https://analytics.google.com/) | `430711767` | Google Analytics' unique property ID for [BlitzKit's apex domain](https://blitzkit.app/) and subdomains. |
| `GOOGLE_APPLICATION_CREDENTIALS` | [Google Cloud](https://cloud.google.com/) | | Google Cloud's API key, primarily used for ranking popular tanks and finding relevant tank review videos in Tankopedia. |
| `PUBLIC_DISCORD_SERVER_ID` | [BlitzKit Discord Server](https://discord.gg/nDt7AjGJQH) | `734786591205359697` | BlitzKit Discord Server's id. |
| `PUBLIC_ASSET_BASE` | [blitzkit/assets](https://github.com/blitzkit/assets) | `https://blitzkit.github.io/assets` | The root domain and path that serves the external assets like tank models and icons. |
| `PUBLIC_BRANCH` | | `main` | The branch that the website is operating on. This is completely nominal. |
| `PUBLIC_GUIDE_WEBSITE` | [GuidesBlitz](https://guidesblitz.com/) | `https://guidesblitz.com` | The website that serves the encyclopedia-like content in BlitzKit. |
| `SERVICING` | | `false` | Wether the website is down for servicing. |
| `DISCORD_CLIENT_ID` | [Discord Developer Portal](https://discord.com/developers/applications) | `1097673957865443370` | The BlitzKit Discord Bot's user ID. |
| `GH_TOKEN` | [GitHub Fine-Grained Tokens](https://github.com/settings/personal-access-tokens) | | The GitHub API key used for checking out private submodules and pushing content to the asset repository. |
| `DISCORD_TOKEN` | [Discord Developer Portal](https://discord.com/developers/applications) | | The Discord API Key for the BlitzKit Discord Bot. |
| `DATABASE_URL` | [CockroachDB](https://www.cockroachlabs.com/) | | The CockroachDB-SQL database URL used to link Wargaming and Discord users. |
| `WOTB_DLC_CDN` | | | |
+44 -4
View File
@@ -108,6 +108,7 @@
"name": "@blitzkit/website",
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/node": "^9.4.4",
"@astrojs/react": "^4.4.0",
"@astrolib/seo": "^1.0.0-beta.8",
"@fontsource/inter": "^5.2.8",
@@ -118,6 +119,7 @@
"@react-three/fiber": "^9.3.0",
"@types/react": "^19.1.14",
"@types/react-dom": "^19.1.9",
"@types/three": "^0.180.0",
"@vite-pwa/astro": "^1.1.0",
"astro": "^5.14.1",
"astro-favicons": "^3.1.5",
@@ -129,6 +131,8 @@
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-promise-suspense": "^0.3.4",
"three": "^0.180.0",
"three-stdlib": "^2.36.0",
"typescript": "^5.9.2",
"urlon": "^3.1.0",
},
@@ -147,6 +151,8 @@
"@astrojs/markdown-remark": ["@astrojs/[email protected]", "", { "dependencies": { "@astrojs/internal-helpers": "0.7.3", "@astrojs/prism": "3.3.0", "github-slugger": "^2.0.0", "hast-util-from-html": "^2.0.3", "hast-util-to-text": "^4.0.2", "import-meta-resolve": "^4.2.0", "js-yaml": "^4.1.0", "mdast-util-definitions": "^6.0.0", "rehype-raw": "^7.0.0", "rehype-stringify": "^10.0.1", "remark-gfm": "^4.0.1", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "remark-smartypants": "^3.0.2", "shiki": "^3.12.2", "smol-toml": "^1.4.2", "unified": "^11.0.5", "unist-util-remove-position": "^5.0.0", "unist-util-visit": "^5.0.0", "unist-util-visit-parents": "^6.0.1", "vfile": "^6.0.3" } }, "sha512-KXGdq6/BC18doBCYXp08alHlWChH0hdD2B1qv9wIyOHbvwI5K6I7FhSta8dq1hBQNdun8YkKPR013D/Hm8xd0g=="],
"@astrojs/node": ["@astrojs/[email protected]", "", { "dependencies": { "@astrojs/internal-helpers": "0.7.3", "send": "^1.2.0", "server-destroy": "^1.0.1" }, "peerDependencies": { "astro": "^5.7.0" } }, "sha512-zQelZmeejnpw3Y5cj2gCyAZ6HT7tjgsWLZH8k40s3bTaT6lqJXlPtKJeIsuEcod21vZLODqBEQeu0CWrWm01EQ=="],
"@astrojs/prism": ["@astrojs/[email protected]", "", { "dependencies": { "prismjs": "^1.30.0" } }, "sha512-q8VwfU/fDZNoDOf+r7jUnMC2//H2l0TuQ6FkGJL8vD8nw/q5KiL3DS1KKBI3QhI9UQhpJ5dc7AtqfbXWuOgLCQ=="],
"@astrojs/react": ["@astrojs/[email protected]", "", { "dependencies": { "@vitejs/plugin-react": "^4.7.0", "ultrahtml": "^1.6.0", "vite": "^6.3.6" }, "peerDependencies": { "@types/react": "^17.0.50 || ^18.0.21 || ^19.0.0", "@types/react-dom": "^17.0.17 || ^18.0.6 || ^19.0.0", "react": "^17.0.2 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0" } }, "sha512-RzblkVImAFdV1C0AWsSWzS70Z0FMtW2p0XXkNYu3QePfyVJta3JIy8m8jY8271etaCZtpFjsE2UaiHGZIBm6nw=="],
@@ -1385,6 +1391,8 @@
"degenerator": ["[email protected]", "", { "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", "esprima": "^4.0.1" } }, "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ=="],
"depd": ["[email protected]", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="],
"dequal": ["[email protected]", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="],
"destr": ["[email protected]", "", {}, "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA=="],
@@ -1433,6 +1441,8 @@
"ecdsa-sig-formatter": ["[email protected]", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ=="],
"ee-first": ["[email protected]", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="],
"effect": ["[email protected]", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "fast-check": "^3.23.1" } }, "sha512-N39iBk0K71F9nb442TLbTkjl24FLUzuvx2i1I2RsEAQsdAdUTuUoW0vlfUXgkMTUOnYqKnWcFfqw4hK4Pw27hg=="],
"ejs": ["[email protected]", "", { "dependencies": { "jake": "^10.8.5" }, "bin": { "ejs": "bin/cli.js" } }, "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA=="],
@@ -1447,6 +1457,8 @@
"empathic": ["[email protected]", "", {}, "sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA=="],
"encodeurl": ["[email protected]", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="],
"encoding-sniffer": ["[email protected]", "", { "dependencies": { "iconv-lite": "^0.6.3", "whatwg-encoding": "^3.1.1" } }, "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw=="],
"end-of-stream": ["[email protected]", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="],
@@ -1491,6 +1503,8 @@
"esutils": ["[email protected]", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="],
"etag": ["[email protected]", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="],
"eventemitter3": ["[email protected]", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="],
"events": ["[email protected]", "", {}, "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="],
@@ -1529,7 +1543,7 @@
"fetch-blob": ["[email protected]", "", { "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" } }, "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ=="],
"fflate": ["fflate@0.7.4", "", {}, "sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw=="],
"fflate": ["fflate@0.8.2", "", {}, "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A=="],
"file-type": ["[email protected]", "", {}, "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ=="],
@@ -1551,6 +1565,8 @@
"formdata-polyfill": ["[email protected]", "", { "dependencies": { "fetch-blob": "^3.1.2" } }, "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g=="],
"fresh": ["[email protected]", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="],
"fs-constants": ["[email protected]", "", {}, "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="],
"fs-extra": ["[email protected]", "", { "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ=="],
@@ -1669,6 +1685,8 @@
"http-cache-semantics": ["[email protected]", "", {}, "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="],
"http-errors": ["[email protected]", "", { "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", "statuses": "2.0.1", "toidentifier": "1.0.1" } }, "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ=="],
"http-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
"https-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
@@ -1967,6 +1985,10 @@
"micromatch": ["[email protected]", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="],
"mime-db": ["[email protected]", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="],
"mime-types": ["[email protected]", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA=="],
"minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
"mitt": ["[email protected]", "", {}, "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="],
@@ -2025,6 +2047,8 @@
"ohash": ["[email protected]", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="],
"on-finished": ["[email protected]", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="],
"once": ["[email protected]", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
"oniguruma-parser": ["[email protected]", "", {}, "sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w=="],
@@ -2159,6 +2183,8 @@
"randombytes": ["[email protected]", "", { "dependencies": { "safe-buffer": "^5.1.0" } }, "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ=="],
"range-parser": ["[email protected]", "", {}, "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="],
"rc9": ["[email protected]", "", { "dependencies": { "defu": "^6.1.4", "destr": "^2.0.3" } }, "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg=="],
"react": ["[email protected]", "", {}, "sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ=="],
@@ -2279,14 +2305,20 @@
"semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
"send": ["[email protected]", "", { "dependencies": { "debug": "^4.3.5", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", "http-errors": "^2.0.0", "mime-types": "^3.0.1", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "statuses": "^2.0.1" } }, "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw=="],
"serialize-javascript": ["[email protected]", "", { "dependencies": { "randombytes": "^2.1.0" } }, "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g=="],
"server-destroy": ["[email protected]", "", {}, "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ=="],
"set-function-length": ["[email protected]", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2" } }, "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg=="],
"set-function-name": ["[email protected]", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", "has-property-descriptors": "^1.0.2" } }, "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ=="],
"set-proto": ["[email protected]", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0" } }, "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw=="],
"setprototypeof": ["[email protected]", "", {}, "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="],
"sha.js": ["[email protected]", "", { "dependencies": { "inherits": "^2.0.4", "safe-buffer": "^5.2.1", "to-buffer": "^1.2.0" }, "bin": { "sha.js": "bin.js" } }, "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w=="],
"shallow-clone": ["[email protected]", "", { "dependencies": { "kind-of": "^6.0.2" } }, "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA=="],
@@ -2337,6 +2369,8 @@
"stats.js": ["[email protected]", "", {}, "sha512-hNKz8phvYLPEcRkeG1rsGmV5ChMjKDAWU7/OJJdDErPBNChQXxCo3WZurGpnWc6gZhAzEPFad1aVgyOANH1sMw=="],
"statuses": ["[email protected]", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="],
"stop-iteration-iterator": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0", "internal-slot": "^1.1.0" } }, "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ=="],
"streamx": ["[email protected]", "", { "dependencies": { "events-universal": "^1.0.0", "fast-fifo": "^1.3.2", "text-decoder": "^1.1.0" } }, "sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg=="],
@@ -2383,7 +2417,7 @@
"text-decoder": ["[email protected]", "", { "dependencies": { "b4a": "^1.6.4" } }, "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA=="],
"three": ["[email protected]70.0", "", {}, "sha512-FQK+LEpYc0fBD+J8g6oSEyyNzjp+Q7Ks1C568WWaoMRLW+TkNNWmenWeGgJjV105Gd+p/2ql1ZcjYvNiPZBhuQ=="],
"three": ["[email protected]80.0", "", {}, "sha512-o+qycAMZrh+TsE01GqWUxUIKR1AL0S8pq7zDkYOQw8GqfX8b8VoCKYUoHbhiX5j+7hr8XsuHDVU6+gkQJQKg9w=="],
"three-mesh-bvh": ["[email protected]", "", { "peerDependencies": { "three": ">= 0.159.0" } }, "sha512-4G5lBaF+g2auKX3P0yqx+MJC6oVt6sB5k+CchS6Ob0qvH0YIhuUk1eYr7ktsIpY+albCqE80/FVQGV190PmiAg=="],
@@ -2401,6 +2435,8 @@
"to-regex-range": ["[email protected]", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],
"toidentifier": ["[email protected]", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="],
"tr46": ["[email protected]", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA=="],
"trim-lines": ["[email protected]", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="],
@@ -2725,9 +2761,9 @@
"@rollup/pluginutils/estree-walker": ["[email protected]", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="],
"@surma/rollup-plugin-off-main-thread/magic-string": ["[email protected]", "", { "dependencies": { "sourcemap-codec": "^1.4.8" } }, "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ=="],
"@shuding/opentype.js/fflate": ["[email protected]", "", {}, "sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw=="],
"@types/three/fflate": ["[email protected]", "", {}, "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A=="],
"@surma/rollup-plugin-off-main-thread/magic-string": ["[email protected]", "", { "dependencies": { "sourcemap-codec": "^1.4.8" } }, "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ=="],
"anymatch/picomatch": ["[email protected]", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
@@ -2763,6 +2799,8 @@
"htmlparser2/entities": ["[email protected]", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="],
"http-errors/statuses": ["[email protected]", "", {}, "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="],
"its-fine/@types/react-reconciler": ["@types/[email protected]", "", { "peerDependencies": { "@types/react": "*" } }, "sha512-HHM3nxyUZ3zAylX8ZEyrDNd2XZOnQ0D5XfunJF5FLQnZbHHYq4UWvW1QfelQNXv1ICNkwYhfxjwfnqivYB6bFg=="],
"linebreak/base64-js": ["[email protected]", "", {}, "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw=="],
@@ -2797,6 +2835,8 @@
"simple-swizzle/is-arrayish": ["[email protected]", "", {}, "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA=="],
"stats-gl/three": ["[email protected]", "", {}, "sha512-FQK+LEpYc0fBD+J8g6oSEyyNzjp+Q7Ks1C568WWaoMRLW+TkNNWmenWeGgJjV105Gd+p/2ql1ZcjYvNiPZBhuQ=="],
"string_decoder/safe-buffer": ["[email protected]", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="],
"tar-fs/tar-stream": ["[email protected]", "", { "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", "streamx": "^2.15.0" } }, "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ=="],
+18
View File
@@ -0,0 +1,18 @@
# BlitzKit 1.28.3
## Features
- Turrets and guns can now be rotated in Mixer without any pitch or yaw limits
- Added nation icons to the search results for Guesser
- The table now occupies the whole screen in Compare
- Added the ability to log in with a Wargaming account in the navbar
- Added owned/unowned filters in the Tankopedia filters
- Revamped Tankopedia quick controls to be more accessible and obvious
## Fixes
- Missing tank icons across the website have been fixed
- Events of starting and stopping of the transform tanks now use an asynchronous event instead of a reactive state, making them faster
- Removed a hook call on root context, speeding up load times
- Tankopedia's pitch input now follows the same sign convention as the pitch and yaw visualizer
- Shadows are no longer disabled when the scene is unloaded when the user scrolls away from the canvas
+2 -1
View File
@@ -1,7 +1,7 @@
{
"name": "blitzkit",
"private": true,
"version": "1.28.2",
"version": "1.28.3",
"description": "🎉 Tools for everything World of Tanks Blitz",
"type": "module",
"types": "./types.d.ts",
@@ -18,6 +18,7 @@
"build:docs": "vitepress build docs",
"build:proxyclient": "cd packages/scripts && bun run build:proxyclient",
"build:ratingleaderboard": "cd packages/scripts && bun run build:ratingleaderboard",
"build:app": "cd packages/app && bun run build",
"dev:bot": "bun run build:bot --dev && bun start:bot",
"start:bot": "bun dist/bot/main.js",
"dev:docs": "vitepress dev docs",
-24
View File
@@ -1,24 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
-7
View File
@@ -1,7 +0,0 @@
# Tauri + Vanilla TS
This template should help get you started developing with Tauri in vanilla HTML, CSS and Typescript.
## Recommended IDE Setup
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
-43
View File
@@ -1,43 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="/src/styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri App</title>
<script type="module" src="/src/main.ts" defer></script>
</head>
<body>
<main class="container">
<h1>Welcome to Tauri</h1>
<div class="row">
<a href="https://vite.dev" target="_blank">
<img src="/src/assets/vite.svg" class="logo vite" alt="Vite logo" />
</a>
<a href="https://tauri.app" target="_blank">
<img
src="/src/assets/tauri.svg"
class="logo tauri"
alt="Tauri logo"
/>
</a>
<a href="https://www.typescriptlang.org/docs" target="_blank">
<img
src="/src/assets/typescript.svg"
class="logo typescript"
alt="typescript logo"
/>
</a>
</div>
<p>Click on the Tauri logo to learn more about the framework</p>
<form class="row" id="greet-form">
<input id="greet-input" placeholder="Enter a name..." />
<button type="submit">Greet</button>
</form>
<p id="greet-msg"></p>
</main>
</body>
</html>
+5286
View File
File diff suppressed because it is too large. Load diff
+23 -2
View File
@@ -1,6 +1,27 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use std::process::{Command, Stdio};
use tauri::Manager;
fn main() {
blitzkit_lib::run()
tauri::Builder::default()
.setup(|app| {
let app_handle = app.handle();
let entry = app_handle
.path_resolver()
.resolve_resource("../../dist/website/server/entry.mjs")
.expect("failed to resolve server.ts");
Command::new("bun")
.arg("run")
.arg(entry)
.stderr(Stdio::null())
.spawn()
.expect("failed to start Bun server");
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running Tauri app");
}
+9 -7
View File
@@ -4,18 +4,20 @@
"version": "0.1.0",
"identifier": "com.tresabhi.blitzkit",
"build": {
"beforeDevCommand": "bun run dev",
"devUrl": "http://localhost:1420",
"beforeBuildCommand": "bun run build",
"frontendDist": "../dist"
"beforeDevCommand": "cd ../website && bun run dev",
"_beforeBuildCommand": "cd ../website && bun run build",
"frontendDist": "../../../dist/website/client",
"devUrl": "http://localhost:4321"
},
"app": {
"withGlobalTauri": true,
"windows": [
{
"title": "blitzkit",
"width": 800,
"height": 600
"url": "http://localhost:4321",
"title": "BlitzKit",
"fullscreen": false,
"resizable": true,
"maximized": true
}
],
"security": {
-6
View File
@@ -1,6 +0,0 @@
<svg width="206" height="231" viewBox="0 0 206 231" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M143.143 84C143.143 96.1503 133.293 106 121.143 106C108.992 106 99.1426 96.1503 99.1426 84C99.1426 71.8497 108.992 62 121.143 62C133.293 62 143.143 71.8497 143.143 84Z" fill="#FFC131"/>
<ellipse cx="84.1426" cy="147" rx="22" ry="22" transform="rotate(180 84.1426 147)" fill="#24C8DB"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M166.738 154.548C157.86 160.286 148.023 164.269 137.757 166.341C139.858 160.282 141 153.774 141 147C141 144.543 140.85 142.121 140.558 139.743C144.975 138.204 149.215 136.139 153.183 133.575C162.73 127.404 170.292 118.608 174.961 108.244C179.63 97.8797 181.207 86.3876 179.502 75.1487C177.798 63.9098 172.884 53.4021 165.352 44.8883C157.82 36.3744 147.99 30.2165 137.042 27.1546C126.095 24.0926 114.496 24.2568 103.64 27.6274C92.7839 30.998 83.1319 37.4317 75.8437 46.1553C74.9102 47.2727 74.0206 48.4216 73.176 49.5993C61.9292 50.8488 51.0363 54.0318 40.9629 58.9556C44.2417 48.4586 49.5653 38.6591 56.679 30.1442C67.0505 17.7298 80.7861 8.57426 96.2354 3.77762C111.685 -1.01901 128.19 -1.25267 143.769 3.10474C159.348 7.46215 173.337 16.2252 184.056 28.3411C194.775 40.457 201.767 55.4101 204.193 71.404C206.619 87.3978 204.374 103.752 197.73 118.501C191.086 133.25 180.324 145.767 166.738 154.548ZM41.9631 74.275L62.5557 76.8042C63.0459 72.813 63.9401 68.9018 65.2138 65.1274C57.0465 67.0016 49.2088 70.087 41.9631 74.275Z" fill="#FFC131"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.4045 76.4519C47.3493 70.6709 57.2677 66.6712 67.6171 64.6132C65.2774 70.9669 64 77.8343 64 85.0001C64 87.1434 64.1143 89.26 64.3371 91.3442C60.0093 92.8732 55.8533 94.9092 51.9599 97.4256C42.4128 103.596 34.8505 112.392 30.1816 122.756C25.5126 133.12 23.9357 144.612 25.6403 155.851C27.3449 167.09 32.2584 177.598 39.7906 186.112C47.3227 194.626 57.153 200.784 68.1003 203.846C79.0476 206.907 90.6462 206.743 101.502 203.373C112.359 200.002 122.011 193.568 129.299 184.845C130.237 183.722 131.131 182.567 131.979 181.383C143.235 180.114 154.132 176.91 164.205 171.962C160.929 182.49 155.596 192.319 148.464 200.856C138.092 213.27 124.357 222.426 108.907 227.222C93.458 232.019 76.9524 232.253 61.3736 227.895C45.7948 223.538 31.8055 214.775 21.0867 202.659C10.3679 190.543 3.37557 175.59 0.949823 159.596C-1.47592 143.602 0.768139 127.248 7.41237 112.499C14.0566 97.7497 24.8183 85.2327 38.4045 76.4519ZM163.062 156.711L163.062 156.711C162.954 156.773 162.846 156.835 162.738 156.897C162.846 156.835 162.954 156.773 163.062 156.711Z" fill="#24C8DB"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

-25
View File
@@ -1,25 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
fill="#2D79C7" stroke="none">
<path d="M430 5109 c-130 -19 -248 -88 -325 -191 -53 -71 -83 -147 -96 -247
-6 -49 -9 -813 -7 -2166 l3 -2090 22 -65 c54 -159 170 -273 328 -323 l70 -22
2140 0 2140 0 66 23 c160 55 272 169 322 327 l22 70 0 2135 0 2135 -22 70
c-49 157 -155 265 -319 327 l-59 23 -2115 1 c-1163 1 -2140 -2 -2170 -7z
m3931 -2383 c48 -9 120 -26 160 -39 l74 -23 3 -237 c1 -130 0 -237 -2 -237 -3
0 -26 14 -53 30 -61 38 -197 84 -310 106 -110 20 -293 15 -368 -12 -111 -39
-175 -110 -175 -193 0 -110 97 -197 335 -300 140 -61 309 -146 375 -189 30
-20 87 -68 126 -107 119 -117 164 -234 164 -426 0 -310 -145 -518 -430 -613
-131 -43 -248 -59 -445 -60 -243 -1 -405 24 -577 90 l-68 26 0 242 c0 175 -3
245 -12 254 -9 9 -9 12 0 12 7 0 12 -4 12 -9 0 -17 139 -102 223 -138 136 -57
233 -77 382 -76 145 0 224 19 295 68 75 52 100 156 59 242 -41 84 -135 148
-374 253 -367 161 -522 300 -581 520 -23 86 -23 253 -1 337 73 275 312 448
682 492 109 13 401 6 506 -13z m-1391 -241 l0 -205 -320 0 -320 0 0 -915 0
-915 -255 0 -255 0 0 915 0 915 -320 0 -320 0 0 205 0 205 895 0 895 0 0 -205z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

-22
View File
@@ -1,22 +0,0 @@
import { invoke } from "@tauri-apps/api/core";
let greetInputEl: HTMLInputElement | null;
let greetMsgEl: HTMLElement | null;
async function greet() {
if (greetMsgEl && greetInputEl) {
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
greetMsgEl.textContent = await invoke("greet", {
name: greetInputEl.value,
});
}
}
window.addEventListener("DOMContentLoaded", () => {
greetInputEl = document.querySelector("#greet-input");
greetMsgEl = document.querySelector("#greet-msg");
document.querySelector("#greet-form")?.addEventListener("submit", (e) => {
e.preventDefault();
greet();
});
});
-116
View File
@@ -1,116 +0,0 @@
.logo.vite:hover {
filter: drop-shadow(0 0 2em #747bff);
}
.logo.typescript:hover {
filter: drop-shadow(0 0 2em #2d79c7);
}
:root {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
font-weight: 400;
color: #0f0f0f;
background-color: #f6f6f6;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
.container {
margin: 0;
padding-top: 10vh;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
}
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: 0.75s;
}
.logo.tauri:hover {
filter: drop-shadow(0 0 2em #24c8db);
}
.row {
display: flex;
justify-content: center;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
h1 {
text-align: center;
}
input,
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
color: #0f0f0f;
background-color: #ffffff;
transition: border-color 0.25s;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
}
button {
cursor: pointer;
}
button:hover {
border-color: #396cd8;
}
button:active {
border-color: #396cd8;
background-color: #e8e8e8;
}
input,
button {
outline: none;
}
#greet-input {
margin-right: 5px;
}
@media (prefers-color-scheme: dark) {
:root {
color: #f6f6f6;
background-color: #2f2f2f;
}
a:hover {
color: #24c8db;
}
input,
button {
color: #ffffff;
background-color: #0f0f0f98;
}
button:active {
background-color: #0f0f0f69;
}
}
+1 -2
View File
@@ -15,6 +15,5 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"]
}
}
-30
View File
@@ -1,30 +0,0 @@
import { defineConfig } from "vite";
// @ts-expect-error process is a nodejs global
const host = process.env.TAURI_DEV_HOST;
// https://vite.dev/config/
export default defineConfig(async () => ({
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//
// 1. prevent Vite from obscuring rust errors
clearScreen: false,
// 2. tauri expects a fixed port, fail if that port is not available
server: {
port: 1420,
strictPort: true,
host: host || false,
hmr: host
? {
protocol: "ws",
host,
port: 1421,
}
: undefined,
watch: {
// 3. tell Vite to ignore watching `src-tauri`
ignored: ["**/src-tauri/**"],
},
},
}));
-144
View File
@@ -1,144 +0,0 @@
import {
BlitzTankClass,
Region,
regionToRegionSubdomain,
} from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { tankDefinitions } from '../core/blitzkit/nonBlockingPromises';
import { chunkLines } from '../core/discord/chunkLines';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
type Auction = null | {
count: number;
has_next: boolean;
results: Result[];
};
type Result =
| {
id?: number;
type: 'vehicle';
countable?: boolean;
entity?: Entity;
initial_count: number;
current_count: number;
saleable?: boolean;
available_from?: Date;
available_before?: Date;
price?: Price;
next_price: Price | null;
available: true;
display?: boolean;
next_price_datetime: Date;
next_price_timestamp: number;
}
| {
available: false;
type: 'vehicle';
};
interface Entity {
id: number;
name: string;
nation: string;
subnation: string;
use_subnation_flag: boolean;
type_slug: BlitzTankClass;
level: number;
roman_level: string;
user_string: string;
image_url: string;
preview_image_url: string;
is_premium: boolean;
is_collectible: boolean;
}
interface Price {
currency: Currency;
value: number;
}
interface Currency {
name: 'gold';
count: number;
title: 'Gold';
image_url: string;
sizes: unknown;
type: 'currency';
}
const WARNING_COUNT = 500;
export const auctionCommand = new Promise<CommandRegistry>((resolve) => {
resolve({
command: createLocalizedCommand('auction'),
async handler(interaction) {
const { strings } = translator(interaction.locale);
const awaitedTankDefinitions = await tankDefinitions;
const region: Region = 'com';
const pageSize = 80;
const saleable = true;
const data = await fetch(
`https://${regionToRegionSubdomain(
region,
)}.wotblitz.com/en/api/events/items/auction/?page_size=${
pageSize
}&type[]=vehicle&saleable=${saleable}`,
).then((response) => response.json() as Promise<Auction>);
if (data === null) {
return strings.bot.commands.auction.errors.no_auction;
}
const saleableTanks = data.results.filter((result) => result.available);
const nextPricesTimestamp = saleableTanks[0].next_price_timestamp;
const title = `# ${strings.bot.commands.auction.body.title}`;
const subtitle = `${literals(strings.bot.commands.auction.body.subtitle, [
`${saleableTanks.length} / ${data.results.length}`,
`<t:${nextPricesTimestamp}:R>`,
'<https://wotblitz.com/auction/>',
])}`;
const body = saleableTanks.map((data, index) => {
const tank = awaitedTankDefinitions.tanks[data.entity!.id];
if (!tank) return '';
const name = `[${tank.name}](<https://blitzkit.app/tanks/${
tank.slug
}>)`;
const next =
data.next_price === null
? ''
: `\n-# ${literals(strings.bot.commands.auction.body.next, [
`<:gold:1317173197082333244> ${data.next_price.value.toLocaleString(
interaction.locale,
)}`,
])}`;
const available = literals(
strings.bot.commands.auction.body.available,
[
data.current_count.toLocaleString(interaction.locale),
data.initial_count.toLocaleString(interaction.locale),
],
);
const isOut = data.current_count === 0;
const outString = isOut ? '~~' : '';
const isLow = data.current_count <= WARNING_COUNT;
return `${index + 1}. ${
outString
}${name} <:gold:1317173197082333244> ${data.price!.value.toLocaleString(
interaction.locale,
)}${outString}\n-#${isLow ? ' ‼️ ' : ' '}${available}${isOut ? '' : next}`;
});
const header = `${title}\n${subtitle}`;
const lines = [header, ...body];
return chunkLines(lines, '\n\n');
},
});
});
@@ -193,9 +193,9 @@ export async function renderBreakdown(
title={
tankDefinition
? unwrap(tankDefinition.name)
: literals(strings.bot.commands.breakdown.body.unknown_tank, [
`${id}`,
])
: literals(strings.bot.commands.breakdown.body.unknown_tank, {
id,
})
}
stats={[
{
+28 -28
View File
@@ -1,44 +1,44 @@
import { getAccountInfo, getClanInfo } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { Locale } from 'discord.js';
import { CommandWrapper } from '../components/CommandWrapper';
import { GenericStats } from '../components/GenericStats';
import { NoData } from '../components/NoData';
import { TitleBar } from '../components/TitleBar';
import { addClanChoices } from '../core/discord/addClanChoices';
import { autocompleteClan } from '../core/discord/autocompleteClan';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { localizationObject } from '../core/discord/localizationObject';
import { resolveClanFromCommand } from '../core/discord/resolveClanFromCommand';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
import { getAccountInfo, getClanInfo } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { Locale } from "discord.js";
import { CommandWrapper } from "../components/CommandWrapper";
import { GenericStats } from "../components/GenericStats";
import { NoData } from "../components/NoData";
import { TitleBar } from "../components/TitleBar";
import { addClanChoices } from "../core/discord/addClanChoices";
import { autocompleteClan } from "../core/discord/autocompleteClan";
import { createLocalizedCommand } from "../core/discord/createLocalizedCommand";
import { localizationObject } from "../core/discord/localizationObject";
import { resolveClanFromCommand } from "../core/discord/resolveClanFromCommand";
import { translator } from "../core/localization/translator";
import { CommandRegistry } from "../events/interactionCreate";
const DEFAULT_THRESHOLD = 7;
export const inactiveCommand = new Promise<CommandRegistry>((resolve) => {
resolve({
command: createLocalizedCommand('inactive')
command: createLocalizedCommand("inactive")
.addStringOption(addClanChoices)
.addNumberOption((option) => {
const { strings } = translator(Locale.EnglishUS);
return option
.setName('threshold')
.setName("threshold")
.setNameLocalizations(
localizationObject(
(strings) => strings.bot.commands.inactive.options.threshold.name,
undefined,
true,
),
true
)
)
.setDescription(
strings.bot.commands.inactive.options.threshold.description,
strings.bot.commands.inactive.options.threshold.description
)
.setDescriptionLocalizations(
localizationObject(
(strings) =>
strings.bot.commands.inactive.options.threshold.description,
),
strings.bot.commands.inactive.options.threshold.description
)
)
.setMinValue(0);
}),
@@ -47,7 +47,7 @@ export const inactiveCommand = new Promise<CommandRegistry>((resolve) => {
const { strings } = translator(interaction.locale);
const { region, id } = await resolveClanFromCommand(interaction);
const threshold =
interaction.options.getNumber('threshold')! ?? DEFAULT_THRESHOLD;
interaction.options.getNumber("threshold")! ?? DEFAULT_THRESHOLD;
const time = new Date().getTime() / 1000;
const clanInfo = await getClanInfo(region, id);
const accountInfo = await getAccountInfo(region, clanInfo.members_ids);
@@ -57,7 +57,7 @@ export const inactiveCommand = new Promise<CommandRegistry>((resolve) => {
[
account.nickname,
(time - account.last_battle_time) / 60 / 60 / 24,
] as [string, number],
] as [string, number]
)
.filter(([, inactiveDays]) => inactiveDays >= threshold)
.sort((a, b) => b[1] - a[1])
@@ -65,10 +65,10 @@ export const inactiveCommand = new Promise<CommandRegistry>((resolve) => {
([name, days]) =>
[
name,
literals(strings.bot.commands.inactive.body.listing, [
days.toFixed(0),
]),
] as [string, string],
literals(strings.bot.commands.inactive.body.listing, {
days: days.toFixed(0),
}),
] as [string, string]
);
const hasInactiveMembers = inactive.length > 0;
@@ -79,7 +79,7 @@ export const inactiveCommand = new Promise<CommandRegistry>((resolve) => {
image={`https://wotblitz-gc.gcdn.co/icons/clanEmblems1x/clan-icon-v2-${clanInfo.emblem_set_id}.png`}
description={`${literals(
strings.bot.commands.inactive.body.subtitle,
[`${threshold}`],
{ days: threshold }
)} • ${new Date().toLocaleDateString(interaction.locale)}`}
/>
+22 -22
View File
@@ -5,31 +5,31 @@ import {
flags,
getAccountInfo,
getTankStats,
} from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import markdownEscape from 'markdown-escape';
} from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import markdownEscape from "markdown-escape";
import {
gameDefinitions,
tankDefinitions,
} from '../core/blitzkit/nonBlockingPromises';
import { addTierChoices } from '../core/discord/addTierChoices';
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
import { autocompleteUsername } from '../core/discord/autocompleteUsername';
import { chunkLines } from '../core/discord/chunkLines';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
} from "../core/blitzkit/nonBlockingPromises";
import { addTierChoices } from "../core/discord/addTierChoices";
import { addUsernameChoices } from "../core/discord/addUsernameChoices";
import { autocompleteUsername } from "../core/discord/autocompleteUsername";
import { chunkLines } from "../core/discord/chunkLines";
import { createLocalizedCommand } from "../core/discord/createLocalizedCommand";
import { resolvePlayerFromCommand } from "../core/discord/resolvePlayerFromCommand";
import { translator } from "../core/localization/translator";
import { CommandRegistry } from "../events/interactionCreate";
export const ownedTanksCommand = new Promise<CommandRegistry>((resolve) => {
resolve({
command: createLocalizedCommand('owned-tanks')
command: createLocalizedCommand("owned-tanks")
.addStringOption(addTierChoices)
.addStringOption(addUsernameChoices),
async handler(interaction) {
const { strings, unwrap } = translator(interaction.locale);
const tier = Number(interaction.options.getString('tier'));
const tier = Number(interaction.options.getString("tier"));
const { id, region } = await resolvePlayerFromCommand(interaction);
const accountInfo = await getAccountInfo(region, id);
const tankStats = await getTankStats(region, id);
@@ -43,7 +43,7 @@ export const ownedTanksCommand = new Promise<CommandRegistry>((resolve) => {
tankStats.map(async (tankData) => ({
tankDefinitions: (await tankDefinitions).tanks[tankData.tank_id]!,
id: tankData.tank_id,
})),
}))
)
).filter((tank) => tank.tankDefinitions?.tier === tier);
const groupedTanks: Record<string, TankDefinition[]> = {};
@@ -60,25 +60,25 @@ export const ownedTanksCommand = new Promise<CommandRegistry>((resolve) => {
const awaitedTankDefinitions = await tankDefinitions;
const awaitedGameDefinitions = await gameDefinitions;
const title = literals(strings.bot.commands.owned_tanks.body.title, [
markdownEscape(accountInfo.nickname),
TIER_ROMAN_NUMERALS[tier],
]);
const title = literals(strings.bot.commands.owned_tanks.body.title, {
name: markdownEscape(accountInfo.nickname),
tier: TIER_ROMAN_NUMERALS[tier],
});
const tankList = tankStats
.map(({ tank_id }) => awaitedTankDefinitions.tanks[tank_id])
.filter((tank) => tank.tier === tier)
.sort(
(a, b) =>
TANK_CLASSES.indexOf(a.class) - TANK_CLASSES.indexOf(b.class),
TANK_CLASSES.indexOf(a.class) - TANK_CLASSES.indexOf(b.class)
)
.sort(
(a, b) =>
awaitedGameDefinitions.nations.indexOf(a.nation) -
awaitedGameDefinitions.nations.indexOf(b.nation),
awaitedGameDefinitions.nations.indexOf(b.nation)
)
.map(
(tank) =>
`[${flags[tank.nation]} ${markdownEscape(unwrap(tank.name))}](<https://blitzkit.app/tanks/${tank.slug}>)`,
`[${flags[tank.nation]} ${markdownEscape(unwrap(tank.name))}](<https://blitzkit.app/tanks/${tank.slug}>)`
);
const lines = [title, ...tankList];
+13 -13
View File
@@ -1,11 +1,11 @@
import { literals } from '@blitzkit/i18n';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
import { literals } from "@blitzkit/i18n";
import { createLocalizedCommand } from "../core/discord/createLocalizedCommand";
import { translator } from "../core/localization/translator";
import { CommandRegistry } from "../events/interactionCreate";
export const permissionsCommand = new Promise<CommandRegistry>((resolve) => {
resolve({
command: createLocalizedCommand('permissions'),
command: createLocalizedCommand("permissions"),
async handler(interaction) {
const { strings } = translator(interaction.locale);
@@ -14,33 +14,33 @@ export const permissionsCommand = new Promise<CommandRegistry>((resolve) => {
new Date().getDay() === 5 && new Date().getDate() === 13;
const permissions = [
[
interaction.appPermissions?.has('ViewChannel'),
interaction.appPermissions?.has("ViewChannel"),
strings.bot.commands.permissions.body.view_channels,
],
[
interaction.appPermissions?.has('ReadMessageHistory'),
interaction.appPermissions?.has("ReadMessageHistory"),
strings.bot.commands.permissions.body.read_message_history,
],
[
interaction.appPermissions?.has('AttachFiles'),
interaction.appPermissions?.has("AttachFiles"),
strings.bot.commands.permissions.body.attach_files,
],
[
interaction.appPermissions?.has('UseExternalEmojis'),
interaction.appPermissions?.has("UseExternalEmojis"),
strings.bot.commands.permissions.body.external_emojis,
],
];
const body = permissions
.map(([hasPermission, description]) => {
if (hasPermission) {
return `${isFridayThe13th ? '😇' : '✅'} ${description}`;
return `${isFridayThe13th ? "😇" : "✅"} ${description}`;
} else {
return `${isFridayThe13th ? '💀' : '❌'} ${description}`;
return `${isFridayThe13th ? "💀" : "❌"} ${description}`;
}
})
.join('\n');
.join("\n");
return literals(strings.bot.commands.permissions.body.title, [body]);
return literals(strings.bot.commands.permissions.body.title, { body });
},
});
});
+12 -12
View File
@@ -1,15 +1,15 @@
import { literals } from '@blitzkit/i18n';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
import { literals } from "@blitzkit/i18n";
import { createLocalizedCommand } from "../core/discord/createLocalizedCommand";
import { translator } from "../core/localization/translator";
import { CommandRegistry } from "../events/interactionCreate";
export const pingCommand = new Promise<CommandRegistry>((resolve) => {
resolve({
handlesInteraction: true,
command: createLocalizedCommand('ping', [
{ subcommand: 'blitzkit' },
{ subcommand: 'wotb' },
command: createLocalizedCommand("ping", [
{ subcommand: "blitzkit" },
{ subcommand: "wotb" },
]),
async handler(interaction) {
@@ -17,17 +17,17 @@ export const pingCommand = new Promise<CommandRegistry>((resolve) => {
const subcommand = interaction.options.getSubcommand();
const executionStart = Date.now();
if (subcommand === 'blitzkit') {
if (subcommand === "blitzkit") {
await interaction.editReply(strings.bot.commands.ping.body.pong);
} else {
await fetch('https://api.wotblitz.com/');
await fetch("https://api.wotblitz.com/");
}
const executionTime = Date.now() - executionStart;
interaction.editReply(
literals(strings.bot.commands.ping.body.pong_with_time, [
`${Math.round(executionTime)}`,
]),
literals(strings.bot.commands.ping.body.pong_with_time, {
time: executionTime.toFixed(0),
})
);
},
});
+18 -18
View File
@@ -1,19 +1,19 @@
import { getAccountInfo } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import markdownEscape from 'markdown-escape';
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
import { autocompleteUsername } from '../core/discord/autocompleteUsername';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { embedInfo } from '../core/discord/embedInfo';
import { markdownTable } from '../core/discord/markdownTable';
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
import { getAccountInfo } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import markdownEscape from "markdown-escape";
import { addUsernameChoices } from "../core/discord/addUsernameChoices";
import { autocompleteUsername } from "../core/discord/autocompleteUsername";
import { createLocalizedCommand } from "../core/discord/createLocalizedCommand";
import { embedInfo } from "../core/discord/embedInfo";
import { markdownTable } from "../core/discord/markdownTable";
import { resolvePlayerFromCommand } from "../core/discord/resolvePlayerFromCommand";
import { translator } from "../core/localization/translator";
import { CommandRegistry } from "../events/interactionCreate";
export const playerInfoCommand = new Promise<CommandRegistry>((resolve) => {
resolve({
command:
createLocalizedCommand('player-info').addStringOption(addUsernameChoices),
createLocalizedCommand("player-info").addStringOption(addUsernameChoices),
async handler(interaction) {
const { strings } = translator(interaction.locale);
@@ -22,9 +22,9 @@ export const playerInfoCommand = new Promise<CommandRegistry>((resolve) => {
const accountInfo = await getAccountInfo(region, id);
return embedInfo(
literals(strings.bot.commands.player_info.body.title, [
markdownEscape(accountInfo.nickname),
]),
literals(strings.bot.commands.player_info.body.title, {
name: markdownEscape(accountInfo.nickname),
}),
markdownTable([
[
@@ -51,16 +51,16 @@ export const playerInfoCommand = new Promise<CommandRegistry>((resolve) => {
[
strings.bot.commands.player_info.body.created,
new Date(accountInfo.created_at * 1000).toLocaleDateString(
interaction.locale,
interaction.locale
),
],
[
strings.bot.commands.player_info.body.last_battle,
new Date(accountInfo.last_battle_time * 1000).toLocaleDateString(
interaction.locale,
interaction.locale
),
],
]),
])
);
},
+118 -118
View File
@@ -8,42 +8,42 @@ import {
getRatingInfo,
getRatingNeighbors,
imgur,
} from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { SlashCommandSubcommandBuilder } from 'discord.js';
import markdownEscape from 'markdown-escape';
import { Glow } from '../components/AllStatsOverview/components/HeroStat/components/Glow';
import { CommandWrapper } from '../components/CommandWrapper';
import { DeltaCaret } from '../components/DeltaCaret';
import { TitleBar } from '../components/TitleBar';
import { normalizeLeagueIcon } from '../core/blitz/normalizeLeagueIcon';
import { iconPng } from '../core/blitzkit/iconPng';
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
import { theme } from '../stitches.config';
} from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { SlashCommandSubcommandBuilder } from "discord.js";
import markdownEscape from "markdown-escape";
import { Glow } from "../components/AllStatsOverview/components/HeroStat/components/Glow";
import { CommandWrapper } from "../components/CommandWrapper";
import { DeltaCaret } from "../components/DeltaCaret";
import { TitleBar } from "../components/TitleBar";
import { normalizeLeagueIcon } from "../core/blitz/normalizeLeagueIcon";
import { iconPng } from "../core/blitzkit/iconPng";
import { addUsernameChoices } from "../core/discord/addUsernameChoices";
import { createLocalizedCommand } from "../core/discord/createLocalizedCommand";
import { resolvePlayerFromCommand } from "../core/discord/resolvePlayerFromCommand";
import { translator } from "../core/localization/translator";
import { CommandRegistry } from "../events/interactionCreate";
import { theme } from "../stitches.config";
const LEAGUE_ACCENT = [
'_purple',
'_sand',
'_amber',
'_mauve',
'_brown',
"_purple",
"_sand",
"_amber",
"_mauve",
"_brown",
] as const;
export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
resolve({
command: createLocalizedCommand('rating', [
command: createLocalizedCommand("rating", [
{
subcommand: 'today',
subcommand: "today",
modify(option: SlashCommandSubcommandBuilder) {
option.addStringOption(addUsernameChoices);
},
},
{
subcommand: 'season',
subcommand: "season",
modify(option: SlashCommandSubcommandBuilder) {
option.addStringOption(addUsernameChoices);
},
@@ -52,11 +52,11 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
async handler(interaction) {
const subcommand = interaction.options.getSubcommand(true) as
| 'season'
| 'today';
| "season"
| "today";
const { strings } = translator(interaction.locale);
const { id, region } = await resolvePlayerFromCommand(interaction);
const clan = (await getClanAccountInfo(region, id, ['clan']))?.clan;
const clan = (await getClanAccountInfo(region, id, ["clan"]))?.clan;
const clanImage = clan ? emblemURL(clan.emblem_set_id) : undefined;
const ratingInfo = await getRatingInfo(region);
@@ -67,20 +67,20 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
const leaderboard = await getArchivedRatingLeaderboard(
region,
ratingInfo.current_season - (subcommand === 'today' ? 0 : 1),
ratingInfo.current_season - (subcommand === "today" ? 0 : 1)
);
if (leaderboard.version!.$case === 'v1') {
if (leaderboard.version!.$case === "v1") {
throw new Error(
'Encountered bkrl minimal format in latest season. Wait till next cron?',
"Encountered bkrl minimal format in latest season. Wait till next cron?"
);
}
const accountInfo = await getAccountInfo(region, id, [
'statistics.rating',
"statistics.rating",
]);
const statsIndex = leaderboard.version!.value.entries.findIndex(
(entry) => entry.id === id,
(entry) => entry.id === id
);
const statsA = leaderboard
? leaderboard.version!.value.entries[statsIndex!]
@@ -90,9 +90,9 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
const statsB2Array = (await getRatingNeighbors(region, id, 0)).neighbors;
if (statsB2Array === undefined) {
return literals(strings.bot.commands.rating.errors.no_participation, [
markdownEscape(accountInfo.nickname),
]);
return literals(strings.bot.commands.rating.errors.no_participation, {
name: markdownEscape(accountInfo.nickname),
});
}
const [statsB2] = statsB2Array;
@@ -102,15 +102,15 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
return strings.bot.commands.rating.errors.unrecorded_stats;
}
if (!statsB1) {
return literals(strings.bot.commands.rating.errors.no_participation, [
markdownEscape(accountInfo.nickname),
]);
return literals(strings.bot.commands.rating.errors.no_participation, {
name: markdownEscape(accountInfo.nickname),
});
}
const reward = ratingInfo.rewards.find(
(reward) =>
statsB2.number >= reward.from_position &&
statsB2.number <= reward.to_position,
statsB2.number <= reward.to_position
);
const positionDelta = leaderboard
? statsB2.number - positionA!
@@ -118,11 +118,11 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
const delta = deltaBkrlBlitzStats(
statsA,
accountInfo.statistics.rating!,
statsB2,
statsB2
);
const leagueTheme = LEAGUE_ACCENT[league.index];
let rewardImage = reward
? reward.type === 'vehicle'
? reward.type === "vehicle"
? reward.vehicle.preview_image_url
: reward.stuff.image_url
: undefined;
@@ -131,7 +131,7 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
const { ok } = await fetch(rewardImage);
if (!ok) {
rewardImage = imgur('kP88vqr');
rewardImage = imgur("kP88vqr");
}
}
@@ -147,24 +147,24 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
position: 'relative',
display: 'flex',
overflow: 'hidden',
position: "relative",
display: "flex",
overflow: "hidden",
}}
>
<div
style={{
position: 'relative',
position: "relative",
padding: 16,
backgroundColor: theme.colors[`appBackground2${leagueTheme}`],
borderRadius: 4,
border: `1px solid ${
theme.colors[`componentInteractive${leagueTheme}`]
}`,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
width: '100%',
display: "flex",
alignItems: "center",
justifyContent: "space-between",
width: "100%",
}}
>
{reward === undefined && (
@@ -172,17 +172,17 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
endOpacity={3 / 4}
color={theme.colors[`solidBackground${leagueTheme}`]}
style={{
transform: 'translateX(-16px) rotate(90deg)',
transform: "translateX(-16px) rotate(90deg)",
}}
/>
)}
<div
style={{
display: 'flex',
display: "flex",
gap: 8,
justifyContent: 'center',
alignItems: 'center',
justifyContent: "center",
alignItems: "center",
}}
>
<img
@@ -190,24 +190,24 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
style={{
width: 64,
height: 64,
objectFit: 'contain',
objectFit: "contain",
}}
src={normalizeLeagueIcon(
ratingInfo.leagues[league.index].big_icon,
ratingInfo.leagues[league.index].big_icon
)}
/>
<div
style={{
display: 'flex',
flexDirection: 'column',
display: "flex",
flexDirection: "column",
}}
>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-start',
display: "flex",
alignItems: "center",
justifyContent: "flex-start",
}}
>
<span
@@ -232,7 +232,7 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
}}
>
{Math.abs(delta.score).toLocaleString(
interaction.locale,
interaction.locale
)}
</span>
</>
@@ -241,9 +241,9 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-start',
display: "flex",
alignItems: "center",
justifyContent: "flex-start",
}}
>
<span
@@ -267,7 +267,7 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
}}
>
{Math.abs(positionDelta).toLocaleString(
interaction.locale,
interaction.locale
)}
</span>
</>
@@ -279,23 +279,23 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
{reward && (
<div
style={{
display: 'flex',
display: "flex",
gap: 8,
justifyContent: 'center',
alignItems: 'center',
justifyContent: "center",
alignItems: "center",
}}
>
<div
style={{
display: 'flex',
flexDirection: 'column',
display: "flex",
flexDirection: "column",
}}
>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
display: "flex",
alignItems: "center",
justifyContent: "flex-end",
}}
>
<span
@@ -303,13 +303,13 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
color: theme.colors[`textHighContrast${leagueTheme}`],
fontSize: 16,
maxWidth: 136,
textAlign: 'right',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
overflow: 'hidden',
textAlign: "right",
whiteSpace: "nowrap",
textOverflow: "ellipsis",
overflow: "hidden",
}}
>
{reward.type === 'vehicle'
{reward.type === "vehicle"
? reward.vehicle.user_string
: reward.stuff.title}
</span>
@@ -317,9 +317,9 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
display: "flex",
alignItems: "center",
justifyContent: "flex-end",
}}
>
<span
@@ -329,7 +329,7 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
}}
>
Reward
{reward.type === 'stuff' ? ` x${reward.count}` : ''}
{reward.type === "stuff" ? ` x${reward.count}` : ""}
</span>
</div>
</div>
@@ -338,7 +338,7 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
style={{
width: 64,
height: 64,
objectFit: 'cover',
objectFit: "cover",
}}
src={await iconPng(rewardImage!)}
/>
@@ -350,7 +350,7 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
endOpacity={3 / 4}
color={theme.colors[`solidBackground${leagueTheme}`]}
style={{
transform: 'translateX(16px) rotate(-90deg)',
transform: "translateX(16px) rotate(-90deg)",
}}
/>
)}
@@ -362,10 +362,10 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
direction="reverse"
color={theme.colors[`solidBackground${leagueTheme}`]}
style={{
position: 'absolute',
position: "absolute",
top: -40,
left: '50%',
transform: 'translateX(-50%)',
left: "50%",
transform: "translateX(-50%)",
}}
/>
)}
@@ -373,32 +373,32 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
<Glow
color={theme.colors[`solidBackground${leagueTheme}`]}
style={{
position: 'absolute',
position: "absolute",
bottom: -40,
left: '50%',
transform: 'translateX(-50%)',
left: "50%",
transform: "translateX(-50%)",
}}
/>
)}
</div>
{delta.battles > 0 && (
<div style={{ padding: '8px 0', display: 'flex' }}>
<div style={{ padding: "8px 0", display: "flex" }}>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
alignItems: "center",
justifyContent: "center",
gap: 4,
flex: 1,
flexDirection: 'column',
flexDirection: "column",
}}
>
<span
style={{
fontSize: 24,
color: theme.colors.textHighContrast,
fontWeight: 'bold',
fontWeight: "bold",
}}
>
{delta.battles.toLocaleString(interaction.locale)}
@@ -414,19 +414,19 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
</div>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
alignItems: "center",
justifyContent: "center",
gap: 4,
flex: 1,
flexDirection: 'column',
flexDirection: "column",
}}
>
<span
style={{
fontSize: 24,
color: theme.colors.textHighContrast,
fontWeight: 'bold',
fontWeight: "bold",
}}
>
{(100 * (delta.wins / delta.battles)).toFixed(0)}%
@@ -442,23 +442,23 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
</div>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
alignItems: "center",
justifyContent: "center",
gap: 4,
flex: 1,
flexDirection: 'column',
flexDirection: "column",
}}
>
<span
style={{
fontSize: 24,
color: theme.colors.textHighContrast,
fontWeight: 'bold',
fontWeight: "bold",
}}
>
{Math.round(delta.damage / delta.battles).toLocaleString(
interaction.locale,
interaction.locale
)}
</span>
<span
@@ -472,19 +472,19 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
</div>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
alignItems: "center",
justifyContent: "center",
gap: 4,
flex: 1,
flexDirection: 'column',
flexDirection: "column",
}}
>
<span
style={{
fontSize: 24,
color: theme.colors.textHighContrast,
fontWeight: 'bold',
fontWeight: "bold",
}}
>
{(100 * (delta.survived / delta.battles)).toFixed(0)}%
@@ -500,19 +500,19 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
</div>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
alignItems: "center",
justifyContent: "center",
gap: 4,
flex: 1,
flexDirection: 'column',
flexDirection: "column",
}}
>
<span
style={{
fontSize: 24,
color: theme.colors.textHighContrast,
fontWeight: 'bold',
fontWeight: "bold",
}}
>
{(delta.kills / delta.battles).toFixed(2)}
+79 -80
View File
@@ -13,27 +13,27 @@ import {
RatingInfo,
RatingLeaderboard,
Region,
} from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
} from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import {
APIApplicationCommandOptionChoice,
Locale,
SlashCommandSubcommandBuilder,
} from 'discord.js';
import { range } from 'lodash-es';
import markdownEscape from 'markdown-escape';
import { CommandWrapper } from '../components/CommandWrapper';
import * as Leaderboard from '../components/Leaderboard';
import { TitleBar } from '../components/TitleBar';
import { UserError } from '../core/blitzkit/userError';
import { addRegionChoices } from '../core/discord/addRegionChoices';
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
import { autocompleteUsername } from '../core/discord/autocompleteUsername';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { localizationObject } from '../core/discord/localizationObject';
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
} from "discord.js";
import { range } from "lodash-es";
import markdownEscape from "markdown-escape";
import { CommandWrapper } from "../components/CommandWrapper";
import * as Leaderboard from "../components/Leaderboard";
import { TitleBar } from "../components/TitleBar";
import { UserError } from "../core/blitzkit/userError";
import { addRegionChoices } from "../core/discord/addRegionChoices";
import { addUsernameChoices } from "../core/discord/addUsernameChoices";
import { autocompleteUsername } from "../core/discord/autocompleteUsername";
import { createLocalizedCommand } from "../core/discord/createLocalizedCommand";
import { localizationObject } from "../core/discord/localizationObject";
import { resolvePlayerFromCommand } from "../core/discord/resolvePlayerFromCommand";
import { translator } from "../core/localization/translator";
import { CommandRegistry } from "../events/interactionCreate";
interface SimplifiedPlayer {
id: number;
@@ -51,7 +51,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
const onGoingSeason = await isOnGoingRatingSeason();
const seasonNumbers = range(
FIRST_MINIMAL_ARCHIVED_RATING_SEASON,
latestArchivedSeasonNumber + (onGoingSeason ? 1 : 0) + 1,
latestArchivedSeasonNumber + (onGoingSeason ? 1 : 0) + 1
);
function addOptions(option: SlashCommandSubcommandBuilder) {
@@ -66,51 +66,50 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
(strings) =>
strings.bot.commands.rating_leaderboard.options.limit.name,
undefined,
true,
),
true
)
)
.setDescription(
literals(
strings.bot.commands.rating_leaderboard.options.limit
.description,
[`${DEFAULT_LIMIT}`],
),
{ count: DEFAULT_LIMIT }
)
)
.setDescriptionLocalizations(
localizationObject(
(strings) =>
strings.bot.commands.rating_leaderboard.options.limit
.description,
[`${DEFAULT_LIMIT}`],
),
{ count: DEFAULT_LIMIT }
)
)
.setRequired(false)
.setMinValue(5)
.setMaxValue(30),
.setMaxValue(30)
)
.addStringOption((option) =>
option
.setName(
strings.bot.commands.rating_leaderboard.options.season.name,
strings.bot.commands.rating_leaderboard.options.season.name
)
.setNameLocalizations(
localizationObject(
(strings) =>
strings.bot.commands.rating_leaderboard.options.season.name,
undefined,
true,
),
true
)
)
.setDescription(
strings.bot.commands.rating_leaderboard.options.season
.description,
strings.bot.commands.rating_leaderboard.options.season.description
)
.setDescriptionLocalizations(
localizationObject(
(strings) =>
strings.bot.commands.rating_leaderboard.options.season
.description,
),
.description
)
)
.setRequired(false)
.addChoices(
@@ -124,7 +123,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
? literals(
strings.bot.commands.rating_leaderboard.options.season
.choices.current,
[`${number}`],
{ season: number }
)
: `${number}`,
value: `${number}`,
@@ -133,27 +132,27 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
(strings) =>
strings.bot.commands.rating_leaderboard.options
.season.choices.current,
[`${number}`],
{ season: number }
)
: undefined,
} satisfies APIApplicationCommandOptionChoice<string>;
})
.reverse(),
),
.reverse()
)
);
}
resolve({
command: createLocalizedCommand('rating-leaderboard', [
command: createLocalizedCommand("rating-leaderboard", [
{
subcommand: 'neighbors',
subcommand: "neighbors",
modify(option: SlashCommandSubcommandBuilder) {
option.addStringOption(addUsernameChoices);
addOptions(option);
},
},
{
subcommand: 'league',
subcommand: "league",
modify(option: SlashCommandSubcommandBuilder) {
option
.addStringOption((option) => {
@@ -161,7 +160,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
return option
.setName(
strings.bot.commands.rating_leaderboard.options.league.name,
strings.bot.commands.rating_leaderboard.options.league.name
)
.setNameLocalizations(
localizationObject(
@@ -169,19 +168,19 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
strings.bot.commands.rating_leaderboard.options.league
.name,
undefined,
true,
),
true
)
)
.setDescription(
strings.bot.commands.rating_leaderboard.options.league
.description,
.description
)
.setDescriptionLocalizations(
localizationObject(
(strings) =>
strings.bot.commands.rating_leaderboard.options.league
.description,
),
.description
)
)
.addChoices(
...LEAGUES.map(
@@ -195,10 +194,10 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
(strings) =>
(
strings.common.leagues as Record<string, string>
)[name],
)[name]
),
}) satisfies APIApplicationCommandOptionChoice<string>,
),
}) satisfies APIApplicationCommandOptionChoice<string>
)
)
.setRequired(true);
})
@@ -213,10 +212,10 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
async handler(interaction) {
const { strings } = translator(interaction.locale);
const subcommand = interaction.options.getSubcommand(true) as
| 'league'
| 'neighbors';
const limit = interaction.options.getInteger('limit') ?? DEFAULT_LIMIT;
const seasonOption = interaction.options.getString('season');
| "league"
| "neighbors";
const limit = interaction.options.getInteger("limit") ?? DEFAULT_LIMIT;
const seasonOption = interaction.options.getString("season");
const season = seasonOption
? parseInt(seasonOption)
: onGoingSeason
@@ -232,11 +231,11 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
let playerId: number | undefined;
let regionRatingInfo: RatingInfo | null;
if (subcommand === 'league') {
if (subcommand === "league") {
const leagueIndex = parseInt(
interaction.options.getString('league')!,
interaction.options.getString("league")!
);
const region = interaction.options.getString('region') as Region;
const region = interaction.options.getString("region") as Region;
regionRatingInfo = await (isCurrentSeason
? getRatingInfo(region)
: null);
@@ -259,8 +258,8 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
position: player.number,
clan: player.clan_tag,
nickname: player.nickname,
}) satisfies SimplifiedPlayer,
),
}) satisfies SimplifiedPlayer
)
)
: await getArchivedRatingLeaderboard(region, season!).then(
async (players) => {
@@ -269,17 +268,17 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
? 0
: players.version!.value.entries.findIndex(
(player) =>
player.score < LEAGUES[leagueIndex - 1].minScore,
player.score < LEAGUES[leagueIndex - 1].minScore
);
const lastPlayerIndex = firstPlayerIndex + limit - 1;
const trimmed = players.version!.value.entries.slice(
firstPlayerIndex,
lastPlayerIndex + 1,
lastPlayerIndex + 1
);
const clanData = await getClanAccountInfo(
region,
trimmed.map(({ id }) => id),
['clan'],
["clan"]
);
return trimmed.map(
@@ -294,16 +293,16 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
literals(
strings.bot.commands.rating_leaderboard.body
.deleted_player,
[`${player.id}`],
{ id: player.id }
),
}) satisfies SimplifiedPlayer,
}) satisfies SimplifiedPlayer
);
},
}
);
const leagueInfo = LEAGUES[leagueIndex];
archivedLeaderboard = await getArchivedRatingLeaderboard(
region,
season,
season
);
players = result;
@@ -316,12 +315,12 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
? (strings.common.leagues as Record<string, string>)[
LEAGUES[leagueInfo.index].name
]
: ''
: ""
} - ${strings.common.regions.short[region]}`;
titleImage = imgur(leagueInfo.icon);
titleDescription = literals(
strings.bot.commands.rating_leaderboard.body.top_players,
[`${limit}`],
{ count: limit }
);
} else {
const { region, id } = await resolvePlayerFromCommand(interaction);
@@ -338,7 +337,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
}
const accountInfo = await getAccountInfo(region, id);
const clan = (await getClanAccountInfo(region, id, ['clan']))?.clan;
const clan = (await getClanAccountInfo(region, id, ["clan"]))?.clan;
const neighbors = isCurrentSeason
? await getRatingNeighbors(region, id, Math.round(limit / 2)).then(
(players) =>
@@ -350,13 +349,13 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
score: player.score,
clan: player.clan_tag,
nickname: player.nickname,
}) satisfies SimplifiedPlayer,
),
}) satisfies SimplifiedPlayer
)
)
: await getArchivedRatingLeaderboard(region, season!).then(
async (players) => {
const playerIndex = players.version!.value.entries.findIndex(
(player) => player.id === id,
(player) => player.id === id
);
if (playerIndex === -1) {
@@ -364,20 +363,20 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
literals(
strings.bot.commands.rating_leaderboard.body
.no_participation,
[markdownEscape(accountInfo.nickname), `${season}`],
),
{ player: markdownEscape(accountInfo.nickname), season }
)
);
}
const halfRange = Math.round(limit / 2);
const trimmed = players.version!.value.entries.slice(
playerIndex - halfRange,
playerIndex + halfRange + 1,
playerIndex + halfRange + 1
);
const clanData = await getClanAccountInfo(
region,
trimmed.map((player) => player.id),
['clan'],
["clan"]
);
return trimmed.map((player, index) => ({
@@ -389,18 +388,18 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
? clanData[index]!.account_name
: `Deleted ${player.id}`,
}));
},
}
);
archivedLeaderboard = await getArchivedRatingLeaderboard(
region,
season,
season
);
players = neighbors;
titleImage = clan
? `https://wotblitz-gc.gcdn.co/icons/clanEmblems1x/clan-icon-v2-${clan.emblem_set_id}.png`
: undefined;
titleName = neighbors ? accountInfo.nickname : '';
titleName = neighbors ? accountInfo.nickname : "";
titleDescription =
strings.bot.commands.rating_leaderboard.body.neighbors;
playersAfter =
@@ -414,7 +413,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
const items = players.map((player) => {
const midnightIndex =
archivedLeaderboard?.version!.value.entries.findIndex(
(item) => item.id === player.id,
(item) => item.id === player.id
);
const midnightScore =
midnightIndex === undefined
@@ -453,7 +452,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
<Leaderboard.Gap
message={literals(
strings.bot.commands.rating_leaderboard.body.more,
[`${playersAfter.toLocaleString(interaction.locale)}`],
{ count: playersAfter.toLocaleString(interaction.locale) }
)}
/>
)}
@@ -465,5 +464,5 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
autocomplete: autocompleteUsername,
});
},
}
);
+136 -137
View File
@@ -8,31 +8,31 @@ import {
TANK_ICONS,
TankType,
TIER_ROMAN_NUMERALS,
} from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { escapeMarkdown, Locale } from 'discord.js';
import { CommandWrapper } from '../components/CommandWrapper';
import { TitleBar } from '../components/TitleBar';
import { resolveTankId } from '../core/blitz/resolveTankId';
import { buildTechTreeLine } from '../core/blitzkit/buildTechTreeLine';
import { iconPng } from '../core/blitzkit/iconPng';
import { tankDefinitions } from '../core/blitzkit/nonBlockingPromises';
import { resolveAncestry } from '../core/blitzkit/resolveAncestry';
import { tankIconPng } from '../core/blitzkit/tankIconPng';
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
import { autocompleteTanks } from '../core/discord/autocompleteTanks';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { localizationObject } from '../core/discord/localizationObject';
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
import { theme } from '../stitches.config';
} from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { escapeMarkdown, Locale } from "discord.js";
import { CommandWrapper } from "../components/CommandWrapper";
import { TitleBar } from "../components/TitleBar";
import { resolveTankId } from "../core/blitz/resolveTankId";
import { buildTechTreeLine } from "../core/blitzkit/buildTechTreeLine";
import { iconPng } from "../core/blitzkit/iconPng";
import { tankDefinitions } from "../core/blitzkit/nonBlockingPromises";
import { resolveAncestry } from "../core/blitzkit/resolveAncestry";
import { tankIconPng } from "../core/blitzkit/tankIconPng";
import { addUsernameChoices } from "../core/discord/addUsernameChoices";
import { autocompleteTanks } from "../core/discord/autocompleteTanks";
import { createLocalizedCommand } from "../core/discord/createLocalizedCommand";
import { localizationObject } from "../core/discord/localizationObject";
import { resolvePlayerFromCommand } from "../core/discord/resolvePlayerFromCommand";
import { translator } from "../core/localization/translator";
import { CommandRegistry } from "../events/interactionCreate";
import { theme } from "../stitches.config";
export const researchCommand = new Promise<CommandRegistry>((resolve) => {
const { strings } = translator(Locale.EnglishUS);
resolve({
command: createLocalizedCommand('research')
command: createLocalizedCommand("research")
.addStringOption((option) =>
option
.setName(strings.bot.commands.research.options.target_tank.name)
@@ -41,20 +41,20 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
(strings) =>
strings.bot.commands.research.options.target_tank.name,
undefined,
true,
),
true
)
)
.setDescription(
strings.bot.commands.research.options.target_tank.description,
strings.bot.commands.research.options.target_tank.description
)
.setDescriptionLocalizations(
localizationObject(
(strings) =>
strings.bot.commands.research.options.target_tank.description,
),
strings.bot.commands.research.options.target_tank.description
)
)
.setAutocomplete(true)
.setRequired(true),
.setRequired(true)
)
.addStringOption((option) =>
option
@@ -64,20 +64,20 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
(strings) =>
strings.bot.commands.research.options.starting_tank.name,
undefined,
true,
),
true
)
)
.setDescription(
strings.bot.commands.research.options.starting_tank.description,
strings.bot.commands.research.options.starting_tank.description
)
.setDescriptionLocalizations(
localizationObject(
(strings) =>
strings.bot.commands.research.options.starting_tank.description,
),
strings.bot.commands.research.options.starting_tank.description
)
)
.setAutocomplete(true)
.setRequired(false),
.setRequired(false)
)
.addStringOption(addUsernameChoices),
@@ -85,11 +85,11 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
const { strings, unwrap } = translator(interaction.locale);
const awaitedTankDefinitions = await tankDefinitions;
const targetTankId = await resolveTankId(
interaction.options.getString('target-tank', true),
interaction.options.getString("target-tank", true),
interaction.locale,
true,
true
);
const startingTankRaw = interaction.options.getString('starting-tank');
const startingTankRaw = interaction.options.getString("starting-tank");
const targetTank = awaitedTankDefinitions.tanks[targetTankId];
const { id, region } = await resolvePlayerFromCommand(interaction);
let startingTankId: number;
@@ -99,46 +99,45 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
startingTankId = await resolveTankId(
startingTankRaw,
interaction.locale,
true,
true
);
if (targetTankId === startingTankId) {
return literals(
strings.bot.commands.research.errors.start_end_equal,
[escapeMarkdown(unwrap(targetTank.name))],
{ tank: escapeMarkdown(unwrap(targetTank.name)) }
);
}
const startingTank = awaitedTankDefinitions.tanks[startingTankId];
if (startingTank.tier > targetTank.tier) {
return literals(strings.bot.commands.research.errors.unordered, [
escapeMarkdown(unwrap(startingTank.name)),
escapeMarkdown(unwrap(targetTank.name)),
escapeMarkdown(unwrap(targetTank.name)),
]);
return literals(strings.bot.commands.research.errors.unordered, {
tank_1: escapeMarkdown(unwrap(startingTank.name)),
tank_2: escapeMarkdown(unwrap(targetTank.name)),
});
}
if (!targetTankAncestry.includes(startingTankId)) {
return literals(
strings.bot.commands.research.errors.tanks_not_on_line,
[
escapeMarkdown(unwrap(targetTank.name)),
escapeMarkdown(unwrap(startingTank.name)),
],
{
tank_1: escapeMarkdown(unwrap(targetTank.name)),
tank_2: escapeMarkdown(unwrap(startingTank.name)),
}
);
}
} else {
if (targetTank.type !== TankType.RESEARCHABLE) {
return literals(strings.bot.commands.research.errors.non_tech_tree, [
escapeMarkdown(unwrap(targetTank.name)),
]);
return literals(strings.bot.commands.research.errors.non_tech_tree, {
tank: escapeMarkdown(unwrap(targetTank.name)),
});
}
if (targetTank.tier === 1) {
return literals(strings.bot.commands.research.errors.tier_1, [
escapeMarkdown(unwrap(targetTank.name)),
]);
return literals(strings.bot.commands.research.errors.tier_1, {
tank: escapeMarkdown(unwrap(targetTank.name)),
});
}
const tankStats = await getTankStats(region, id);
@@ -150,18 +149,18 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
if (tankStats.some(({ tank_id }) => tank_id === targetTankId)) {
return literals(
strings.bot.commands.research.errors.already_researched,
[escapeMarkdown(unwrap(targetTank.name))],
{ tank: escapeMarkdown(unwrap(targetTank.name)) }
);
}
const foundAncestor = targetTankAncestry.find(
(id) =>
awaitedTankDefinitions.tanks[id].tier === 1 ||
tankStats.some(({ tank_id }) => tank_id === id),
tankStats.some(({ tank_id }) => tank_id === id)
);
if (foundAncestor === undefined) {
throw new Error('No first owned tech tree found.');
throw new Error("No first owned tech tree found.");
}
startingTankId = foundAncestor;
@@ -169,12 +168,12 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
const techTreeLine = await buildTechTreeLine(
startingTankId,
targetTankId,
targetTankId
);
const line = [...techTreeLine, startingTankId].reverse();
const { nickname } = await getAccountInfo(region, id);
const clan = (await getClanAccountInfo(region, id, ['clan']))?.clan;
const clan = (await getClanAccountInfo(region, id, ["clan"]))?.clan;
const clanImage = clan ? emblemURL(clan.emblem_set_id) : undefined;
const costs = await Promise.all(
line.map(async (id) => {
@@ -187,18 +186,18 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
tank.turrets.forEach((turret) => {
if (
turret.research_cost !== undefined &&
typeof turret.research_cost.research_cost_type!.value === 'number'
typeof turret.research_cost.research_cost_type!.value === "number"
) {
turretXps.set(
turret.id,
turret.research_cost.research_cost_type!.value,
turret.research_cost.research_cost_type!.value
);
}
turret.guns.forEach((gun) => {
if (
gun.research_cost !== undefined &&
typeof gun.research_cost.research_cost_type!.value === 'number'
typeof gun.research_cost.research_cost_type!.value === "number"
) {
gunXps.set(gun.id, gun.research_cost.research_cost_type!.value);
}
@@ -208,11 +207,11 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
tank.engines.forEach((engine) => {
if (
engine.research_cost !== undefined &&
typeof engine.research_cost.research_cost_type!.value === 'number'
typeof engine.research_cost.research_cost_type!.value === "number"
) {
engineXps.set(
engine.id,
engine.research_cost.research_cost_type!.value,
engine.research_cost.research_cost_type!.value
);
}
});
@@ -220,11 +219,11 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
tank.tracks.forEach((track) => {
if (
track.research_cost !== undefined &&
typeof track.research_cost.research_cost_type!.value === 'number'
typeof track.research_cost.research_cost_type!.value === "number"
) {
trackXps.set(
track.id,
track.research_cost.research_cost_type!.value,
track.research_cost.research_cost_type!.value
);
}
});
@@ -249,10 +248,10 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
purchase: tank.price.value,
equipment: equipmentPriceMatrix[tank.tier].reduce(
(a, b) => a + 3 * b,
0,
0
),
};
}),
})
);
const image = (
@@ -267,14 +266,14 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
display: 'flex',
flexDirection: 'column',
display: "flex",
flexDirection: "column",
gap: 8,
}}
>
<div
style={{
display: 'flex',
display: "flex",
borderRadius: 4,
backgroundColor: theme.colors.appBackground2,
border: theme.borderStyles.subtle,
@@ -285,10 +284,10 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
flex: 1,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
position: 'relative',
display: "flex",
alignItems: "center",
justifyContent: "center",
position: "relative",
right: 24,
}}
>
@@ -304,23 +303,23 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
flex: 1,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
display: "flex",
flexDirection: "column",
justifyContent: "center",
gap: 8,
padding: '16px 0',
padding: "16px 0",
}}
>
<div
style={{
display: 'flex',
display: "flex",
gap: 4,
alignItems: 'center',
alignItems: "center",
}}
>
<img
alt="XP icon"
src={await iconPng(asset('icons/currencies/xp.webp'))}
src={await iconPng(asset("icons/currencies/xp.webp"))}
width={16}
height={16}
/>
@@ -330,7 +329,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
color: theme.colors.textHighContrast,
}}
>
Experience:{' '}
Experience:{" "}
{costs
.reduce((a, b) => a + (b.research ?? 0) + b.upgrades, 0)
.toLocaleString(interaction.locale)}
@@ -339,14 +338,14 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
display: 'flex',
display: "flex",
gap: 4,
alignItems: 'center',
alignItems: "center",
}}
>
<img
alt="Silver icon"
src={await iconPng(asset('icons/currencies/silver.webp'))}
src={await iconPng(asset("icons/currencies/silver.webp"))}
width={16}
height={16}
/>
@@ -356,7 +355,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
color: theme.colors.textHighContrast,
}}
>
Purchase:{' '}
Purchase:{" "}
{costs
.reduce((a, b) => a + b.purchase, 0)
.toLocaleString(interaction.locale)}
@@ -365,14 +364,14 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
display: 'flex',
display: "flex",
gap: 4,
alignItems: 'center',
alignItems: "center",
}}
>
<img
alt="Silver icon"
src={await iconPng(asset('icons/currencies/silver.webp'))}
src={await iconPng(asset("icons/currencies/silver.webp"))}
width={16}
height={16}
/>
@@ -382,7 +381,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
color: theme.colors.textHighContrast,
}}
>
Equipment:{' '}
Equipment:{" "}
{costs
.reduce((a, b) => a + b.equipment, 0)
.toLocaleString(interaction.locale)}
@@ -399,7 +398,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
<div
key={id}
style={{
display: 'flex',
display: "flex",
borderRadius: 4,
backgroundColor: theme.colors.appBackground2,
border: theme.borderStyles.subtle,
@@ -408,9 +407,9 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
width: 48,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<span
@@ -426,9 +425,9 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
flex: 1,
display: 'flex',
position: 'relative',
right: '5%',
display: "flex",
position: "relative",
right: "5%",
}}
>
<img
@@ -437,23 +436,23 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
style={{
height: 100,
width: 100,
objectFit: 'contain',
position: 'absolute',
left: '25%',
objectFit: "contain",
position: "absolute",
left: "25%",
top: 0,
}}
/>
<div
style={{
display: 'flex',
display: "flex",
gap: 4,
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
alignItems: "center",
justifyContent: "center",
position: "absolute",
bottom: 8,
left: '50%',
transform: 'translateX(-50%)',
left: "50%",
transform: "translateX(-50%)",
}}
>
<img
@@ -476,23 +475,23 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
flex: 1,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
display: "flex",
flexDirection: "column",
justifyContent: "center",
gap: 8,
padding: '16px 0',
padding: "16px 0",
}}
>
<div
style={{
display: 'flex',
display: "flex",
gap: 4,
alignItems: 'center',
alignItems: "center",
}}
>
<img
alt="XP icon"
src={await iconPng(asset('icons/currencies/xp.webp'))}
src={await iconPng(asset("icons/currencies/xp.webp"))}
width={16}
height={16}
/>
@@ -504,11 +503,11 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
>
{literals(
strings.bot.commands.research.body.research,
[
`${costs[index].research?.toLocaleString(
interaction.locale,
)}`,
],
{
cost: costs[index].research?.toLocaleString(
interaction.locale
),
}
)}
</span>
</div>
@@ -516,15 +515,15 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
{costs[index].upgrades > 0 && (
<div
style={{
display: 'flex',
display: "flex",
gap: 4,
alignItems: 'center',
alignItems: "center",
}}
>
<img
alt="Free XP icon"
src={await iconPng(
asset('icons/currencies/free-xp.webp'),
asset("icons/currencies/free-xp.webp")
)}
width={16}
height={16}
@@ -537,7 +536,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
>
{literals(
strings.bot.commands.research.body.upgrades,
[costs[index].upgrades.toLocaleString()],
{ cost: costs[index].upgrades.toLocaleString() }
)}
</span>
</div>
@@ -545,15 +544,15 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
<div
style={{
display: 'flex',
display: "flex",
gap: 4,
alignItems: 'center',
alignItems: "center",
}}
>
<img
alt="Silver icon"
src={await iconPng(
asset('icons/currencies/silver.webp'),
asset("icons/currencies/silver.webp")
)}
width={16}
height={16}
@@ -566,26 +565,26 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
>
{literals(
strings.bot.commands.research.body.purchase,
[
costs[index].purchase.toLocaleString(
interaction.locale,
{
cost: costs[index].purchase.toLocaleString(
interaction.locale
),
],
}
)}
</span>
</div>
<div
style={{
display: 'flex',
display: "flex",
gap: 4,
alignItems: 'center',
alignItems: "center",
}}
>
<img
alt="Silver icon"
src={await iconPng(
asset('icons/currencies/silver.webp'),
asset("icons/currencies/silver.webp")
)}
width={16}
height={16}
@@ -598,18 +597,18 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
>
{literals(
strings.bot.commands.research.body.equipment,
[
costs[index].equipment.toLocaleString(
interaction.locale,
{
cost: costs[index].equipment.toLocaleString(
interaction.locale
),
],
}
)}
</span>
</div>
</div>
</div>
);
}),
})
)}
</div>
</CommandWrapper>
@@ -621,7 +620,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
},
autocomplete(interaction) {
autocompleteTanks(interaction, true, ['target-tank', 'starting-tank']);
autocompleteTanks(interaction, true, ["target-tank", "starting-tank"]);
},
});
});
+28 -28
View File
@@ -1,23 +1,23 @@
import { ClanList, fetchBlitz, Region } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { Locale } from 'discord.js';
import markdownEscape from 'markdown-escape';
import { addClanChoices } from '../core/discord/addClanChoices';
import { addRegionChoices } from '../core/discord/addRegionChoices';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { embedInfo } from '../core/discord/embedInfo';
import { localizationObject } from '../core/discord/localizationObject';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
import { ClanList, fetchBlitz, Region } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { Locale } from "discord.js";
import markdownEscape from "markdown-escape";
import { addClanChoices } from "../core/discord/addClanChoices";
import { addRegionChoices } from "../core/discord/addRegionChoices";
import { createLocalizedCommand } from "../core/discord/createLocalizedCommand";
import { embedInfo } from "../core/discord/embedInfo";
import { localizationObject } from "../core/discord/localizationObject";
import { translator } from "../core/localization/translator";
import { CommandRegistry } from "../events/interactionCreate";
const DEFAULT_LIMIT = 25;
export const searchClansCommand = new Promise<CommandRegistry>((resolve) => {
resolve({
command: createLocalizedCommand('search-clans')
command: createLocalizedCommand("search-clans")
.addStringOption(addRegionChoices)
.addStringOption((option) =>
addClanChoices(option).setAutocomplete(false),
addClanChoices(option).setAutocomplete(false)
)
.addIntegerOption((option) => {
const { strings } = translator(Locale.EnglishUS);
@@ -28,21 +28,21 @@ export const searchClansCommand = new Promise<CommandRegistry>((resolve) => {
localizationObject(
(strings) => strings.bot.commands.search_clans.options.limit.name,
undefined,
true,
),
true
)
)
.setDescription(
literals(
strings.bot.commands.search_clans.options.limit.description,
[`${DEFAULT_LIMIT}`],
),
{ limit: DEFAULT_LIMIT }
)
)
.setDescriptionLocalizations(
localizationObject(
(strings) =>
strings.bot.commands.search_clans.options.limit.description,
[`${DEFAULT_LIMIT}`],
),
{ limit: DEFAULT_LIMIT }
)
)
.setMinValue(1)
.setMaxValue(100);
@@ -50,24 +50,24 @@ export const searchClansCommand = new Promise<CommandRegistry>((resolve) => {
async handler(interaction) {
const { strings } = translator(interaction.locale);
const region = interaction.options.getString('region') as Region;
const clan = interaction.options.getString('clan')!;
const limit = interaction.options.getInteger('limit') ?? DEFAULT_LIMIT;
const clanList = await fetchBlitz<ClanList>(region, 'clans/list', {
const region = interaction.options.getString("region") as Region;
const clan = interaction.options.getString("clan")!;
const limit = interaction.options.getInteger("limit") ?? DEFAULT_LIMIT;
const clanList = await fetchBlitz<ClanList>(region, "clans/list", {
search: clan,
limit,
});
return embedInfo(
literals(strings.bot.commands.search_clans.body.title, [
markdownEscape(clan),
strings.common.regions.normal[region],
]),
literals(strings.bot.commands.search_clans.body.title, {
search: markdownEscape(clan),
region: strings.common.regions.normal[region],
}),
clanList.length === 0
? strings.bot.commands.search_clans.body.no_results
: `\`\`\`\n${clanList
.map((clan) => `${clan.name} [${clan.tag}]`)
.join('\n')}\n\`\`\``,
.join("\n")}\n\`\`\``
);
},
});
+30 -30
View File
@@ -3,17 +3,17 @@ import {
fetchBlitz,
Region,
usernamePattern,
} from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { Locale } from 'discord.js';
import markdownEscape from 'markdown-escape';
import { addRegionChoices } from '../core/discord/addRegionChoices';
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
import { embedInfo } from '../core/discord/embedInfo';
import { localizationObject } from '../core/discord/localizationObject';
import { translator } from '../core/localization/translator';
import { CommandRegistry } from '../events/interactionCreate';
} from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { Locale } from "discord.js";
import markdownEscape from "markdown-escape";
import { addRegionChoices } from "../core/discord/addRegionChoices";
import { addUsernameChoices } from "../core/discord/addUsernameChoices";
import { createLocalizedCommand } from "../core/discord/createLocalizedCommand";
import { embedInfo } from "../core/discord/embedInfo";
import { localizationObject } from "../core/discord/localizationObject";
import { translator } from "../core/localization/translator";
import { CommandRegistry } from "../events/interactionCreate";
const DEFAULT_LIMIT = 25;
@@ -21,10 +21,10 @@ export const searchPlayersCommand = new Promise<CommandRegistry>((resolve) => {
const { strings } = translator(Locale.EnglishUS);
resolve({
command: createLocalizedCommand('search-players')
command: createLocalizedCommand("search-players")
.addStringOption(addRegionChoices)
.addStringOption((option) =>
addUsernameChoices(option).setAutocomplete(false).setRequired(true),
addUsernameChoices(option).setAutocomplete(false).setRequired(true)
)
.addIntegerOption((option) =>
option
@@ -34,49 +34,49 @@ export const searchPlayersCommand = new Promise<CommandRegistry>((resolve) => {
(strings) =>
strings.bot.commands.search_players.options.limit.name,
undefined,
true,
),
true
)
)
.setDescription(
literals(
strings.bot.commands.search_players.options.limit.description,
[`${DEFAULT_LIMIT}`],
),
{ limit: DEFAULT_LIMIT }
)
)
.setDescriptionLocalizations(
localizationObject(
(strings) =>
strings.bot.commands.search_players.options.limit.description,
[`${DEFAULT_LIMIT}`],
),
{ limit: DEFAULT_LIMIT }
)
)
.setMinValue(1)
.setMaxValue(100),
.setMaxValue(100)
),
async handler(interaction) {
const { strings } = translator(interaction.locale);
const region = interaction.options.getString('region') as Region;
const name = interaction.options.getString('username')!;
const limit = interaction.options.getInteger('limit') ?? 25;
const region = interaction.options.getString("region") as Region;
const name = interaction.options.getString("username")!;
const limit = interaction.options.getInteger("limit") ?? 25;
const trimmedSearch = name.trim();
const players = usernamePattern.test(trimmedSearch)
? await fetchBlitz<AccountList>(region, 'account/list', {
? await fetchBlitz<AccountList>(region, "account/list", {
search: trimmedSearch,
limit,
})
: [];
return embedInfo(
literals(strings.bot.commands.search_players.body.title, [
markdownEscape(trimmedSearch),
strings.common.regions.normal[region],
]),
literals(strings.bot.commands.search_players.body.title, {
search: markdownEscape(trimmedSearch),
region: strings.common.regions.normal[region],
}),
`\`\`\`${
players.length === 0
? strings.bot.commands.search_players.body.no_results
: players.map((player) => player.nickname).join('\n')
}\`\`\``,
: players.map((player) => player.nickname).join("\n")
}\`\`\``
);
},
});
+18 -16
View File
@@ -1,33 +1,33 @@
import { SEARCH_KEYS } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { Locale } from 'discord.js';
import { go } from 'fuzzysort';
import markdownEscape from 'markdown-escape';
import { tankDefinitions, tankNames } from '../blitzkit/nonBlockingPromises';
import { UserError } from '../blitzkit/userError';
import { tankNamesTechTreeOnly } from '../discord/autocompleteTanks';
import { translator } from '../localization/translator';
import { SEARCH_KEYS } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { Locale } from "discord.js";
import { go } from "fuzzysort";
import markdownEscape from "markdown-escape";
import { tankDefinitions, tankNames } from "../blitzkit/nonBlockingPromises";
import { UserError } from "../blitzkit/userError";
import { tankNamesTechTreeOnly } from "../discord/autocompleteTanks";
import { translator } from "../localization/translator";
export async function resolveTankId(
tank: string | number,
locale: Locale,
techTreeOnly = false,
techTreeOnly = false
) {
const { strings } = translator(locale);
const number = typeof tank === 'string' ? Number(tank) : tank;
const number = typeof tank === "string" ? Number(tank) : tank;
if (Number.isNaN(number)) {
const searchResult = go(
`${tank}`,
await (techTreeOnly ? tankNamesTechTreeOnly : tankNames),
{ keys: SEARCH_KEYS, limit: 1 },
{ keys: SEARCH_KEYS, limit: 1 }
);
if (searchResult.length === 0) {
throw new UserError(
literals(strings.bot.common.errors.tank_name_not_found, [
markdownEscape(`${tank}`),
]),
literals(strings.bot.common.errors.tank_name_not_found, {
search: markdownEscape(`${tank}`),
})
);
} else {
return searchResult[0].obj.id;
@@ -39,7 +39,9 @@ export async function resolveTankId(
return number;
} else {
throw new UserError(
literals(strings.bot.common.errors.tank_id_not_found, [`${number}`]),
literals(strings.bot.common.errors.tank_id_not_found, {
search: number,
})
);
}
}
@@ -1,12 +1,12 @@
import { fetchTankDefinitions, TIER_ROMAN_NUMERALS } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { Locale } from 'discord.js';
import { StatFilters } from '../blitzstars/filterStats';
import { translator } from '../localization/translator';
import { fetchTankDefinitions, TIER_ROMAN_NUMERALS } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { Locale } from "discord.js";
import { StatFilters } from "../blitzstars/filterStats";
import { translator } from "../localization/translator";
export async function filtersToDescription(
{ nation, tier, type, class: tankClass, tank }: StatFilters,
locale: Locale,
locale: Locale
) {
const { strings, bkLocale } = translator(locale);
const awaitedTankDefinitions = await fetchTankDefinitions();
@@ -18,11 +18,13 @@ export async function filtersToDescription(
info.push((strings.common.nations as Record<string, string>)[nation]);
if (tier) {
info.push(
literals(strings.bot.common.filters.tier, [TIER_ROMAN_NUMERALS[tier]]),
literals(strings.bot.common.filters.tier, {
tier: TIER_ROMAN_NUMERALS[tier],
})
);
}
if (tankClass) info.push(strings.common.tank_class_short[tankClass]);
if (type) info.push(strings.common.tree_type[type]);
return info.length === 0 ? strings.bot.common.filters.none : info.join(', ');
return info.length === 0 ? strings.bot.common.filters.none : info.join(", ");
}
+17 -17
View File
@@ -1,13 +1,13 @@
import { numberToRomanNumeral } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { numberToRomanNumeral } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import {
APIApplicationCommandOptionChoice,
Locale,
SlashCommandStringOption,
} from 'discord.js';
import { range } from 'lodash-es';
import { translator } from '../localization/translator';
import { localizationObject } from './localizationObject';
} from "discord.js";
import { range } from "lodash-es";
import { translator } from "../localization/translator";
import { localizationObject } from "./localizationObject";
export function addTierChoices(option: SlashCommandStringOption) {
const { strings } = translator(Locale.EnglishUS);
@@ -18,30 +18,30 @@ export function addTierChoices(option: SlashCommandStringOption) {
localizationObject(
(strings) => strings.bot.common.options.tier.name,
undefined,
true,
),
true
)
)
.setDescription(strings.bot.common.options.tier.description)
.setDescriptionLocalizations(
localizationObject(
(strings) => strings.bot.common.options.tier.description,
),
(strings) => strings.bot.common.options.tier.description
)
)
.setChoices(
...range(10, 0).map(
(tier) =>
({
name: literals(strings.bot.common.options.tier.choices.tier, [
`${tier}`,
numberToRomanNumeral(tier),
]),
name: literals(strings.bot.common.options.tier.choices.tier, {
tier_1: tier,
tier_2: numberToRomanNumeral(tier),
}),
value: `${tier}`,
name_localizations: localizationObject(
(strings) => strings.bot.common.options.tier.choices.tier,
[`${tier}`, numberToRomanNumeral(tier)],
{ tier_1: tier, tier_2: numberToRomanNumeral(tier) }
),
}) satisfies APIApplicationCommandOptionChoice,
),
}) satisfies APIApplicationCommandOptionChoice
)
)
.setRequired(true);
}
@@ -1,11 +1,11 @@
import { literals } from '@blitzkit/i18n';
import { Locale } from 'discord.js';
import { translator } from '../localization/translator';
import { PeriodSize } from './addPeriodSubCommands';
import { literals } from "@blitzkit/i18n";
import { Locale } from "discord.js";
import { translator } from "../localization/translator";
import { PeriodSize } from "./addPeriodSubCommands";
export function getPeriodOptionName(period: PeriodSize, locale: Locale) {
const { strings } = translator(locale);
if (period === 'career') return strings.bot.common.periods.career;
if (period === 'today') return strings.bot.common.periods.today;
return literals(strings.bot.common.periods.days, [period]);
if (period === "career") return strings.bot.common.periods.career;
if (period === "today") return strings.bot.common.periods.today;
return literals(strings.bot.common.periods.days, { days: period });
}
@@ -1,15 +1,15 @@
import { BlitzKitStrings, literals as literalsFunc } from '@blitzkit/i18n';
import { Locale } from 'discord.js';
import { SUPPORTED_LOCALES_DISCORD } from '../localization/strings/constants';
import { translator } from '../localization/translator';
import { BlitzKitStrings, literals as literalsFunc } from "@blitzkit/i18n";
import { Locale } from "discord.js";
import { SUPPORTED_LOCALES_DISCORD } from "../localization/strings/constants";
import { translator } from "../localization/translator";
const validNameRegex =
/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u;
export function localizationObject(
path: (strings: BlitzKitStrings) => string,
literals: string[] = [],
strict = false,
literals?: Record<string, string | number>,
strict = false
) {
return SUPPORTED_LOCALES_DISCORD.reduce<Partial<Record<Locale, string>>>(
(localizations, locale) => {
@@ -20,7 +20,7 @@ export function localizationObject(
if (!isValid) {
console.warn(
`Invalid localization for ${locale} (${path}): ${translation}; skipping...`,
`Invalid localization for ${locale} (${path}): ${translation}; skipping...`
);
return localizations;
}
@@ -30,6 +30,6 @@ export function localizationObject(
[locale]: translation,
};
},
{},
{}
);
}
@@ -1,35 +1,35 @@
import { Region } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { ChatInputCommandInteraction } from 'discord.js';
import markdownEscape from 'markdown-escape';
import { searchClansAcrossRegionsBotWrapper } from '../blitz/searchClansAcrossRegionsBotWrapper';
import { UserError } from '../blitzkit/userError';
import { translator } from '../localization/translator';
import { Region } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { ChatInputCommandInteraction } from "discord.js";
import markdownEscape from "markdown-escape";
import { searchClansAcrossRegionsBotWrapper } from "../blitz/searchClansAcrossRegionsBotWrapper";
import { UserError } from "../blitzkit/userError";
import { translator } from "../localization/translator";
export const serverAndIdPattern = /(com|eu|asia)\/[0-9]+/;
export async function resolveClanFromCommand(
interaction: ChatInputCommandInteraction,
interaction: ChatInputCommandInteraction
) {
const { strings } = translator(interaction.locale);
const clan = interaction.options.getString('clan', true);
const clan = interaction.options.getString("clan", true);
if (serverAndIdPattern.test(clan)) {
const [server, accountId] = clan.split('/');
const [server, accountId] = clan.split("/");
return { region: server as Region, id: Number(accountId) };
} else {
const accounts = await searchClansAcrossRegionsBotWrapper(
clan,
interaction.locale,
interaction.locale
);
if (accounts[0]) {
return { region: accounts[0].region, id: accounts[0].clan_id };
} else {
throw new UserError(
literals(strings.bot.common.errors.clan_not_found, [
markdownEscape(clan),
]),
literals(strings.bot.common.errors.clan_not_found, {
search: markdownEscape(clan),
})
);
}
}
@@ -1,11 +1,11 @@
import { getTimeDaysAgo, Region } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
import { getPeriodNow } from '../blitzkit/getPeriodNow';
import { getPeriodStart } from '../blitzkit/getPeriodStart';
import { translator } from '../localization/translator';
import { PeriodType } from './addPeriodSubCommands';
import { getPeriodOptionName } from './getPeriodOptionName';
import { getTimeDaysAgo, Region } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { CacheType, ChatInputCommandInteraction } from "discord.js";
import { getPeriodNow } from "../blitzkit/getPeriodNow";
import { getPeriodStart } from "../blitzkit/getPeriodStart";
import { translator } from "../localization/translator";
import { PeriodType } from "./addPeriodSubCommands";
import { getPeriodOptionName } from "./getPeriodOptionName";
export interface ResolvedPeriod {
name: string;
@@ -16,7 +16,7 @@ export interface ResolvedPeriod {
export function resolvePeriodFromCommand(
region: Region,
interaction: ChatInputCommandInteraction<CacheType>,
forcedPeriod?: PeriodType,
forcedPeriod?: PeriodType
) {
const { strings } = translator(interaction.locale);
let name: string;
@@ -26,16 +26,16 @@ export function resolvePeriodFromCommand(
? forcedPeriod
: (interaction.options.getSubcommand() as PeriodType);
if (periodSubcommand === 'custom') {
const startOption = interaction.options.getInteger('start', true);
const endOption = interaction.options.getInteger('end', true);
if (periodSubcommand === "custom") {
const startOption = interaction.options.getInteger("start", true);
const endOption = interaction.options.getInteger("end", true);
const startDaysAgoMin = Math.min(startOption, endOption);
const endDaysAgoMax = Math.max(startOption, endOption);
name = literals(strings.bot.common.periods.custom, [
`${startDaysAgoMin}`,
`${endDaysAgoMax}`,
]);
name = literals(strings.bot.common.periods.custom, {
day_1: startDaysAgoMin,
day_2: endDaysAgoMax,
});
start = getTimeDaysAgo(region, endDaysAgoMax);
end = getTimeDaysAgo(region, startDaysAgoMin);
} else {
@@ -1,11 +1,11 @@
import { idToRegion, Region } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
import markdownEscape from 'markdown-escape';
import { searchPlayersAcrossRegionsBotWrapper } from '../../blitz/searchPlayersAcrossRegionsBotWrapper';
import { getBlitzFromDiscord } from '../../blitzkit/getBlitzFromDiscord';
import { UserError } from '../../blitzkit/userError';
import { translator } from '../../localization/translator';
import { idToRegion, Region } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { CacheType, ChatInputCommandInteraction } from "discord.js";
import markdownEscape from "markdown-escape";
import { searchPlayersAcrossRegionsBotWrapper } from "../../blitz/searchPlayersAcrossRegionsBotWrapper";
import { getBlitzFromDiscord } from "../../blitzkit/getBlitzFromDiscord";
import { UserError } from "../../blitzkit/userError";
import { translator } from "../../localization/translator";
export interface ResolvedPlayer {
region: Region;
@@ -13,10 +13,10 @@ export interface ResolvedPlayer {
}
export async function resolvePlayerFromCommand(
interaction: ChatInputCommandInteraction<CacheType>,
interaction: ChatInputCommandInteraction<CacheType>
) {
const { strings } = translator(interaction.locale);
const commandUsername = interaction.options.getString('username');
const commandUsername = interaction.options.getString("username");
if (commandUsername !== null) {
const id = parseInt(commandUsername);
@@ -27,7 +27,7 @@ export async function resolvePlayerFromCommand(
} else {
const accounts = await searchPlayersAcrossRegionsBotWrapper(
commandUsername,
interaction.locale,
interaction.locale
);
if (accounts[0]) {
@@ -37,9 +37,9 @@ export async function resolvePlayerFromCommand(
} satisfies ResolvedPlayer;
} else {
throw new UserError(
literals(strings.bot.common.errors.player_not_found, [
markdownEscape(commandUsername),
]),
literals(strings.bot.common.errors.player_not_found, {
search: markdownEscape(commandUsername),
})
);
}
}
+2 -2
View File
@@ -1,4 +1,4 @@
export function assertSecret(secret?: string) {
if (secret === undefined) throw new Error('Missing secret');
export function assertSecret<Type>(secret?: Type) {
if (secret === undefined) throw new Error("Missing secret");
return secret;
}
+2 -5
View File
@@ -1,10 +1,7 @@
import { asset } from '@blitzkit/core';
import { asset } from "@blitzkit/core";
export const BLITZKIT_TANK_ICON_SIZE = { width: 40 * 16, height: 30 * 16 };
export function tankIcon(
id: number,
size: 'big' | 'small' | 'blitzkit' = 'blitzkit',
) {
export function tankIcon(id: number, size: "big" | "small" = "big") {
return asset(`icons/tanks/${size}/${id}.webp`);
}
+19 -4
View File
@@ -1,5 +1,20 @@
export function literals(string: string, literals: string[]) {
return literals.reduce((accumulator, literal, index) => {
return accumulator.replace(`%s${index + 1}`, literal);
}, string);
import { assertSecret } from "@blitzkit/core";
const dev = assertSecret(import.meta.env.DEV);
export function literals(
string: string,
literals?: Record<string, string | number | undefined>
) {
for (const key in literals) {
const mutated = string.replaceAll(`{${key}}`, `${literals[key]}`);
if (dev && mutated === string) {
console.warn(`Could not find literal {${key}} in string "${string}"`);
}
string = mutated;
}
return string;
}
+76 -95
View File
@@ -1,7 +1,7 @@
{
"test": {
"default": "test",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is %s1 because it has the color of %s2. I like it so much that I will say its name 3 times! %s1! %s1! %s1! Once again, it's %s2, not %s3.",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.",
"fox": "The quick brown fox jumps over the lazy dog."
},
@@ -9,13 +9,13 @@
"name": "BlitzKit",
"units": {
"m": "%s1m",
"mm": "%s1mm",
"deg": "%s1°",
"hp": "%s1hp",
"x": "x%s1",
"percentage": "%s1%",
"deg_s": "%s1°/s"
"m": "{value}m",
"mm": "{value}mm",
"deg": "{value}°",
"hp": "{value}hp",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}°/s"
},
"gun_types": {
@@ -206,11 +206,11 @@
"bot": {
"common": {
"errors": {
"clan_not_found": "# Could not find clan\nCouldn't find \"%s1\". Try selecting a clan from the search result.",
"player_not_found": "# Could not find user\nI couldn't find user \"%s1\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
"player_not_linked": "# Use `/link` to get started\nI don't know who you are but you can tell me today!",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"%s1\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"%s1\". Try typing the name of the tank instead of a number.",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.",
"no_tank_stats": "# No tank stats available\nThis player doesn't have any stats available. This may not be the player you are looking for.",
"get_help": "Help Discord server",
"uncaught_error": "# BlitzKit ran into an error!\nWe're so sorry about this. Feel free to [join the official Discord server](https://discord.gg/nDt7AjGJQH) to get help.",
@@ -315,7 +315,7 @@
"description": "Tier",
"choices": {
"tier": "Tier %s1 - %s2"
"tier": "Tier {tier_1} - {tier_2}"
}
}
},
@@ -323,13 +323,13 @@
"periods": {
"career": "Career",
"today": "Today",
"days": "%s1 days",
"custom": "%s1 - %s2 days"
"days": "{days} days",
"custom": "{day_1} - {day_2} days"
},
"filters": {
"none": "No filters",
"tier": "Tier %s1"
"tier": "Tier {tier}"
},
"no_data": {
@@ -356,24 +356,6 @@
},
"commands": {
"auction": {
"name": "auction",
"description": "Tanks available right now in the auction",
"body": {
"title": "Blitz Auction",
"subtitle": "%s1 available • next prices %s2\nBid now: %s3",
"next": "Next price: %s1",
"available": "Available: %s1 / %s2"
},
"errors": {
"no_auction": "# No ongoing auction\n\nCurrently, there are no tanks available for purchase in the auction. If you think this is an error, please report this discrepancy in [the official Discord Server](https://discord.gg/nDt7AjGJQH)."
},
"actions": {
"bid": "Bid now"
}
},
"replay": {
"name": "replay",
"description": "Display replay results"
@@ -397,20 +379,20 @@
"body": {
"subtitle": "Research",
"total": "Total",
"research": "Research: %s1",
"upgrades": "Upgrades: %s1",
"purchase": "Purchase: %s1",
"equipment": "Equipment: %s1",
"research": "Research: {cost}",
"upgrades": "Upgrades: {cost}",
"purchase": "Purchase: {cost}",
"equipment": "Equipment: {cost}",
"estimation": "# This is an estimation!\n\nThis list may include already researched tanks because of the inaccurate information Wargaming provides. Try providing a `starting-tank` from the line when using the command if you can."
},
"errors": {
"non_tech_tree": "# %s1 is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# %s1 is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# %s1 is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# %s1 was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# %s1 and %s2 are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# %s1 higher tiered to %s2\n\nMake sure to provide %s3 as the `starting-tank` instead as it is the lower tiered tank."
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank."
}
},
@@ -456,7 +438,7 @@
"wn8": "WN8",
"winrate": "Winrate",
"damage": "Damage",
"unknown_tank": "Unknown tank %s1"
"unknown_tank": "Unknown tank {id}"
}
},
@@ -499,13 +481,13 @@
"options": {
"threshold": {
"name": "threshold",
"description": "The number of days inactive (default: %s1 days)"
"description": "The number of days inactive (default: {days} days)"
}
},
"body": {
"subtitle": "Inactive for %s1+ days",
"listing": "%s1 days"
"subtitle": "Inactive for {days}+ days",
"listing": "{days} days"
}
},
@@ -552,7 +534,7 @@
"body": {
"accounts_linked": "Accounts linked",
"no_role_permissions": {
"title": "%s1 failed to verify",
"title": "{name} failed to verify",
"description": "I don't have the permission to manage roles."
}
},
@@ -570,12 +552,12 @@
"options": {
"limit": {
"name": "limit",
"description": "The max number of clan results (default: %s1)"
"description": "The max number of clan results (default: {limit})"
}
},
"body": {
"title": "Clan search for %s1 in region %s2",
"title": "Clan search for {search} in region {region}",
"no_results": "No clans found"
}
},
@@ -587,12 +569,12 @@
"options": {
"limit": {
"name": "limit",
"description": "The max number of player results (default: %s1)"
"description": "The max number of player results (default: {limit})"
}
},
"body": {
"title": "Player search for %s1 in region %s2",
"title": "Player search for {search} in region {region}",
"no_results": "No players found"
}
},
@@ -616,7 +598,7 @@
"options": {
"limit": {
"name": "limit",
"description": "How many neighbors to display (default: %s1)"
"description": "How many neighbors to display (default: {count})"
},
"season": {
@@ -624,7 +606,7 @@
"description": "Season number (default: current)",
"choices": {
"current": "%s1 (current)"
"current": "{season} (current)"
}
},
@@ -635,12 +617,12 @@
},
"body": {
"top_players": "Top %s1 players",
"no_participation": "# %s1 didn't play rating in season %s2\n\nThis player did not participate in this season or did not get past calibration.",
"top_players": "Top {count} players",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.",
"no_ongoing_season": "# No ongoing season\n\nThere isn't a currently running rating season.",
"deleted_player": "Deleted %s1",
"deleted_player": "Deleted {id}",
"neighbors": "Rating neighbors",
"more": "+ %s1 more"
"more": "+ {count} more"
}
},
@@ -659,7 +641,7 @@
"description": "Shows all own tanks in a tier",
"body": {
"title": "# %s1's owned tier %s2 tanks\n\n"
"title": "# {name}'s owned tier {tier} tanks\n\n"
}
},
@@ -668,7 +650,7 @@
"description": "Checks wether the bot has the required permissions to function",
"body": {
"title": "# Permissions\n\n%s1",
"title": "# Permissions\n\n{body}",
"view_channels": "View channels: needed to find the message the refresh button was used on",
"read_message_history": "Read message history: needed to find the message to refresh",
"attach_files": "Attach files: needed to add images to image-based commands",
@@ -682,7 +664,7 @@
"body": {
"pong": "Pong 🏓",
"pong_with_time": "Pong 🏓 - %s1ms"
"pong_with_time": "Pong 🏓 - {time}ms"
},
"subcommands": {
@@ -702,7 +684,7 @@
"description": "Basic information about a player",
"body": {
"title": "%s1's information",
"title": "{name}'s information",
"nickname": "Nickname",
"battles": "Battles",
"winrate": "Winrate",
@@ -735,7 +717,7 @@
},
"errors": {
"no_participation": "# %s1 hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"unrecorded_stats": "# Statistics currently unavailable\n\nWargaming may be currently be facing server downtime. If there is an on-going season, statistics should be available withing 24 hours."
}
}
@@ -768,12 +750,13 @@
"select_dialog_title": "Search for tanks",
"swap_dialog_title": "Swap tank",
"clear_filters": "Clear filters",
"login": "Login to use this",
"search_bar_hint": "Search tanks...",
"recent": "Recently viewed",
"select_all": "Select all",
"count_singular": "1 tank",
"count_plural": "%s1 tanks",
"sorting_by": "Sorting by %s1",
"count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}",
"no_tanks_found": {
"body": "No tanks found.",
"search_again": "Try searching again.",
@@ -853,16 +836,16 @@
},
"hero": {
"credit": "By %s1 ❤️"
"credit": "By {name} ❤️"
},
"hot_tanks": {
"title": "Popular tanks",
"subtitle": "Last %s1 days"
"subtitle": "Last {days} days"
},
"other_projects": {
"title": "Other cool projects"
},
"help_translate": "Please help translate %s1 to %s2!",
"help_translate": "Please help translate {name} to {language}!",
"seo_description": "Tools for everything World of Tanks Blitz"
},
@@ -895,7 +878,7 @@
"next": "Next",
"no_results": "No results"
},
"stats": "%s1 / %s2 guessed correctly"
"stats": "{correct} / {total} guessed correctly"
},
"tankopedia": {
@@ -905,8 +888,8 @@
"button": "Find tanks",
"description": "Blitz tank encyclopedia",
"seo_description": "Statistics, armor, and more for all tanks in World of Tanks Blitz",
"tank_seo_title": "%s1 - Tier %s2 %s3 %s4 | %s5 Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "%s1 armor, statistics, equipment, provisions, and more. %s2 DPM, %s3hp alpha, %s4mm penetration, %s5kph top speed, %s6hp health.",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "{name} armor, statistics, equipment, provisions, and more. {dpm} DPM, {alpha}hp alpha, {penetration}mm penetration, {speed}kph top speed, {health}hp health.",
"visualizers": {
"reload": {
@@ -936,7 +919,6 @@
"view_range": {
"camo": "Camo",
"percentage": "%s1%",
"ghost_factory": "Ghost Factory",
"dead_rail": "Dead Rail"
},
@@ -987,7 +969,6 @@
},
"advanced": "Advanced highlighting",
"shooter": "Shooter:",
"shot_card": {
"element": {
@@ -999,15 +980,15 @@
"track": "Tracks"
},
"status": {
"penetration": "%s1hp penetration",
"penetration": "{damage}hp penetration",
"blocked": "Blocked",
"ricochet": "Ricochet",
"splash": "%s1hp splash"
"splash": "{damage}hp splash"
},
"stats": {
"thickness_and_angle": "%s1mm %s2°",
"nominal": "%s1mm nominal",
"ricochet_loss": "%s1% penetration"
"thickness_and_angle": "{thickness}mm {angle}°",
"nominal": "{thickness}mm nominal",
"ricochet_loss": "{loss}% penetration"
}
}
},
@@ -1047,8 +1028,8 @@
"tech_tree": {
"title": "Tech tree",
"battle": "1 battle",
"battles": "%s1 battles",
"route": "Route %s1 of %s2"
"battles": "{count} battles",
"route": "Route {index} of {count}"
},
"game_modes": {
@@ -1057,7 +1038,7 @@
"review": {
"title": "Review videos",
"join": "Apply to %s1 YouTuber program"
"join": "Apply to {name} YouTuber program"
},
"configuration": {
@@ -1096,15 +1077,15 @@
"title": "Characteristics",
"compare": {
"label": "Compare",
"class": "Tier %s1 %s2",
"tier": "All of tier %s1",
"class": "Tier {tier} {class}",
"tier": "All of tier {tier}",
"all": "All tanks"
},
"values": {
"shell_index": "Shell %s1",
"at_distance": "At %s1m",
"shell_index": "Shell {index}",
"at_distance": "At {distance}m",
"at_distance_slider_label": "Distance",
"dispersion_at_distance": "Dispersion at %s1m",
"dispersion_at_distance": "Dispersion at {distance}m",
"gun_flexibility": "Gun flexibility",
"speed": "Speed",
"terrain_coefficients": "Terrain coefficients",
@@ -1260,9 +1241,9 @@
"description": "Tank performance statistics",
"seo_description": "Best tanks and their performances in World of Tanks Blitz",
"estimation": {
"body": "Estimated stats based on %s1 players. Updated %s2 ago.",
"hours": "%s1 hours",
"minutes": "%s1 minutes"
"body": "Estimated stats based on {count} players. Updated {age} ago.",
"hours": "{count} hours",
"minutes": "{count} minutes"
},
"player_count": {
"label": "Player count"
@@ -1294,10 +1275,10 @@
"button": "Browse all",
"description": "Blitz player avatars",
"seo_description": "All World of Tanks Blitz player avatars",
"last_updated": "Last updated on %s1",
"last_updated": "Last updated on {time}",
"search": {
"hint": "Search avatars...",
"results": "%s1 avatars"
"results": "{count} avatars"
}
},
"session": {
@@ -1312,8 +1293,8 @@
"no_results": "No players found"
},
"controls": {
"title": "Tracking %s1",
"subtitle": "Since %s1",
"title": "Tracking {name}",
"subtitle": "Since {time}",
"reset": "Reset",
"change": "Change"
},
@@ -1376,7 +1357,7 @@
"cancel": "Cancel",
"success": {
"title": "Copy URL",
"info": "Generated the URL for %s1. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"info": "Generated the URL for {name}. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"back": "Back",
"copy": "Copy URL"
}
+76 -93
View File
@@ -1,19 +1,19 @@
{
"test": {
"default": "test",
"long": "Esta es una cadena de prueba larga. NO DEBES verla NUNCA en la interfaz de usuario. Mi fruta favorita es %s1 porque tiene el color %s2. ¡Me gusta tanto que diré su nombre 3 veces! ¡ %s1! ¡ %s1! ¡ %s1! Una vez más, es %s2, no %s3.",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.",
"fox": "El rápido zorro marrón salta sobre el perro perezoso."
},
"common": {
"name": "BlitzKit",
"units": {
"m": "%s1m",
"mm": "%s1mm",
"deg": "%s1°",
"hp": "%s1pv",
"x": "x%s1",
"percentage": "%s1%",
"deg_s": "%s1°/s"
"m": "{value}m",
"mm": "{value}mm",
"deg": "{value}°",
"hp": "{value}hp",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}°/s"
},
"gun_types": {
"auto_loader": "Auto cargador",
@@ -186,11 +186,11 @@
"bot": {
"common": {
"errors": {
"clan_not_found": "# No se pudo encontrar el clan\nNo se pudo encontrar \"%s\". Prueba seleccionando un clan de los resultados de búsqueda.",
"player_not_found": "# No se pudo encontrar el usuario\nNo pude encontrar al usuario \"%s\". Prueba eligiendo un usuario de los resultados de búsqueda, escribiendo un nombre de usuario aceptable o usando el comando `/vincular`.",
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
"player_not_linked": "# Usa `/vincular` para empezar\n¡No sé quién eres, pero puedes decírmelo hoy!",
"tank_name_not_found": "# No se pudo encontrar el tanque\nNo se pudo encontrar el tanque con el nombre \"%s\".",
"tank_id_not_found": "# Tanque no encontrado\nNo se pudo encontrar al tanque del ID \"%s\". Prueba escribiendo el nombre del tanque en vez de un número.",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.",
"no_tank_stats": "# No hay estadísticas de tanque disponibles\nEste jugador no tiene estadísticas disponibles. Este podría no ser el jugador que estás buscando.",
"get_help": "Servidor de ayuda de Discord",
"uncaught_error": "# ¡Blitzkrieg sufrió un error!\nLo sentimos mucho. Siéntete libre de [unirte al servidor oficial de Discord](https://discord.gg/nDt7AjGJQH) para obtener ayuda.",
@@ -284,19 +284,19 @@
"name": "tier",
"description": "Nivel",
"choices": {
"tier": "Nivel %s - %s"
"tier": "Tier {tier_1} - {tier_2}"
}
}
},
"periods": {
"career": "Carrera",
"today": "Hoy",
"days": "%s días",
"custom": "%s - %s días"
"days": "{days} days",
"custom": "{day_1} - {day_2} days"
},
"filters": {
"none": "Sin filtros",
"tier": "Nivel %s"
"tier": "Tier {tier}"
},
"no_data": {
"battles_in_period": "No hay batallas jugadas en este período",
@@ -319,22 +319,6 @@
}
},
"commands": {
"auction": {
"name": "subasta",
"description": "Tanques disponibles ahora mismo en la subasta",
"body": {
"title": "Subasta Blitz",
"subtitle": "%s disponible • siguientes precios %s\nPujar ahora: %s",
"next": "Siguiente precio: %s",
"available": "Disponible: %s / %s"
},
"errors": {
"no_auction": "# No hay ninguna subasta\nActualmente no hay tanques disponibles para comprar en la subasta. Si crees que esto es un error, por favor, reporta esta discrepancia en [el servidor oficial de Discord](https://discord.gg/nDt7AjGJQH)."
},
"actions": {
"bid": "Pujar ahora"
}
},
"replay": {
"name": "repetición",
"description": "Mostrar resultados de la repetición"
@@ -355,19 +339,19 @@
"body": {
"subtitle": "Investigar",
"total": "Total",
"research": "Investigar: %s",
"upgrades": "Mejoras: %s",
"purchase": "Comprar: %s",
"equipment": "Equipamiento: %s",
"research": "Research: {cost}",
"upgrades": "Upgrades: {cost}",
"purchase": "Purchase: {cost}",
"equipment": "Equipment: {cost}",
"estimation": "# ¡Esto es una estimación!\n\nEsta lista podría incluir tanques ya investigados debido a la información errónea que proporciona Wargaming. Si puedes, prueba proporcionando un `tanque-inicial` de la línea al usar el comando."
},
"errors": {
"non_tech_tree": "# %s no está en el árbol tecnológico\n\nNo puedes investigar un tanque prémium o coleccionista.",
"tier_1": "# %s es un nivel I\n\nLos tanque de nivel I están siempre desbloqueados gratuitamente para todos los jugadores.",
"already_researched": "# %s ya está investigado\n\nPrueba proporcionando un `tanque-inicial` al usar el comando para ver los totales para una línea que ya has investigado.",
"start_end_equal": "# %s fue proporcionado dos veces\n\nAsegúrate de que `tanque-inicial` y `tanque-objetivo` son diferentes.",
"tanks_not_on_line": "# %s y %s no están en la misma línea\n\nAsegúrate de que `tanque-inicial` y `tanque-objetivo` están en la misma línea del árbol tecnológico.",
"unordered": "# %s de nivel superior a %s\n\nAsegúrate de proporcionar %s como el `tanque-inicial` en su lugar ya que es el tanque de nivel inferior."
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank."
}
},
"about": {
@@ -410,7 +394,7 @@
"wn8": "WN8",
"winrate": "Tasa de victorias",
"damage": "Daño",
"unknown_tank": "Tanque desconocido %s"
"unknown_tank": "Unknown tank {id}"
}
},
"debug": {
@@ -446,12 +430,12 @@
"options": {
"threshold": {
"name": "umbral",
"description": "El número de días inactivo (predeterminado: %s días)"
"description": "The number of days inactive (default: {days} days)"
}
},
"body": {
"subtitle": "Inactivo por %s+ días",
"listing": "%s días"
"subtitle": "Inactive for {days}+ days",
"listing": "{days} days"
}
},
"full_stats": {
@@ -494,7 +478,7 @@
"body": {
"accounts_linked": "Cuentas vinculadas",
"no_role_permissions": {
"title": "%s1 no se pudo verificar",
"title": "{name} failed to verify",
"description": "No tengo permiso para administrar roles."
}
},
@@ -509,11 +493,11 @@
"options": {
"limit": {
"name": "límite",
"description": "El número máximo de resultados de clanes (predeterminado: %s)"
"description": "The max number of clan results (default: {limit})"
}
},
"body": {
"title": "Búsqueda del clan %s en la región %s",
"title": "Clan search for {search} in region {region}",
"no_results": "No se encontraron clanes"
}
},
@@ -523,11 +507,11 @@
"options": {
"limit": {
"name": "límite",
"description": "El número máximo para resultados de jugador (predeterminado: %s)"
"description": "The max number of player results (default: {limit})"
}
},
"body": {
"title": "Búsqueda del jugador %s en la región %s",
"title": "Player search for {search} in region {region}",
"no_results": "No se encontraron jugadores"
}
},
@@ -547,13 +531,13 @@
"options": {
"limit": {
"name": "limite",
"description": "Cuántos vecinos a mostrar (predeterminado: %s)"
"description": "How many neighbors to display (default: {count})"
},
"season": {
"name": "temporada",
"description": "Número de temporada (predeterminado: actual)",
"choices": {
"current": "%s (actual)"
"current": "{season} (current)"
}
},
"league": {
@@ -562,12 +546,12 @@
}
},
"body": {
"top_players": "Mejores %s jugadores",
"no_participation": "# %s no jugó clasificatoria en la temporada %s\n\nEste jugador no participó en esta temporada o no pasó de la calibración.",
"top_players": "Top {count} players",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.",
"no_ongoing_season": "# No hay temporada en curso\n\nActualmente no hay ninguna temporada de clasificatoria.",
"deleted_player": "%s eliminado",
"deleted_player": "Deleted {id}",
"neighbors": "Vecinos de clasificatoria",
"more": "+ %s más"
"more": "+ {count} more"
}
},
"today": {
@@ -582,14 +566,14 @@
"name": "tanques en propiedad",
"description": "Muestra todos los tanques propios en un nivel",
"body": {
"title": "# Tanques de %s de nivel %s\n\n"
"title": "# {name}'s owned tier {tier} tanks\n\n"
}
},
"permissions": {
"name": "permisos",
"description": "Comprueba si el bot tiene los permisos requeridos para funcionar",
"body": {
"title": "# Permisos\n\n%s",
"title": "# Permissions\n\n{body}",
"view_channels": "Ver canales: necesario para encontrar el mensaje en el cual el botón \"actualizar\" fue usado",
"read_message_history": "Leer historial de mensajes: necesario para encontrar el mensaje a actualizar",
"attach_files": "Adjuntar archivos: necesario para añadir imágenes a los comandos basados en estas",
@@ -601,7 +585,7 @@
"description": "Comprueba si el bot está vivo.",
"body": {
"pong": "Pong 🏓",
"pong_with_time": "Pong 🏓 - %s1ms"
"pong_with_time": "Pong 🏓 - {time}ms"
},
"subcommands": {
"blitzkit": {
@@ -618,7 +602,7 @@
"name": "info del jugador",
"description": "Información básica sobre un jugador",
"body": {
"title": "Información de %s",
"title": "{name}'s information",
"nickname": "Apodo",
"battles": "Batallas",
"winrate": "Tasa de victorias",
@@ -647,7 +631,7 @@
}
},
"errors": {
"no_participation": "# %s no ha jugado clasificatoria\n\nEste jugador no ha participado en el modo clasificatoria esta temporada.",
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"unrecorded_stats": "# Estadísticas no disponibles actualmente\n\nWargaming podría estar sufriendo una caída del servidor. Si hay alguna temporada en curso, las estadísticas deberían estar disponibles en 24 horas."
}
}
@@ -675,12 +659,13 @@
"select_dialog_title": "Search for tanks",
"swap_dialog_title": "Swap tank",
"clear_filters": "Clear filters",
"login": "Login to use this",
"search_bar_hint": "Buscar tanques...",
"recent": "Visto recientemente",
"select_all": "Seleccionar todo",
"count_singular": "1 tanque",
"count_plural": "%s1 tanques",
"sorting_by": "Ordenar por %s1",
"count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}",
"no_tanks_found": {
"body": "No se encontraron tanques.",
"search_again": "Intenta buscar de nuevo.",
@@ -756,16 +741,16 @@
"action": "Discord"
},
"hero": {
"credit": "Por %s1 ❤️"
"credit": "By {name} ❤️"
},
"hot_tanks": {
"title": "Tanques populares",
"subtitle": "Últimos %s1 días"
"subtitle": "Last {days} days"
},
"other_projects": {
"title": "Otros proyectos interesantes"
},
"help_translate": "¡Por favor ayuda a traducir %s1 a %s2!",
"help_translate": "Please help translate {name} to {language}!",
"seo_description": "Herramientas para todo lo que es World of Tanks Blitz"
},
"docs": {
@@ -795,7 +780,7 @@
"next": "Next",
"no_results": "Sin resultados"
},
"stats": "%s1 / %s2 guessed correctly"
"stats": "{correct} / {total} guessed correctly"
},
"tankopedia": {
"search": "Search a stat...",
@@ -803,8 +788,8 @@
"button": "Encuentra tanques",
"description": "Enciclopedia de tanques de WOTB",
"seo_description": "Estadísticas, armaduras y más para todos los tanques en World of Tanks Blitz",
"tank_seo_title": "%s1 - Nivel %s2 %s3 %s4 | %s5 Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "%s1 blindaje, estadisticas, equipamiento, proviciones y mas.\n%s2 DPM, %3hp alfa, %s4mm penetracion, %s5kph velocidad maxima, %s6 hp salud",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "{name} armor, statistics, equipment, provisions, and more. {dpm} DPM, {alpha}hp alpha, {penetration}mm penetration, {speed}kph top speed, {health}hp health.",
"visualizers": {
"reload": {
"skip": "Skip"
@@ -829,7 +814,6 @@
},
"view_range": {
"camo": "Camo",
"percentage": "%s1%",
"ghost_factory": "Ghost Factory",
"dead_rail": "Dead Rail"
},
@@ -873,7 +857,6 @@
"reset": "Restablecer"
},
"advanced": "Resaltado avanzado",
"shooter": "Tirador:",
"shot_card": {
"element": {
"primary": "Primario",
@@ -884,15 +867,15 @@
"track": "Orugas"
},
"status": {
"penetration": "%s1pv penetracion",
"penetration": "{damage}hp penetration",
"blocked": "Bloqueado",
"ricochet": "Rebote",
"splash": "%s1pv splash"
"splash": "{damage}hp splash"
},
"stats": {
"thickness_and_angle": "%s1mm %s2°",
"nominal": "%s1mm nominal",
"ricochet_loss": "%s1% penetracion"
"thickness_and_angle": "{thickness}mm {angle}°",
"nominal": "{thickness}mm nominal",
"ricochet_loss": "{loss}% penetration"
}
}
},
@@ -930,15 +913,15 @@
"tech_tree": {
"title": "Árbol tecnológico",
"battle": "1 batalla",
"battles": "%s1 batallas",
"route": "Ruta %s1 de %s2"
"battles": "{count} battles",
"route": "Route {index} of {count}"
},
"game_modes": {
"title": "Habilidades del modo de juego"
},
"review": {
"title": "Vídeos de reseña",
"join": "Aplica para el programa de YouTube de %s1"
"join": "Apply to {name} YouTuber program"
},
"configuration": {
"title": "",
@@ -974,15 +957,15 @@
"title": "Características",
"compare": {
"label": "Comparar con",
"class": "Nivel %s1 - %s2",
"tier": "Todos de nivel %s1",
"class": "Tier {tier} {class}",
"tier": "All of tier {tier}",
"all": "Todos los tanques"
},
"values": {
"shell_index": "Proyectil %s1",
"at_distance": "A %s1m",
"shell_index": "Shell {index}",
"at_distance": "At {distance}m",
"at_distance_slider_label": "Distancia",
"dispersion_at_distance": "Dispersión a %s1m",
"dispersion_at_distance": "Dispersion at {distance}m",
"gun_flexibility": "Flexibilidad del arma",
"speed": "Velocidad",
"terrain_coefficients": "Coeficientes de terreno",
@@ -1131,9 +1114,9 @@
"description": "Estadísticas de rendimiento del tanque",
"seo_description": "Los mejores tanques y su rendimiento en World of Tanks Blitz",
"estimation": {
"body": "Estadísticas estimadas basadas en %s1 jugadores. Actualizado hace %s2.",
"hours": "%s1 horas",
"minutes": "%s1 minutos"
"body": "Estimated stats based on {count} players. Updated {age} ago.",
"hours": "{count} hours",
"minutes": "{count} minutes"
},
"player_count": {
"label": "Contador de jugadores"
@@ -1165,10 +1148,10 @@
"button": "Explorar todo",
"description": "Avatares para los jugadores de WOTB",
"seo_description": "Todos los avatares del jugador en World of Tanks Blitz",
"last_updated": "Última actualización el %s1",
"last_updated": "Last updated on {time}",
"search": {
"hint": "Buscar avatares...",
"results": "%s1 avatares"
"results": "{count} avatars"
}
},
"session": {
@@ -1183,8 +1166,8 @@
"no_results": "No se encontraron jugadores"
},
"controls": {
"title": "Siguiendo a %s1",
"subtitle": "Desde %s1",
"title": "Tracking {name}",
"subtitle": "Since {time}",
"reset": "Restablecer",
"change": "Change"
},
@@ -1244,7 +1227,7 @@
"cancel": "Cancelar",
"success": {
"title": "Copiar URL",
"info": "Se generó la URL para %s1. El embebido comenzará a rastrear tan pronto como se pegue. Restablece en cualquier momento haciendo clic derecho en PC o manteniendo presionado en móvil y luego seleccionando \"Restablecer\".",
"info": "Generated the URL for {name}. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"back": "Volver",
"copy": "Copiar URL"
}
+76 -93
View File
@@ -1,19 +1,19 @@
{
"test": {
"default": "teste",
"long": "Ceci est une longue chaîne de test. Vous ne DEVEZ JAMAIS le voir dans l'interface utilisateur. Mon fruit préféré est %s1, car il a la couleur %s2. Je l'aime tellement que je vais dire son nom 3 fois ! %s1! %s1! %s1 ! Encore une fois, c'est %s2, pas %s3.",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.",
"fox": "Le renard brun et rapide saute par-dessus le chien paresseux."
},
"common": {
"name": "BlitzKit",
"units": {
"m": "%s1m",
"mm": "%s1mm",
"deg": "%s1°",
"hp": "%s1ps",
"x": "x%s1",
"percentage": "%s1%",
"deg_s": "%s1°/s"
"m": "{value}m",
"mm": "{value}mm",
"deg": "{value}°",
"hp": "{value}hp",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}°/s"
},
"gun_types": {
"auto_loader": "Chargement auto",
@@ -186,11 +186,11 @@
"bot": {
"common": {
"errors": {
"clan_not_found": "# Impossible de trouver le clan\nImpossible de trouver «%s1 ». Essayez de sélectionner un clan dans le résultat de la recherche.",
"player_not_found": "# Impossible de trouver l'utilisateur\nJe n'ai pas pu trouver l'utilisateur \"%s1\". Essayez de choisir un utilisateur dans le résultat de la recherche, en tapant un nom d'utilisateur valide, ou en utilisant la commande `/link`.",
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
"player_not_linked": "# Utilisez `/link` pour commencer\nJe ne sais pas qui vous êtes, mais vous pouvez me le dire aujourd'hui !",
"tank_name_not_found": "Impossible de trouver le char sous le nom \"%s1\".",
"tank_id_not_found": "# Réservoir introuvable\nImpossible de trouver le char avec l'ID \"%s1\". Essayez de taper le nom du char au lieu d'un nombre.",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.",
"no_tank_stats": "# Aucune statistique de tank disponible\nCe joueur n'a pas de statistiques disponibles. Ce n'est peut-être pas le joueur que vous cherchez.",
"get_help": "Aidez le serveur Discord",
"uncaught_error": "# Blitzkit a rencontré une erreur !\nNous sommes désolés de cela. N'hésitez pas à [rejoindre le serveur officiel Discord](https://discord.gg/nDt7AjGJQH) pour obtenir de l'aide.",
@@ -284,19 +284,19 @@
"name": "rang",
"description": "Rang",
"choices": {
"tier": "Rang %s1 - %s2"
"tier": "Tier {tier_1} - {tier_2}"
}
}
},
"periods": {
"career": "Carrière",
"today": "Aujourd'hui",
"days": "%s1 jour",
"custom": "%s1 - %s2 jours"
"days": "{days} days",
"custom": "{day_1} - {day_2} days"
},
"filters": {
"none": "Aucun filtre",
"tier": "Rang %s1"
"tier": "Tier {tier}"
},
"no_data": {
"battles_in_period": "",
@@ -319,22 +319,6 @@
}
},
"commands": {
"auction": {
"name": "Char cible",
"description": "Des chars sont disponibles dès maintenant dans la vente aux enchères",
"body": {
"title": "Enchères Blitz",
"subtitle": "%s1 disponible • prochains prix %s2\nOffre : %s3",
"next": "Prochain prix : %s1",
"available": "Disponible : %s1 / %s2"
},
"errors": {
"no_auction": "# Pas de vente aux enchères\n\nActuellement, il n'y a pas de chars disponibles à l'achat dans la vente aux enchères. Si vous pensez qu'il s'agit d'une erreur, veuillez signaler cette anomalie dans [le serveur officiel Discord](https://discord.gg/nDt7AjGJQH)."
},
"actions": {
"bid": "Enchérir maintenant"
}
},
"replay": {
"name": "rejouer",
"description": "Afficher les résultats de la relecture"
@@ -355,19 +339,19 @@
"body": {
"subtitle": "Recherche",
"total": "Total",
"research": "Recherche: %s1",
"upgrades": "Améliorations : %s1",
"purchase": "Achat : %s1",
"equipment": "Equipment: %s1",
"research": "Research: {cost}",
"upgrades": "Upgrades: {cost}",
"purchase": "Purchase: {cost}",
"equipment": "Equipment: {cost}",
"estimation": "# Ceci est une estimation !\n\nCette liste peut inclure des chars déjà recherchés en raison de l'information inexacte fournie par Wargaming. Essayez de fournir un `char de départ` depuis la ligne lorsque vous utilisez la commande si vous le pouvez."
},
"errors": {
"non_tech_tree": "# %s1 n'est pas dans l'arbre technologique\n\nVous ne pouvez pas rechercher un char prenium/de collection.",
"tier_1": "# %s1 est un char de tier I\n\nLe char de tier 1 sont déverrouillé gratuitement pour tous les joueurs.",
"already_researched": "# %s1 est déjà recherché\n\nEssayez de fournir un `char de départ` en utilisant la commande pour voir la progression d'une lignée.",
"start_end_equal": "# %s1 a été fourni deux fois\n\nAssurez-vous que `starting-tank` et `target-tank` sont différents.",
"tanks_not_on_line": "%s1 et %s2 ne sont pas sur la même ligne \n\nAssurez-vous que « starting-tank » et « target-tank » sont sur la même ligne d'arbre technologique.",
"unordered": "# %s1 niveau supérieur à %s2\n\nAssurez-vous de fournir %s3 comme le `starting-tank` à la place car c'est le réservoir de niveau inférieur."
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank."
}
},
"about": {
@@ -410,7 +394,7 @@
"wn8": "WN8",
"winrate": "Taux de victoires",
"damage": "Dégâts",
"unknown_tank": "Char %s1 inconnu"
"unknown_tank": "Unknown tank {id}"
}
},
"debug": {
@@ -446,12 +430,12 @@
"options": {
"threshold": {
"name": "seuil",
"description": "Le nombre de jours inactifs (par défaut: %s1 jours)"
"description": "The number of days inactive (default: {days} days)"
}
},
"body": {
"subtitle": "Inactif depuis %s1+ de jours",
"listing": "%s1 jour"
"subtitle": "Inactive for {days}+ days",
"listing": "{days} days"
}
},
"full_stats": {
@@ -494,7 +478,7 @@
"body": {
"accounts_linked": "Comptes liés",
"no_role_permissions": {
"title": "La vérification de %s1 a échoué",
"title": "{name} failed to verify",
"description": "Je n'ai pas l'autorisation de gérer les rôles."
}
},
@@ -509,11 +493,11 @@
"options": {
"limit": {
"name": "limite",
"description": "Nombre maximum de résultats du clan (par défaut: %s1)"
"description": "The max number of clan results (default: {limit})"
}
},
"body": {
"title": "Recherche de clan %s1 dans la région %s2",
"title": "Clan search for {search} in region {region}",
"no_results": "Pas de clan trouvé"
}
},
@@ -523,11 +507,11 @@
"options": {
"limit": {
"name": "limite",
"description": "Le nombre maximum de résultats de joueur (par défaut: %s1)"
"description": "The max number of player results (default: {limit})"
}
},
"body": {
"title": "Recherche de %s1 dans la région %s2",
"title": "Player search for {search} in region {region}",
"no_results": "Pas de joueur de trouvé"
}
},
@@ -547,13 +531,13 @@
"options": {
"limit": {
"name": "limite",
"description": "Combien de voisins afficher (par défaut : %s1)"
"description": "How many neighbors to display (default: {count})"
},
"season": {
"name": "saison",
"description": "Numéro de saison (défaut : courant)",
"choices": {
"current": "%s1 (actuel)"
"current": "{season} (current)"
}
},
"league": {
@@ -562,12 +546,12 @@
}
},
"body": {
"top_players": "Top %s1 joueurs",
"no_participation": "%s1 n'a pas joué au classement dans la saison %s2",
"top_players": "Top {count} players",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.",
"no_ongoing_season": "Pas de saison en cours\n\nIl n'y a pas de saison de notation en cours actuellement.",
"deleted_player": "%s1 supprimé",
"deleted_player": "Deleted {id}",
"neighbors": "évaluer les voisins",
"more": "+ %s1 de plus"
"more": "+ {count} more"
}
},
"today": {
@@ -582,14 +566,14 @@
"name": "chars possédés",
"description": "Affiche tous les chars d'un niveau",
"body": {
"title": "# %s1 possédait des chars de rang %s2"
"title": "# {name}'s owned tier {tier} tanks\n\n"
}
},
"permissions": {
"name": "permissions",
"description": "Vérifie si le bot a les permissions nécessaires pour fonctionner",
"body": {
"title": "# Permissions\n\n%s1",
"title": "# Permissions\n\n{body}",
"view_channels": "Afficher les canaux : nécessaire pour trouver le message sur lequel le bouton d'actualisation a été utilisé",
"read_message_history": "Lire l'historique des messages : nécessaire pour trouver le message à rafraîchir",
"attach_files": "Joindre des fichiers : nécessaire pour ajouter des images à des commandes basées sur l'image",
@@ -601,7 +585,7 @@
"description": "Vérifiez si le bot est en vie.",
"body": {
"pong": "Pong 🏓",
"pong_with_time": "Pong 🏓 - %s1ms"
"pong_with_time": "Pong 🏓 - {time}ms"
},
"subcommands": {
"blitzkit": {
@@ -618,7 +602,7 @@
"name": "info-joueur",
"description": "Informations de base sur un joueur",
"body": {
"title": "Informations de %s1",
"title": "{name}'s information",
"nickname": "Nickname",
"battles": "Batailles",
"winrate": "Taux de victoires",
@@ -647,7 +631,7 @@
}
},
"errors": {
"no_participation": "# %s1 hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"unrecorded_stats": "# Statistics currently unavailable\n\nWargaming may be currently be facing server downtime. If there is an on-going season, statistics should be available withing 24 hours."
}
}
@@ -675,12 +659,13 @@
"select_dialog_title": "Search for tanks",
"swap_dialog_title": "Swap tank",
"clear_filters": "Clear filters",
"login": "Login to use this",
"search_bar_hint": "Search tanks...",
"recent": "Recently viewed",
"select_all": "Select all",
"count_singular": "1 tank",
"count_plural": "%s1 tanks",
"sorting_by": "Sorting by %s1",
"count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}",
"no_tanks_found": {
"body": "No tanks found.",
"search_again": "Try searching again.",
@@ -756,16 +741,16 @@
"action": "Discord"
},
"hero": {
"credit": "By %s1 ❤️"
"credit": "By {name} ❤️"
},
"hot_tanks": {
"title": "Popular tanks",
"subtitle": "Last %s1 days"
"subtitle": "Last {days} days"
},
"other_projects": {
"title": "Other cool projects"
},
"help_translate": "Please help translate %s1 to %s2!",
"help_translate": "Please help translate {name} to {language}!",
"seo_description": "Tools for everything World of Tanks Blitz"
},
"docs": {
@@ -795,7 +780,7 @@
"next": "Next",
"no_results": "No results"
},
"stats": "%s1 / %s2 guessed correctly"
"stats": "{correct} / {total} guessed correctly"
},
"tankopedia": {
"search": "Search a stat...",
@@ -803,8 +788,8 @@
"button": "Find tanks",
"description": "Blitz tank encyclopedia",
"seo_description": "Statistics, armor, and more for all tanks in World of Tanks Blitz",
"tank_seo_title": "%s1 - Tier %s2 %s3 %s4 | %s5 Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "%s1 armor, statistics, equipment, provisions, and more. %s2 DPM, %s3hp alpha, %s4mm penetration, %s5kph top speed, %s6hp health.",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "{name} armor, statistics, equipment, provisions, and more. {dpm} DPM, {alpha}hp alpha, {penetration}mm penetration, {speed}kph top speed, {health}hp health.",
"visualizers": {
"reload": {
"skip": "Skip"
@@ -829,7 +814,6 @@
},
"view_range": {
"camo": "Camo",
"percentage": "%s1%",
"ghost_factory": "Ghost Factory",
"dead_rail": "Dead Rail"
},
@@ -873,7 +857,6 @@
"reset": "Reset"
},
"advanced": "Advanced highlighting",
"shooter": "Shooter:",
"shot_card": {
"element": {
"primary": "Primary",
@@ -884,15 +867,15 @@
"track": "Tracks"
},
"status": {
"penetration": "%s1hp penetration",
"penetration": "{damage}hp penetration",
"blocked": "Blocked",
"ricochet": "Ricochet",
"splash": "%s1hp splash"
"splash": "{damage}hp splash"
},
"stats": {
"thickness_and_angle": "%s1mm %s2°",
"nominal": "%s1mm nominal",
"ricochet_loss": "%s1% penetration"
"thickness_and_angle": "{thickness}mm {angle}°",
"nominal": "{thickness}mm nominal",
"ricochet_loss": "{loss}% penetration"
}
}
},
@@ -930,15 +913,15 @@
"tech_tree": {
"title": "Arbre technologique",
"battle": "1 battle",
"battles": "%s1 battles",
"route": "Route %s1 of %s2"
"battles": "{count} battles",
"route": "Route {index} of {count}"
},
"game_modes": {
"title": "Game mode abilities"
},
"review": {
"title": "Review videos",
"join": "Apply to %s1 YouTuber program"
"join": "Apply to {name} YouTuber program"
},
"configuration": {
"title": "Configuration",
@@ -974,15 +957,15 @@
"title": "Characteristics",
"compare": {
"label": "Compare against",
"class": "Tier %s1 %s2",
"tier": "All of tier %s1",
"class": "Tier {tier} {class}",
"tier": "All of tier {tier}",
"all": "All tanks"
},
"values": {
"shell_index": "Shell %s1",
"at_distance": "At %s1m",
"shell_index": "Shell {index}",
"at_distance": "At {distance}m",
"at_distance_slider_label": "Distance",
"dispersion_at_distance": "Dispersion at %s1m",
"dispersion_at_distance": "Dispersion at {distance}m",
"gun_flexibility": "Gun flexibility",
"speed": "Speed",
"terrain_coefficients": "Terrain coefficients",
@@ -1131,9 +1114,9 @@
"description": "Tank performance statistics",
"seo_description": "Best tanks and their performances in World of Tanks Blitz",
"estimation": {
"body": "Estimated stats based on %s1 players. Updated %s2 ago.",
"hours": "%s1 hours",
"minutes": "%s1 minutes"
"body": "Estimated stats based on {count} players. Updated {age} ago.",
"hours": "{count} hours",
"minutes": "{count} minutes"
},
"player_count": {
"label": "Player count"
@@ -1165,10 +1148,10 @@
"button": "Browse all",
"description": "Blitz player avatars",
"seo_description": "All World of Tanks Blitz player avatars",
"last_updated": "Last updated on %s1",
"last_updated": "Last updated on {time}",
"search": {
"hint": "Search avatars...",
"results": "%s1 avatars"
"results": "{count} avatars"
}
},
"session": {
@@ -1183,8 +1166,8 @@
"no_results": "Pas de joueur de trouvé"
},
"controls": {
"title": "Tracking %s1",
"subtitle": "Since %s1",
"title": "Tracking {name}",
"subtitle": "Since {time}",
"reset": "Reset",
"change": "Change"
},
@@ -1244,7 +1227,7 @@
"cancel": "Cancel",
"success": {
"title": "Copy URL",
"info": "Generated the URL for %s1. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"info": "Generated the URL for {name}. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"back": "Back",
"copy": "Copy URL"
}
+76 -93
View File
@@ -1,19 +1,19 @@
{
"test": {
"default": "test",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is %s1 because it has the color of %s2. I like it so much that I will say its name 3 times! %s1! %s1! %s1! Once again, it's %s2, not %s3.",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.",
"fox": "すばしっこい茶色のキツネが怠け者の犬を飛び越した。"
},
"common": {
"name": "BlitzKit",
"units": {
"m": "%s1m",
"mm": "%s1mm",
"deg": "%s1°",
"hp": "%s1hp",
"x": "x%s1",
"percentage": "%s1%",
"deg_s": "%s1°/s"
"m": "{value}m",
"mm": "{value}mm",
"deg": "{value}°",
"hp": "{value}hp",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}°/s"
},
"gun_types": {
"auto_loader": "自動装填砲",
@@ -186,11 +186,11 @@
"bot": {
"common": {
"errors": {
"clan_not_found": "# クランが見つかりませんでした\n\"%s1\"は見つかりませんでした。検索結果からクランを選択してください。",
"player_not_found": "# ユーザーが見つかりませんでした\nユーザー「\"%s1\"」は見つかりませんでした。検索結果からユーザーを選択するか、有効な名前を入力してください。`/link`コマンドを使用することも可能です。",
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
"player_not_linked": "# `/link`を使用して始めましょう\nはじめまして!あなたが誰か、私に教えてください。",
"tank_name_not_found": "# 車輌が見つかりませんでした\n\"%s1\"という名前の車輌は見つかりませんでした。",
"tank_id_not_found": "# 車輌が見つかりませんでした\n\"%s1\"というIDの車輌は見つかりませんでした。番号ではなく名前で検索してください。",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.",
"no_tank_stats": "# 利用可能な車輌統計がありません\nこのプレイヤーには利用可能な統計がありません。あなたが探しているプレイヤーではない可能性があります。",
"get_help": "Discordサーバーに参加する",
"uncaught_error": "# BlitzKitがエラーに遭遇しました!\n申し訳ありません。お気軽に[公式Discordサーバー](https://discord.gg/nDt7AjGJQH)にお問い合わせください。",
@@ -284,19 +284,19 @@
"name": "tier",
"description": "Tier",
"choices": {
"tier": "Tier %s1 - %s2"
"tier": "Tier {tier_1} - {tier_2}"
}
}
},
"periods": {
"career": "Career",
"today": "Today",
"days": "%s1 days",
"custom": "%s1 - %s2 days"
"days": "{days} days",
"custom": "{day_1} - {day_2} days"
},
"filters": {
"none": "フィルターなし",
"tier": "Tier %s1"
"tier": "Tier {tier}"
},
"no_data": {
"battles_in_period": "No battles played in this period",
@@ -319,22 +319,6 @@
}
},
"commands": {
"auction": {
"name": "オークション",
"description": "現在オークションで購入可能な車輌",
"body": {
"title": "Blitzオークション",
"subtitle": "%s1 残り• 次の価格 %s2\n今すぐ入札: %s3",
"next": "次の価格: %s1",
"available": "残り: %s1 / %s2"
},
"errors": {
"no_auction": "# 進行中のオークションはありません\n現在、オークションで購入可能な車輌はありません。もしこれが間違いの場合、[公式Discardサーバー](https://discord.gg/nDt7AjGJQH)に報告してください。"
},
"actions": {
"bid": "今すぐ入札"
}
},
"replay": {
"name": "replay",
"description": "Display replay results"
@@ -355,19 +339,19 @@
"body": {
"subtitle": "Research",
"total": "トータル",
"research": "Research: %s1",
"upgrades": "Upgrades: %s1",
"purchase": "Purchase: %s1",
"equipment": "Equipment: %s1",
"research": "Research: {cost}",
"upgrades": "Upgrades: {cost}",
"purchase": "Purchase: {cost}",
"equipment": "Equipment: {cost}",
"estimation": "# This is an estimation!\n\nThis list may include already researched tanks because of the inaccurate information Wargaming provides. Try providing a `starting-tank` from the line when using the command if you can."
},
"errors": {
"non_tech_tree": "# %s1 is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# %s1 is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# %s1 is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# %s1 was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# %s1 and %s2 are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# %s1 higher tiered to %s2\n\nMake sure to provide %s3 as the `starting-tank` instead as it is the lower tiered tank."
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank."
}
},
"about": {
@@ -410,7 +394,7 @@
"wn8": "WN8",
"winrate": "勝率",
"damage": "ダメージ",
"unknown_tank": "Unknown tank %s1"
"unknown_tank": "Unknown tank {id}"
}
},
"debug": {
@@ -446,12 +430,12 @@
"options": {
"threshold": {
"name": "threshold",
"description": "The number of days inactive (default: %s1 days)"
"description": "The number of days inactive (default: {days} days)"
}
},
"body": {
"subtitle": "Inactive for %s1+ days",
"listing": "%s1 days"
"subtitle": "Inactive for {days}+ days",
"listing": "{days} days"
}
},
"full_stats": {
@@ -494,7 +478,7 @@
"body": {
"accounts_linked": "Accounts linked",
"no_role_permissions": {
"title": "%s1 failed to verify",
"title": "{name} failed to verify",
"description": "I don't have the permission to manage roles."
}
},
@@ -509,11 +493,11 @@
"options": {
"limit": {
"name": "limit",
"description": "The max number of clan results (default: %s1)"
"description": "The max number of clan results (default: {limit})"
}
},
"body": {
"title": "Clan search for %s1 in region %s2",
"title": "Clan search for {search} in region {region}",
"no_results": "No clans found"
}
},
@@ -523,11 +507,11 @@
"options": {
"limit": {
"name": "limit",
"description": "The max number of player results (default: %s1)"
"description": "The max number of player results (default: {limit})"
}
},
"body": {
"title": "Player search for %s1 in region %s2",
"title": "Player search for {search} in region {region}",
"no_results": "No players found"
}
},
@@ -547,13 +531,13 @@
"options": {
"limit": {
"name": "limit",
"description": "How many neighbors to display (default: %s1)"
"description": "How many neighbors to display (default: {count})"
},
"season": {
"name": "season",
"description": "Season number (default: current)",
"choices": {
"current": "%s1 (current)"
"current": "{season} (current)"
}
},
"league": {
@@ -562,12 +546,12 @@
}
},
"body": {
"top_players": "Top %s1 players",
"no_participation": "# %s1 didn't play rating in season %s2\n\nThis player did not participate in this season or did not get past calibration.",
"top_players": "Top {count} players",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.",
"no_ongoing_season": "# No ongoing season\n\nThere isn't a currently running rating season.",
"deleted_player": "Deleted %s1",
"deleted_player": "Deleted {id}",
"neighbors": "Rating neighbors",
"more": "+ %s1 more"
"more": "+ {count} more"
}
},
"today": {
@@ -582,14 +566,14 @@
"name": "owned-tanks",
"description": "Shows all own tanks in a tier",
"body": {
"title": "# %s1's owned tier %s2 tanks\n\n"
"title": "# {name}'s owned tier {tier} tanks\n\n"
}
},
"permissions": {
"name": "permissions",
"description": "Checks wether the bot has the required permissions to function",
"body": {
"title": "# Permissions\n\n%s1",
"title": "# Permissions\n\n{body}",
"view_channels": "View channels: needed to find the message the refresh button was used on",
"read_message_history": "Read message history: needed to find the message to refresh",
"attach_files": "Attach files: needed to add images to image-based commands",
@@ -601,7 +585,7 @@
"description": "Check wether the bot is alive.",
"body": {
"pong": "Pong 🏓",
"pong_with_time": "Pong 🏓 - %s1ms"
"pong_with_time": "Pong 🏓 - {time}ms"
},
"subcommands": {
"blitzkit": {
@@ -618,7 +602,7 @@
"name": "player-info",
"description": "Basic information about a player",
"body": {
"title": "%s1's information",
"title": "{name}'s information",
"nickname": "Nickname",
"battles": "戦闘数",
"winrate": "勝率",
@@ -647,7 +631,7 @@
}
},
"errors": {
"no_participation": "# %s1 hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"unrecorded_stats": "# Statistics currently unavailable\n\nWargaming may be currently be facing server downtime. If there is an on-going season, statistics should be available withing 24 hours."
}
}
@@ -675,12 +659,13 @@
"select_dialog_title": "Search for tanks",
"swap_dialog_title": "Swap tank",
"clear_filters": "Clear filters",
"login": "Login to use this",
"search_bar_hint": "車輌名を入力…",
"recent": "最近の閲覧",
"select_all": "全て選択",
"count_singular": "1 輌",
"count_plural": "%s1輌",
"sorting_by": ":%s1で並び替え",
"count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}",
"no_tanks_found": {
"body": "該当する車輌が存在しません。",
"search_again": "もう一度検索してください。",
@@ -756,16 +741,16 @@
"action": "Discord"
},
"hero": {
"credit": "By %s1 ❤️"
"credit": "By {name} ❤️"
},
"hot_tanks": {
"title": "人気の車輌",
"subtitle": "過去 %s1日間"
"subtitle": "Last {days} days"
},
"other_projects": {
"title": "他のプロジェクト"
},
"help_translate": "%s1の %s2への翻訳にご協力ください!",
"help_translate": "Please help translate {name} to {language}!",
"seo_description": "World of Tanks Blitz全般のツール"
},
"docs": {
@@ -795,7 +780,7 @@
"next": "Next",
"no_results": "該当なし"
},
"stats": "%s1 / %s2 guessed correctly"
"stats": "{correct} / {total} guessed correctly"
},
"tankopedia": {
"search": "Search a stat...",
@@ -803,8 +788,8 @@
"button": "戦車を探す",
"description": "Blitz戦車百科",
"seo_description": "Statistics, armor, and more for all tanks in World of Tanks Blitz",
"tank_seo_title": "%s1 - Tier %s2 %s3 %s4 | %s5 Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "%s1 armor, statistics, equipment, provisions, and more. %s2 DPM, %s3hp alpha, %s4mm penetration, %s5kph top speed, %s6hp health.",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "{name} armor, statistics, equipment, provisions, and more. {dpm} DPM, {alpha}hp alpha, {penetration}mm penetration, {speed}kph top speed, {health}hp health.",
"visualizers": {
"reload": {
"skip": "Skip"
@@ -829,7 +814,6 @@
},
"view_range": {
"camo": "Camo",
"percentage": "%s1%",
"ghost_factory": "Ghost Factory",
"dead_rail": "Dead Rail"
},
@@ -873,7 +857,6 @@
"reset": "リセット"
},
"advanced": "高度なハイライト",
"shooter": "自車両",
"shot_card": {
"element": {
"primary": "主装甲",
@@ -884,15 +867,15 @@
"track": "履帯"
},
"status": {
"penetration": "%s1hp 貫通",
"penetration": "{damage}hp penetration",
"blocked": "非貫通",
"ricochet": "跳弾",
"splash": "%s1hp 爆風ダメージ"
"splash": "{damage}hp splash"
},
"stats": {
"thickness_and_angle": "%s1mm %s2°",
"nominal": "%s1mm 装甲",
"ricochet_loss": "%s1% penetration"
"thickness_and_angle": "{thickness}mm {angle}°",
"nominal": "{thickness}mm nominal",
"ricochet_loss": "{loss}% penetration"
}
}
},
@@ -930,15 +913,15 @@
"tech_tree": {
"title": "技術ツリー",
"battle": "1 戦",
"battles": "%s1 戦",
"route": "ルート %s1 / %s2"
"battles": "{count} battles",
"route": "Route {index} of {count}"
},
"game_modes": {
"title": "ゲームモードアビリティ"
},
"review": {
"title": "Review videos",
"join": "%s1 YouTuberプログラムに応募する"
"join": "Apply to {name} YouTuber program"
},
"configuration": {
"title": "構成",
@@ -974,15 +957,15 @@
"title": "性能値",
"compare": {
"label": "比較対象",
"class": "Tier %s1 %s2",
"tier": "Tier %s1 全車輌",
"class": "Tier {tier} {class}",
"tier": "All of tier {tier}",
"all": "全車輌"
},
"values": {
"shell_index": "Shell %s1",
"at_distance": "At %s1m",
"shell_index": "Shell {index}",
"at_distance": "At {distance}m",
"at_distance_slider_label": "距離",
"dispersion_at_distance": "%s1m での散布界",
"dispersion_at_distance": "Dispersion at {distance}m",
"gun_flexibility": "主砲旋回上限",
"speed": "最高速度",
"terrain_coefficients": "地形走破能力",
@@ -1131,9 +1114,9 @@
"description": "車輌の戦闘統計",
"seo_description": "Best tanks and their performances in World of Tanks Blitz",
"estimation": {
"body": "%s1 人のプレイヤーの推定統計。 %s2前に更新されました。",
"hours": "%s1 時間",
"minutes": "%s1 分"
"body": "Estimated stats based on {count} players. Updated {age} ago.",
"hours": "{count} hours",
"minutes": "{count} minutes"
},
"player_count": {
"label": "統計期間:"
@@ -1165,10 +1148,10 @@
"button": "全て見る",
"description": "Blitzアバター図鑑",
"seo_description": "World of Tanks Blitz の 全ての プレイヤーアバター",
"last_updated": "最終更新: %s1",
"last_updated": "Last updated on {time}",
"search": {
"hint": "アバターを検索...",
"results": "検索結果: %s1 個"
"results": "{count} avatars"
}
},
"session": {
@@ -1183,8 +1166,8 @@
"no_results": "プレイヤーが見つかりませんでした"
},
"controls": {
"title": "%s1 を追跡中",
"subtitle": "開始日時: %s1",
"title": "Tracking {name}",
"subtitle": "Since {time}",
"reset": "リセット",
"change": "変更"
},
@@ -1244,7 +1227,7 @@
"cancel": "Cancel",
"success": {
"title": "Copy URL",
"info": "Generated the URL for %s1. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"info": "Generated the URL for {name}. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"back": "戻る",
"copy": "Copy URL"
}
+76 -93
View File
@@ -1,19 +1,19 @@
{
"test": {
"default": "",
"long": "To jest długi ciąg testowy. NIGDY NIE ZOBACZYSZ tego w interfejsie użytkownika. Mój ulubiony owoc to %s1, ponieważ ma kolor %s2. Tak bardzo je lubię, że powiem ich nazwę 3 razy! %s1! %s1! %s1! Po raz kolejny to %s2, a nie %s3.",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.",
"fox": "Szybki brązowy lis przeskoczył nad leniwym psem."
},
"common": {
"name": "BlitzKit",
"units": {
"m": "%s1m",
"mm": "%s1mm",
"deg": "%s1°",
"hp": "%s1hp",
"x": "x%s1",
"percentage": "%s1%",
"deg_s": "%s1°/s"
"m": "{value}m",
"mm": "{value}mm",
"deg": "{value}°",
"hp": "{value}hp",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}°/s"
},
"gun_types": {
"auto_loader": "Auto loader",
@@ -186,11 +186,11 @@
"bot": {
"common": {
"errors": {
"clan_not_found": "# Nie można znaleźć klanu\nNie można znaleźć \"%s1\". Spróbuj wybrać klan z wyników wyszukiwania.",
"player_not_found": "# Nie można znaleźć użytkownika\nNie mogłem znaleźć użytkownika \"%s1\". Spróbuj wybrać użytkownika z wyniku wyszukiwania, wpisując poprawną nazwę użytkownika lub używając polecenia `/link`.",
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
"player_not_linked": "# Użyj `/link` aby zacząć\nNie wiem, kim jesteś, ale możesz mi dziś powiedzieć!",
"tank_name_not_found": "# Czołg nie został znaleziony\nNie można znaleźć czołgu o nazwie \"%s1\".",
"tank_id_not_found": "# Czołg nie został znaleziony\nNie można znaleźć czołgu o ID \"%s1\". Spróbuj wpisać nazwę czołgu zamiast liczby.",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.",
"no_tank_stats": "# Brak dostępnych statystyk czołgów\nTen gracz nie ma żadnych dostępnych statystyk. Może to nie być gracz, którego szukasz.",
"get_help": "Pomóż serwerowi Discord",
"uncaught_error": "# BlitzKit wpadł w błąd!\nPrzepraszamy za to. Możesz [dołączyć do oficjalnego serwera Discord](https://discord.gg/nDt7AjGJQH), aby uzyskać pomoc.",
@@ -284,19 +284,19 @@
"name": "poziom",
"description": "Poziom",
"choices": {
"tier": "Poziom %s1 - %s2"
"tier": "Tier {tier_1} - {tier_2}"
}
}
},
"periods": {
"career": "Kariera",
"today": "Dzisiaj",
"days": "%s1 dzień",
"custom": "%s1 - %s2 dni"
"days": "{days} days",
"custom": "{day_1} - {day_2} days"
},
"filters": {
"none": "Brak filtrów",
"tier": "Poziom %s1"
"tier": "Tier {tier}"
},
"no_data": {
"battles_in_period": "Brak bitew w tym okresie",
@@ -319,22 +319,6 @@
}
},
"commands": {
"auction": {
"name": "aukcja",
"description": "Czołgi dostępne na aukcji",
"body": {
"title": "Aukcja Blitz",
"subtitle": "%s1 dostępne • następne ceny %s2\nOferta teraz: %s3",
"next": "Następna cena: %s1",
"available": "Dostępne: %s1 / %s2"
},
"errors": {
"no_auction": "# Brak bieżącej aukcji\n\nObecnie nie ma dostępnych czołgów do zakupu na aukcji. Jeśli uważasz, że to błąd, zgłoś go na [oficjalnym serwerze Discord](https://discord.gg/nDt7AjGJQH)."
},
"actions": {
"bid": "Oferta teraz"
}
},
"replay": {
"name": "powtórz",
"description": "Wyświetl wyniki powtórki"
@@ -355,19 +339,19 @@
"body": {
"subtitle": "Rozpocznij badania",
"total": "Całkowity",
"research": "Badanie: %s1",
"upgrades": "Ulepszenie: %s1",
"purchase": "Zakup: %s1",
"equipment": "Wyposażenie: %s1",
"research": "Research: {cost}",
"upgrades": "Upgrades: {cost}",
"purchase": "Purchase: {cost}",
"equipment": "Equipment: {cost}",
"estimation": "# To jest szacunek!\n\nTa lista może zawierać już zbadane czołgi z powodu niedokładnych informacji dostarczanych przez Wargaming. Spróbuj podać `starting-tank` z wiersza podczas używania polecenia, jeśli możesz."
},
"errors": {
"non_tech_tree": "# %s1 nie jest na drzewie technologii\n\nNie możesz zbadać czołg premium/kolekcjonerski.",
"tier_1": "# %s1 jest czołgami poziomu I\n\nPoziom I są zawsze odblokowane za darmo dla wszystkich graczy.",
"already_researched": "# %s1 jest już zbadany\n\nSpróbuj podać `starting-tank` gdy użyjesz komendy aby zobaczyć sumy dla linii, którą już zbadałeś.",
"start_end_equal": "# %s1 został dostarczony dwa razy\n\nUpewnij się, że `starting-tank` i `target-tank` są inne.",
"tanks_not_on_line": "# %s i %s nie znajdują się w tej samej linii\n\nUpewnij się, że `starting-tank` i `target-tank` znajdują się na tej samej linii drzewa technicznego.",
"unordered": "# %s1 wyższy stopień %s2\n\nUpewnij się, że zamiast tego %s3 jest `starting-tank`, ponieważ jest tierowo niższym czołgiem."
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank."
}
},
"about": {
@@ -410,7 +394,7 @@
"wn8": "WN8",
"winrate": "Śr. wygranych",
"damage": "Uszkodzenia",
"unknown_tank": "Nieznany czołg %s1"
"unknown_tank": "Unknown tank {id}"
}
},
"debug": {
@@ -446,12 +430,12 @@
"options": {
"threshold": {
"name": "threshold",
"description": "Liczba dni nieaktywnych (domyślnie: %s dni)"
"description": "The number of days inactive (default: {days} days)"
}
},
"body": {
"subtitle": "Inactive for %s1+ days",
"listing": "%s1 dzień"
"subtitle": "Inactive for {days}+ days",
"listing": "{days} days"
}
},
"full_stats": {
@@ -494,7 +478,7 @@
"body": {
"accounts_linked": "Accounts linked",
"no_role_permissions": {
"title": "%s1 failed to verify",
"title": "{name} failed to verify",
"description": "I don't have the permission to manage roles."
}
},
@@ -509,11 +493,11 @@
"options": {
"limit": {
"name": "limit",
"description": "The max number of clan results (default: %s1)"
"description": "The max number of clan results (default: {limit})"
}
},
"body": {
"title": "Clan search for %s1 in region %s2",
"title": "Clan search for {search} in region {region}",
"no_results": "No clans found"
}
},
@@ -523,11 +507,11 @@
"options": {
"limit": {
"name": "limit",
"description": "Maksymalna liczba wyników gracza (domyślnie: %s)"
"description": "The max number of player results (default: {limit})"
}
},
"body": {
"title": "Player search for %s1 in region %s2",
"title": "Player search for {search} in region {region}",
"no_results": "No players found"
}
},
@@ -547,13 +531,13 @@
"options": {
"limit": {
"name": "limit",
"description": "How many neighbors to display (default: %s1)"
"description": "How many neighbors to display (default: {count})"
},
"season": {
"name": "season",
"description": "Season number (default: current)",
"choices": {
"current": "%s1 (current)"
"current": "{season} (current)"
}
},
"league": {
@@ -562,12 +546,12 @@
}
},
"body": {
"top_players": "Top %s1 players",
"no_participation": "# %s1 didn't play rating in season %s2\n\nThis player did not participate in this season or did not get past calibration.",
"top_players": "Top {count} players",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.",
"no_ongoing_season": "# No ongoing season\n\nThere isn't a currently running rating season.",
"deleted_player": "Usunięto %s1",
"deleted_player": "Deleted {id}",
"neighbors": "Rating neighbors",
"more": "+ %s1 więcej"
"more": "+ {count} more"
}
},
"today": {
@@ -582,14 +566,14 @@
"name": "posiadane czołgi",
"description": "Pokazuje wszystkie własne czołgi na poziomie",
"body": {
"title": "# %s1 posiadany poziom %s2 czołgi\n\n"
"title": "# {name}'s owned tier {tier} tanks\n\n"
}
},
"permissions": {
"name": "uprawnienia",
"description": "Sprawdza, czy bot ma wymagane uprawnienia do funkcji",
"body": {
"title": "# Uprawnienia\n\n%s1",
"title": "# Permissions\n\n{body}",
"view_channels": "Wyświetl kanały: potrzebne do znalezienia wiadomości użyty przycisk odświeżania",
"read_message_history": "Przeczytaj historię wiadomości: potrzebne do znalezienia wiadomości do odświeżenia",
"attach_files": "Dołącz pliki: potrzebne do dodawania obrazów do komend opartych na obrazach",
@@ -601,7 +585,7 @@
"description": "Sprawdź, czy bot żyje.",
"body": {
"pong": "Pong 🏓",
"pong_with_time": "Pong 🏓 - %s1ms"
"pong_with_time": "Pong 🏓 - {time}ms"
},
"subcommands": {
"blitzkit": {
@@ -618,7 +602,7 @@
"name": "informacje o graczu",
"description": "Podstawowe informacje o graczu",
"body": {
"title": "Informacje o %s1",
"title": "{name}'s information",
"nickname": "Nick",
"battles": "Bitwy",
"winrate": "Śr. wygranych",
@@ -647,7 +631,7 @@
}
},
"errors": {
"no_participation": "# %s1 nie grał w \n\nTen gracz nie uczestniczył w grze oceniającej w tym sezonie.",
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"unrecorded_stats": "# Statistics currently unavailable\n\nWargaming may be currently be facing server downtime. If there is an on-going season, statistics should be available withing 24 hours."
}
}
@@ -675,12 +659,13 @@
"select_dialog_title": "Search for tanks",
"swap_dialog_title": "Swap tank",
"clear_filters": "Clear filters",
"login": "Login to use this",
"search_bar_hint": "Search tanks...",
"recent": "Recently viewed",
"select_all": "Select all",
"count_singular": "1 tank",
"count_plural": "%s1 tanks",
"sorting_by": "Sorting by %s1",
"count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}",
"no_tanks_found": {
"body": "No tanks found.",
"search_again": "Try searching again.",
@@ -756,16 +741,16 @@
"action": "Discord"
},
"hero": {
"credit": "By %s1 ❤️"
"credit": "By {name} ❤️"
},
"hot_tanks": {
"title": "Popular tanks",
"subtitle": "Last %s1 days"
"subtitle": "Last {days} days"
},
"other_projects": {
"title": "Other cool projects"
},
"help_translate": "Please help translate %s1 to %s2!",
"help_translate": "Please help translate {name} to {language}!",
"seo_description": "Tools for everything World of Tanks Blitz"
},
"docs": {
@@ -795,7 +780,7 @@
"next": "Next",
"no_results": "Brak wyników"
},
"stats": ""
"stats": "{correct} / {total} guessed correctly"
},
"tankopedia": {
"search": "Search a stat...",
@@ -803,8 +788,8 @@
"button": "Find tanks",
"description": "Blitz tank encyclopedia",
"seo_description": "Statistics, armor, and more for all tanks in World of Tanks Blitz",
"tank_seo_title": "%s1 - Tier %s2 %s3 %s4 | %s5 Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "%s1 armor, statistics, equipment, provisions, and more. %s2 DPM, %s3hp alpha, %s4mm penetration, %s5kph top speed, %s6hp health.",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "{name} armor, statistics, equipment, provisions, and more. {dpm} DPM, {alpha}hp alpha, {penetration}mm penetration, {speed}kph top speed, {health}hp health.",
"visualizers": {
"reload": {
"skip": "Skip"
@@ -829,7 +814,6 @@
},
"view_range": {
"camo": "Camo",
"percentage": "%s1%",
"ghost_factory": "Ghost Factory",
"dead_rail": "Dead Rail"
},
@@ -873,7 +857,6 @@
"reset": "Reset"
},
"advanced": "Advanced highlighting",
"shooter": "Shooter:",
"shot_card": {
"element": {
"primary": "Primary",
@@ -884,15 +867,15 @@
"track": "Tracks"
},
"status": {
"penetration": "%s1hp penetration",
"penetration": "{damage}hp penetration",
"blocked": "Blocked",
"ricochet": "Ricochet",
"splash": "%s1hp splash"
"splash": "{damage}hp splash"
},
"stats": {
"thickness_and_angle": "%s1mm %s2°",
"nominal": "%s1mm nominal",
"ricochet_loss": "%s1% penetration"
"thickness_and_angle": "{thickness}mm {angle}°",
"nominal": "{thickness}mm nominal",
"ricochet_loss": "{loss}% penetration"
}
}
},
@@ -930,15 +913,15 @@
"tech_tree": {
"title": "Tech tree",
"battle": "1 battle",
"battles": "%s1 battles",
"route": "Route %s1 of %s2"
"battles": "{count} battles",
"route": "Route {index} of {count}"
},
"game_modes": {
"title": "Game mode abilities"
},
"review": {
"title": "Review videos",
"join": "Apply to %s1 YouTuber program"
"join": "Apply to {name} YouTuber program"
},
"configuration": {
"title": "Configuration",
@@ -974,15 +957,15 @@
"title": "Characteristics",
"compare": {
"label": "Compare against",
"class": "Tier %s1 %s2",
"tier": "All of tier %s1",
"class": "Tier {tier} {class}",
"tier": "All of tier {tier}",
"all": "All tanks"
},
"values": {
"shell_index": "Shell %s1",
"at_distance": "At %s1m",
"shell_index": "Shell {index}",
"at_distance": "At {distance}m",
"at_distance_slider_label": "Distance",
"dispersion_at_distance": "Dispersion at %s1m",
"dispersion_at_distance": "Dispersion at {distance}m",
"gun_flexibility": "Gun flexibility",
"speed": "Speed",
"terrain_coefficients": "Terrain coefficients",
@@ -1131,9 +1114,9 @@
"description": "Tank performance statistics",
"seo_description": "Best tanks and their performances in World of Tanks Blitz",
"estimation": {
"body": "Estimated stats based on %s1 players. Updated %s2 ago.",
"hours": "%s1 hours",
"minutes": "%s1 minutes"
"body": "Estimated stats based on {count} players. Updated {age} ago.",
"hours": "{count} hours",
"minutes": "{count} minutes"
},
"player_count": {
"label": "Player count"
@@ -1165,10 +1148,10 @@
"button": "Browse all",
"description": "Blitz player avatars",
"seo_description": "All World of Tanks Blitz player avatars",
"last_updated": "Last updated on %s1",
"last_updated": "Last updated on {time}",
"search": {
"hint": "Search avatars...",
"results": "%s1 avatars"
"results": "{count} avatars"
}
},
"session": {
@@ -1183,8 +1166,8 @@
"no_results": "No players found"
},
"controls": {
"title": "Tracking %s1",
"subtitle": "Since %s1",
"title": "Tracking {name}",
"subtitle": "Since {time}",
"reset": "Reset",
"change": "Change"
},
@@ -1244,7 +1227,7 @@
"cancel": "Cancel",
"success": {
"title": "Copy URL",
"info": "Generated the URL for %s1. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"info": "Generated the URL for {name}. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"back": "Back",
"copy": "Copy URL"
}
+76 -93
View File
@@ -1,19 +1,19 @@
{
"test": {
"default": "teste",
"long": "Esta é uma sequência de testes longa. Você NUNCA DEVE ver isto na UI. Minha fruta favorita é %s1 porque tem a cor de %s2. Eu gosto tanto dela que vou dizer o nome dela 3 vezes! %s1! %s1! %s1! Mais uma vez, é %s2, não %s3.",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.",
"fox": "A ágil raposa castanha salta por cima do cão preguiçoso."
},
"common": {
"name": "BlitzKit",
"units": {
"m": "%s1m",
"mm": "%s1mm",
"deg": "%s1°",
"hp": "%s1hp",
"x": "x%s1",
"percentage": "%s1%",
"deg_s": "%s1°/s"
"m": "{value}m",
"mm": "{value}mm",
"deg": "{value}°",
"hp": "{value}hp",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}°/s"
},
"gun_types": {
"auto_loader": "Autocarregador",
@@ -186,11 +186,11 @@
"bot": {
"common": {
"errors": {
"clan_not_found": "# Não foi possível encontrar o clã\nNão foi possível encontrar \"%s1\". Tente selecionar um clã do resultado de pesquisa.",
"player_not_found": "# Não foi possível encontrar o usuário\nEu não consegui encontrar o usuário \"%s1\". Tente escolher um usuário do resultado de pesquisa, digitando um nome de usuário válido, ou usando o comando `/link`.",
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
"player_not_linked": "Digite \"/link\" para começar.\nEu posso não saber quem é você, mas pode-me dizer hoje sobre isso!",
"tank_name_not_found": "# Tanque não encontrado\nNão foi possível encontrar um tanque pelo nome \"%s1\".",
"tank_id_not_found": "# Tanque não encontrado\nNão foi possível encontrar o tanque pelo ID \"%s1\". Tente digitar o nome do tanque ao invés de um número.",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.",
"no_tank_stats": "# Nenhuma estatística de tanques disponível\nEsse jogador não tem as suas estatísticas disponíveis. Talvez esse pode não ser o jogador que procura.",
"get_help": "Servidor de Ajuda no Discord",
"uncaught_error": "# O BlitzKit apresentou um erro!\nSentimos muito por isso. Sinta-se a vontade para [entrar no servidor oficial no Discord]\n(https://discord.gg/nDt7AjGJQH) para conseguir ajuda.",
@@ -284,19 +284,19 @@
"name": "nível",
"description": "Nível",
"choices": {
"tier": "Nível %s1 - %s2"
"tier": "Tier {tier_1} - {tier_2}"
}
}
},
"periods": {
"career": "Carreira",
"today": "Hoje",
"days": "%s1 dias",
"custom": "%s1 - %s2 dias"
"days": "{days} days",
"custom": "{day_1} - {day_2} days"
},
"filters": {
"none": "Sem filtros",
"tier": "Nível %s1"
"tier": "Tier {tier}"
},
"no_data": {
"battles_in_period": "Não há batalhas jogadas neste período",
@@ -319,22 +319,6 @@
}
},
"commands": {
"auction": {
"name": "leilão",
"description": "Tanques disponíveis agora mesmo no leilão",
"body": {
"title": "Leilão Blitz",
"subtitle": "%s1 disponível • próximos preços %s2 oferta agora: %s3",
"next": "Próximo preço: %s1",
"available": "Disponível: %s1 / %s2"
},
"errors": {
"no_auction": "# Nenhum leilão em curso\n\nNo momento, não há tanques disponíveis para compra no leilão. Se você acha que isso é um erro, relate esta discrepância no [servidor oficial do Discord](https://discord.gg/nDt7AjGJQH)."
},
"actions": {
"bid": "Ofertar agora"
}
},
"replay": {
"name": "replay",
"description": "Exibir resultados de replays"
@@ -355,19 +339,19 @@
"body": {
"subtitle": "Pesquisa",
"total": "Total",
"research": "Pesquisa: %s1",
"upgrades": "Melhorias: %s1",
"purchase": "Compra: %s1",
"equipment": "Equipamento: %s1",
"research": "Research: {cost}",
"upgrades": "Upgrades: {cost}",
"purchase": "Purchase: {cost}",
"equipment": "Equipment: {cost}",
"estimation": "# Esta é uma estimativa!\n\nEsta lista pode incluir tanques já pesquisados devido à informação imprecisa que a Wargaming fornece. Tente fornecer um `tanque-inicial` da linha ao usar o comando, se puder."
},
"errors": {
"non_tech_tree": "# %s1 não está na árvore tecnológica\n\nVocê não pode pesquisar um tanque premium/colecionador.",
"tier_1": "# %s1 é um nível I\n\nOs tanques de nível I sempre são desbloqueados gratuitamente para todos os jogadores.",
"already_researched": "# %s1 já foi pesquisado\n\nTente fornecer um `tanque-inicial` ao usar o comando para ver os totais de uma linha que você já pesquisou.",
"start_end_equal": "# %s1 foi fornecido duas vezes\n\nCertifique-se de que `tanque-inicial` e `tanque-alvo` são diferentes.",
"tanks_not_on_line": "# %s1 e %s2 não estão na mesma linha\n\nCertifique-se de que `tanque-inicial` e `tanque-alvo` estão na mesma linha tecnológica.",
"unordered": "# %s1 de nível mais alto para %s2\n\nCertifique-se de fornecer %s3 como o `tanque-inicial` em vez disso, pois é o tanque de nível inferior."
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank."
}
},
"about": {
@@ -410,7 +394,7 @@
"wn8": "WN8",
"winrate": "Taxa de vitória",
"damage": "Dano",
"unknown_tank": "Tanque desconhecido %s1"
"unknown_tank": "Unknown tank {id}"
}
},
"debug": {
@@ -446,12 +430,12 @@
"options": {
"threshold": {
"name": "limite",
"description": "O número de dias inativos (padrão: %s1 dias)"
"description": "The number of days inactive (default: {days} days)"
}
},
"body": {
"subtitle": "Inativo por %s1+ dias",
"listing": "%s1 dias"
"subtitle": "Inactive for {days}+ days",
"listing": "{days} days"
}
},
"full_stats": {
@@ -494,7 +478,7 @@
"body": {
"accounts_linked": "Contas vinculadas",
"no_role_permissions": {
"title": "%s1 falhou ao verificar",
"title": "{name} failed to verify",
"description": "Eu não tenho permissão para gerenciar funções."
}
},
@@ -509,11 +493,11 @@
"options": {
"limit": {
"name": "limite",
"description": "O número máximo de resultados do clã (padrão: %s1)"
"description": "The max number of clan results (default: {limit})"
}
},
"body": {
"title": "Pesquisa do clã para %s1 na região %s2",
"title": "Clan search for {search} in region {region}",
"no_results": "Nenhum clã encontrado"
}
},
@@ -523,11 +507,11 @@
"options": {
"limit": {
"name": "limite",
"description": "O número máximo de resultados do jogador (padrão: %s1)"
"description": "The max number of player results (default: {limit})"
}
},
"body": {
"title": "Busca de jogador para %s1 na região %s2",
"title": "Player search for {search} in region {region}",
"no_results": "Nenhum jogador encontrado"
}
},
@@ -547,13 +531,13 @@
"options": {
"limit": {
"name": "limite",
"description": "Quantos vizinhos exibir (padrão: %s1)"
"description": "How many neighbors to display (default: {count})"
},
"season": {
"name": "temporada",
"description": "Número da temporada (padrão: atual)",
"choices": {
"current": "%s1 (atual)"
"current": "{season} (current)"
}
},
"league": {
@@ -562,12 +546,12 @@
}
},
"body": {
"top_players": "Melhores %s1 jogadores",
"no_participation": "# %s1 não jogou classificação na temporada %s2\n\nEste jogador não participou nesta temporada ou não passou da calibração.",
"top_players": "Top {count} players",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.",
"no_ongoing_season": "# Nenhuma temporada em andamento\n\nNão há uma temporada de classificação em execução no momento.",
"deleted_player": "Excluído %s1",
"deleted_player": "Deleted {id}",
"neighbors": "Classificação de vizinhos",
"more": "+ %s1 mais"
"more": "+ {count} more"
}
},
"today": {
@@ -582,14 +566,14 @@
"name": "tanques-possuídos",
"description": "Mostra todos os tanques possuídos em um nível",
"body": {
"title": "# %s1's possuía nível %s2 tanques\n\n"
"title": "# {name}'s owned tier {tier} tanks\n\n"
}
},
"permissions": {
"name": "Permissões",
"description": "Verifica se o bot tem as permissões necessárias para funcionar",
"body": {
"title": "# Permissões\n\n%s1",
"title": "# Permissions\n\n{body}",
"view_channels": "Ver canais: necessário para encontrar a mensagem em que o botão atualizar foi usado",
"read_message_history": "Histórico de mensagens lidas: necessário para encontrar a mensagem para atualizar",
"attach_files": "Anexar arquivos: necessário para adicionar imagens a comandos baseados em imagens",
@@ -601,7 +585,7 @@
"description": "Verifique se o bot está vivo.",
"body": {
"pong": "Pong 🏓",
"pong_with_time": "Pong 🏓 - %s1ms"
"pong_with_time": "Pong 🏓 - {time}ms"
},
"subcommands": {
"blitzkit": {
@@ -618,7 +602,7 @@
"name": "informação do jogador",
"description": "Informações básicas sobre um jogador",
"body": {
"title": "%s1's informações",
"title": "{name}'s information",
"nickname": "Apelido",
"battles": "Batalhas",
"winrate": "Taxa de vitória",
@@ -647,7 +631,7 @@
}
},
"errors": {
"no_participation": "# %s1 não jogou classificação\n\nEste jogador não participou do modo de classificação nesta temporada.",
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"unrecorded_stats": "# Estatísticas atualmente indisponível\n\nWargaming pode estar no momento, enfrentando tempo de inatividade do servidor. Se houver uma temporada em curso, as estatísticas deverão ser disponibilizadas dentro de 24 horas."
}
}
@@ -675,12 +659,13 @@
"select_dialog_title": "Search for tanks",
"swap_dialog_title": "Swap tank",
"clear_filters": "Clear filters",
"login": "Login to use this",
"search_bar_hint": "Procurar tanques...",
"recent": "Visto recentemente",
"select_all": "Selecionar todos",
"count_singular": "1 tanque",
"count_plural": "%s1 tanques",
"sorting_by": "Ordenando por %s1",
"count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}",
"no_tanks_found": {
"body": "Nenhum tanque encontrado.",
"search_again": "Tente pesquisar novamente.",
@@ -756,16 +741,16 @@
"action": "Discord"
},
"hero": {
"credit": "Por %s1 ❤️"
"credit": "By {name} ❤️"
},
"hot_tanks": {
"title": "Tanques populares",
"subtitle": "Últimos %s1 dias"
"subtitle": "Last {days} days"
},
"other_projects": {
"title": "Outros projetos legais"
},
"help_translate": "Por favor, ajude a traduzir %s1 para %s2!",
"help_translate": "Please help translate {name} to {language}!",
"seo_description": "Ferramentas para tudo World of Tanks Blitz"
},
"docs": {
@@ -795,7 +780,7 @@
"next": "Next",
"no_results": "Sem resultados"
},
"stats": "%s1 / %s2 guessed correctly"
"stats": "{correct} / {total} guessed correctly"
},
"tankopedia": {
"search": "Search a stat...",
@@ -803,8 +788,8 @@
"button": "Encontrar tanques",
"description": "Blitz enciclopédia de tanques",
"seo_description": "Estatísticas, blindagem, e mais para todos os tanques de Wolrd of Tanks Blitz",
"tank_seo_title": "%s1 - Nível %s2 %s3 %s4 | %s5 Tanquepedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "%s1 blindagem, estatísticas, equipamentos, provisões e mais. %s2 DPM, %s3hp alfa, %s4mm de penetração, %s5km/h velocidade máxima, %s6hp vida.",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "{name} armor, statistics, equipment, provisions, and more. {dpm} DPM, {alpha}hp alpha, {penetration}mm penetration, {speed}kph top speed, {health}hp health.",
"visualizers": {
"reload": {
"skip": "Skip"
@@ -829,7 +814,6 @@
},
"view_range": {
"camo": "Camo",
"percentage": "%s1%",
"ghost_factory": "Ghost Factory",
"dead_rail": "Dead Rail"
},
@@ -873,7 +857,6 @@
"reset": "Restaurar"
},
"advanced": "Realce avançado",
"shooter": "Atirador:",
"shot_card": {
"element": {
"primary": "Primário",
@@ -884,15 +867,15 @@
"track": "Esteiras"
},
"status": {
"penetration": "%s1HP penetração",
"penetration": "{damage}hp penetration",
"blocked": "Bloqueado",
"ricochet": "Ricochete",
"splash": "%s1hp respingo"
"splash": "{damage}hp splash"
},
"stats": {
"thickness_and_angle": "%s1mm %s2°",
"nominal": "%s1mm nominal",
"ricochet_loss": "%s1% penetração"
"thickness_and_angle": "{thickness}mm {angle}°",
"nominal": "{thickness}mm nominal",
"ricochet_loss": "{loss}% penetration"
}
}
},
@@ -930,15 +913,15 @@
"tech_tree": {
"title": "Árvore tecnológica",
"battle": "1 batalha",
"battles": "%s1 batalhas",
"route": "Rota %s1 de %s2"
"battles": "{count} battles",
"route": "Route {index} of {count}"
},
"game_modes": {
"title": "Habilidades do modo de jogo"
},
"review": {
"title": "Vídeos de análise",
"join": "Candidate-se para %s1 um programa YouTuber"
"join": "Apply to {name} YouTuber program"
},
"configuration": {
"title": "Configuração",
@@ -974,15 +957,15 @@
"title": "Características",
"compare": {
"label": "Comparar com",
"class": "Nível %s1 %s2",
"tier": "Tudo de nível %s1",
"class": "Tier {tier} {class}",
"tier": "All of tier {tier}",
"all": "Todos os tanques"
},
"values": {
"shell_index": "Projétil %s1",
"at_distance": "À %s1m",
"shell_index": "Shell {index}",
"at_distance": "At {distance}m",
"at_distance_slider_label": "Distância",
"dispersion_at_distance": "Dispersão à %s1m",
"dispersion_at_distance": "Dispersion at {distance}m",
"gun_flexibility": "Flexibilidade da arma",
"speed": "Velocidade",
"terrain_coefficients": "Coeficientes do terreno",
@@ -1131,9 +1114,9 @@
"description": "Estatísticas de desempenho do tanque",
"seo_description": "Melhores tanques e suas performances no World of Tanks Blitz",
"estimation": {
"body": "Estatísticas estimadas baseadas em %s1 jogadores. Atualizado %s2 atrás.",
"hours": "%s1 horas",
"minutes": "%s1 minutos"
"body": "Estimated stats based on {count} players. Updated {age} ago.",
"hours": "{count} hours",
"minutes": "{count} minutes"
},
"player_count": {
"label": "Número de jogadores"
@@ -1165,10 +1148,10 @@
"button": "Procurar todos",
"description": "Avatares do jogador Blitz",
"seo_description": "Todos os avatares do jogador World of Tanks Blitz",
"last_updated": "Última atualização em %s1",
"last_updated": "Last updated on {time}",
"search": {
"hint": "Procurar avatares...",
"results": "%s1 avatares"
"results": "{count} avatars"
}
},
"session": {
@@ -1183,8 +1166,8 @@
"no_results": "Nenhum jogador encontrado"
},
"controls": {
"title": "Rastreando %s1",
"subtitle": "Desde %s1",
"title": "Tracking {name}",
"subtitle": "Since {time}",
"reset": "Restaurar",
"change": "Mudança"
},
@@ -1244,7 +1227,7 @@
"cancel": "Cancelar",
"success": {
"title": "Copiar URL",
"info": "Gerou a URL para %s1. A incorporação começará a rastrear assim que a URL for colada. Redefina a qualquer momento clicando com o botão direito no PC ou pressionando longamente no celular e, em seguida, selecionando \"Redefinir\".",
"info": "Generated the URL for {name}. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"back": "Voltar",
"copy": "Copiar URL"
}
+88 -105
View File
@@ -1,19 +1,19 @@
{
"test": {
"default": "тест",
"long": "Это длинная тестовая строка. Вы НИКОГДА не должны видеть её в пользовательском интерфейсе. Мой любимый фрукт — %s1, потому что это цвет %s2. Он мне так нравится, что я произнесу его имя 3 раза! %s1! %s1! %s1! И ещё раз, это %s2, а не %s3.",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.",
"fox": "Съешь же ещё этих мягких французских булок, да выпей чаю."
},
"common": {
"name": "BlitzKit",
"units": {
"m": "%s1м",
"mm": "%s1мм",
"deg": "%s1°",
"hp": "%s1hp",
"x": "x%s1",
"percentage": "%s1%",
"deg_s": "%s1°/с"
"m": "{value}m",
"mm": "{value}mm",
"deg": "{value}°",
"hp": "{value}hp",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}°/s"
},
"gun_types": {
"auto_loader": "Барабан",
@@ -186,11 +186,11 @@
"bot": {
"common": {
"errors": {
"clan_not_found": "# Не удалось найти клан\nНе найден «%s1». Попробуйте выбрать клан из результатов поиска.",
"player_not_found": "# Не удалось найти пользователя\nНе удалось найти пользователя «%s1». Попробуйте выбрать пользователя из результатов поиска, введя правильное имя пользователя или используя команду «/link».",
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
"player_not_linked": "# Используйте «/link», чтобы начать\nЯ не знаю, кто ты, но давай познакомимся сегодня!",
"tank_name_not_found": "# Танк не найден\nНе удалось найти танк по названию «%s1».",
"tank_id_not_found": "# Танк не найден\nНе удалось найти танк по ID «%s1». Попробуйте ввести название танка вместо числа.",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.",
"no_tank_stats": "# Статистика танка недоступна\nУ этого игрока нет доступной статистики. Возможно, это не тот игрок, которого вы ищете.",
"get_help": "Получить помощь",
"uncaught_error": "# BlitzKit столкнулся с ошибкой!\nНам очень жаль. Не стесняйтесь и [присоединяйтесь к официальному серверу Discord](https://discord.gg/nDt7AjGJQH), чтобы получить помощь.",
@@ -284,19 +284,19 @@
"name": "уровень",
"description": "Уровень",
"choices": {
"tier": "Уровень %s1 - %s2"
"tier": "Tier {tier_1} - {tier_2}"
}
}
},
"periods": {
"career": "Карьера",
"today": "Cегодня",
"days": "%s1 дней",
"custom": "%s1 - %s2 дней"
"days": "{days} days",
"custom": "{day_1} - {day_2} days"
},
"filters": {
"none": "Без фильтров",
"tier": "Уровень %s1"
"tier": "Tier {tier}"
},
"no_data": {
"battles_in_period": "За этот период боёв не было",
@@ -319,22 +319,6 @@
}
},
"commands": {
"auction": {
"name": "аукцион",
"description": "Танки доступные на аукционе сейчас",
"body": {
"title": "Blitz аукцион",
"subtitle": "%s1 доступные • следующие цены %s2\nПокупка сейчас: %s3",
"next": "Следующая цена: %s1",
"available": "Доступно: %s1 / %s2"
},
"errors": {
"no_auction": "# Аукцион сейчас не проходит\n\nНа данный момент нет танков для покупки на аукционе. Если считаете, что это ошибка, пожалуйста о несоответствии на [официальном сервере Discord](https://discord.gg/nDt7AjGJQH)."
},
"actions": {
"bid": "Купить сейчас"
}
},
"replay": {
"name": "повтор",
"description": "Показать результаты повтора"
@@ -355,19 +339,19 @@
"body": {
"subtitle": "Исследование",
"total": "Всего",
"research": "Исследование: %s1",
"upgrades": "Улучшения: %s1",
"purchase": "Покупка: %s1",
"equipment": "Снаряжение: %s1",
"research": "Research: {cost}",
"upgrades": "Upgrades: {cost}",
"purchase": "Purchase: {cost}",
"equipment": "Equipment: {cost}",
"estimation": "# Это приблизительная оценка!\n\nВ этот список могут входить уже исследованные танки из-за неточной информации, предоставляемой Wargaming. Попробуйте указать «стартовый-танк» в строке при использовании команды, если сможете."
},
"errors": {
"non_tech_tree": "# %s1 отсутствует в дереве танков\n\nВы не можете исследовать премиум / коллекционный танк.",
"tier_1": "# %s1 - это уровень I\n\nУровень I всегда открыт бесплатно для всех игроков.",
"already_researched": "# %s1 уже исследован\n\nПопробуйте предоставить «starting-tank» при использовании команды для просмотра итогов уже исследованной ветки.",
"start_end_equal": "# %s1 был предоставлен дважды\n\nУбедитесь, что «starting-tank» и «target-tank» различаются.",
"tanks_not_on_line": "# %s1 и %s2 находятся не в одной ветке\n\nУбедитесь, что «starting-tank» и «target-tank» находятся на той же ветке дерева танков.",
"unordered": "# У %s1 более высокий уровень чем у %s2\n\nОбязательно укажите %s3 в качестве «starting-tank», так как это танк более низкого уровня."
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank."
}
},
"about": {
@@ -410,7 +394,7 @@
"wn8": "WN8",
"winrate": "Коэффициент побед",
"damage": "Урон",
"unknown_tank": "Неизвестный танк %s1"
"unknown_tank": "Unknown tank {id}"
}
},
"debug": {
@@ -446,12 +430,12 @@
"options": {
"threshold": {
"name": "порог",
"description": "Количество дней не активности (по умолчанию: %s1 дней)"
"description": "The number of days inactive (default: {days} days)"
}
},
"body": {
"subtitle": "Неактивен %s1+ дней",
"listing": "%s1 дней"
"subtitle": "Inactive for {days}+ days",
"listing": "{days} days"
}
},
"full_stats": {
@@ -494,7 +478,7 @@
"body": {
"accounts_linked": "Аккаунты привязаны",
"no_role_permissions": {
"title": "%s1 не удалось проверить",
"title": "{name} failed to verify",
"description": "У меня нет разрешения на управление ролями."
}
},
@@ -509,11 +493,11 @@
"options": {
"limit": {
"name": "лимит",
"description": "Максимальное количество результатов клана (по умолчанию: %s1)"
"description": "The max number of clan results (default: {limit})"
}
},
"body": {
"title": "Поиск клана %s1 в регионе %s2",
"title": "Clan search for {search} in region {region}",
"no_results": "Кланов не найдено"
}
},
@@ -523,11 +507,11 @@
"options": {
"limit": {
"name": "лимит",
"description": "Максимальное число результатов игрока (по умолчанию: %s1)"
"description": "The max number of player results (default: {limit})"
}
},
"body": {
"title": "Поиск игрока %s1 в регионе %s2",
"title": "Player search for {search} in region {region}",
"no_results": "Игроков не найдено"
}
},
@@ -547,13 +531,13 @@
"options": {
"limit": {
"name": "лимит",
"description": "Количество отображаемых ближайших игроков (по умолчанию: %s1)"
"description": "How many neighbors to display (default: {count})"
},
"season": {
"name": "сезон",
"description": "Номер сезона (по умолчанию: текущий)",
"choices": {
"current": "%s1 (текущая)"
"current": "{season} (current)"
}
},
"league": {
@@ -562,12 +546,12 @@
}
},
"body": {
"top_players": "Топ %s1 игроков",
"no_participation": "# %s1 не играл в рейтинг в сезоне %s2\n\nЭтот игрок не участвовал в этом сезоне или не получил прошлую калибровку.",
"top_players": "Top {count} players",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.",
"no_ongoing_season": "# Нет текущего сезона\n\nВ данный момент нет рейтингового сезона.",
"deleted_player": "Удалено %s1",
"deleted_player": "Deleted {id}",
"neighbors": "Рейтинг ближайших игроков",
"more": "+ ещё %s1"
"more": "+ {count} more"
}
},
"today": {
@@ -582,14 +566,14 @@
"name": "cобственные-танки",
"description": "Показывает все принадлежащие танки на уровне",
"body": {
"title": "# %s1 принадлежал уровень %s2 танков\n\n"
"title": "# {name}'s owned tier {tier} tanks\n\n"
}
},
"permissions": {
"name": "разрешения",
"description": "Проверяет, есть ли у бота необходимые разрешения для работы",
"body": {
"title": "# Разрешения\n\n%s1",
"title": "# Permissions\n\n{body}",
"view_channels": "Просмотр каналов: необходимо найти сообщение, на котором была использована кнопка обновления",
"read_message_history": "Просмотр истории сообщений: необходимо найти сообщение для обновления",
"attach_files": "Прикрепить файлы: необходимо для добавления изображений в команды на основе изображения",
@@ -601,7 +585,7 @@
"description": "Проверьте, что бот жив.",
"body": {
"pong": "Понг 🏓",
"pong_with_time": "Понг 🏓 - %s1мс"
"pong_with_time": "Pong 🏓 - {time}ms"
},
"subcommands": {
"blitzkit": {
@@ -618,7 +602,7 @@
"name": "информация-об-игроке",
"description": "Основная информация о игроке",
"body": {
"title": "Информация о %s1",
"title": "{name}'s information",
"nickname": "Никнейм",
"battles": "Боёв",
"winrate": "Коэффициент побед",
@@ -647,7 +631,7 @@
}
},
"errors": {
"no_participation": "# %s1 не получил рейтинга\n\nЭтот игрок в этом сезоне не участвовал в рейтинговом режиме.",
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"unrecorded_stats": "# Статистика недоступна в настоящее время\n\nВ настоящее время Wargaming, возможно, сталкивается с простоями сервера. Если сезон продолжается, статистика должна быть доступна в течение 24 часов."
}
}
@@ -672,15 +656,16 @@
"copied": "Скопировано!"
},
"tank_search": {
"select_dialog_title": "Search for tanks",
"swap_dialog_title": "Swap tank",
"select_dialog_title": "Поиск танка",
"swap_dialog_title": "Заменить танк",
"clear_filters": "Сбросить фильтры",
"login": "Login to use this",
"search_bar_hint": "Поиск танков...",
"recent": "Недавние",
"select_all": "Выбрать всё",
"count_singular": "1 танк",
"count_plural": "Танков: %s1",
"sorting_by": "Сортировать по %s1",
"count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}",
"no_tanks_found": {
"body": "Танков не найдено.",
"search_again": "Попробуйте повторить поиск.",
@@ -743,11 +728,11 @@
},
"home": {
"pwa": {
"title": "Install the BlitzKit App",
"new": "NEW",
"checking": "Checking compatibility...",
"instructions": "Instructions for Apple devices.",
"install": "Install",
"title": "Установите приложение BlitzKit",
"new": "НОВИНКА",
"checking": "Проверка совместимости...",
"instructions": "Инструкция для устройств Apple.",
"install": "Установка",
"dismiss": "Отклонить"
},
"discord": {
@@ -756,16 +741,16 @@
"action": "Discord"
},
"hero": {
"credit": "От %s1 ❤️"
"credit": "By {name} ❤️"
},
"hot_tanks": {
"title": "Популярные танки",
"subtitle": "За последнее %s1 дней"
"subtitle": "Last {days} days"
},
"other_projects": {
"title": "Другие классные проекты"
},
"help_translate": "Пожалуйста, помогите перевести %s1 на %s2!",
"help_translate": "Please help translate {name} to {language}!",
"seo_description": "Инструменты для World of Tanks Blitz"
},
"docs": {
@@ -780,8 +765,8 @@
"button": "Смешать и собрать",
"description": "Модули смешанного танка",
"seo_description": "Смешивание и сбор корпусов, башен и пушек танков из World of Tanks Blitz",
"screenshot": "Screenshot",
"randomize": "Случайный выбор"
"screenshot": "Скриншот",
"randomize": "Случайно"
},
"guess": {
"name": "Угадайте танк",
@@ -795,7 +780,7 @@
"next": "Следующий",
"no_results": "Ничего не найденo"
},
"stats": "%s1 / %s2 угадано верно"
"stats": "{correct} / {total} guessed correctly"
},
"tankopedia": {
"search": "Поиск характеристик...",
@@ -803,8 +788,8 @@
"button": "Поиск танков",
"description": "Танковая энциклопедия Blitz",
"seo_description": "Статистика, броня и многое другое по всем танкам World of Tanks Blitz",
"tank_seo_title": "%s1 — %s4 %s3 %s2 уровня | Танкопедия %s5 | World of Tanks Blitz (WoTB)",
"tank_seo_description": "%s1 броня, статистика, оборудование, снабжение и многое другое. %s2 УВМ, %s3hp альфа, %s4mm пробитие, %s5км/ч лучшая скорость, %s6hp здоровье.",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "{name} armor, statistics, equipment, provisions, and more. {dpm} DPM, {alpha}hp alpha, {penetration}mm penetration, {speed}kph top speed, {health}hp health.",
"visualizers": {
"reload": {
"skip": "Пропуск"
@@ -829,7 +814,6 @@
},
"view_range": {
"camo": "Камуфляж",
"percentage": "%s1%",
"ghost_factory": "Промзона",
"dead_rail": "Эшелон"
},
@@ -873,7 +857,6 @@
"reset": "Сброс"
},
"advanced": "Продвинутая подсветка",
"shooter": "Стреляет:",
"shot_card": {
"element": {
"primary": "Броня",
@@ -884,15 +867,15 @@
"track": "Гусеницы"
},
"status": {
"penetration": "Пробитие на %s1оп",
"penetration": "{damage}hp penetration",
"blocked": "Не пробил",
"ricochet": "Рикошет",
"splash": "Урон осколками на %s1оп"
"splash": "{damage}hp splash"
},
"stats": {
"thickness_and_angle": "%s1мм %s2°",
"nominal": "%s1мм номинала",
"ricochet_loss": "%s1% пробития"
"thickness_and_angle": "{thickness}mm {angle}°",
"nominal": "{thickness}mm nominal",
"ricochet_loss": "{loss}% penetration"
}
}
},
@@ -930,15 +913,15 @@
"tech_tree": {
"title": "Дерево танков",
"battle": "1 бой",
"battles": "%s1 боёв",
"route": "Ветка %s1 из %s2"
"battles": "{count} battles",
"route": "Route {index} of {count}"
},
"game_modes": {
"title": "Способности в игровых режимах"
},
"review": {
"title": "Видеообзоры",
"join": "Предложить ютубера для программы %s1"
"join": "Apply to {name} YouTuber program"
},
"configuration": {
"title": "Конфигурация",
@@ -974,15 +957,15 @@
"title": "Характеристики",
"compare": {
"label": "Сравнивать с",
"class": "%s2 %s1 уровня",
"tier": "Все %s1 уровня",
"class": "Tier {tier} {class}",
"tier": "All of tier {tier}",
"all": "Все танки"
},
"values": {
"shell_index": "Снаряд %s1",
"at_distance": "На %s1м",
"shell_index": "Shell {index}",
"at_distance": "At {distance}m",
"at_distance_slider_label": "Дистанция",
"dispersion_at_distance": "Разброс на %s1м",
"dispersion_at_distance": "Dispersion at {distance}m",
"gun_flexibility": "Углы наводки",
"speed": "Скорость",
"terrain_coefficients": "Сопротивление грунтам",
@@ -1131,9 +1114,9 @@
"description": "Статистика эффективности танков",
"seo_description": "Лучшие танки и их эффективность в World of Tanks Blitz",
"estimation": {
"body": "Примерная статистика на основе %s1 игроков. Обновлено %s2 назад.",
"hours": "%s1 часов",
"minutes": "%s1 минут"
"body": "Estimated stats based on {count} players. Updated {age} ago.",
"hours": "{count} hours",
"minutes": "{count} minutes"
},
"player_count": {
"label": "Количество игроков"
@@ -1165,10 +1148,10 @@
"button": "Просмотреть",
"description": "Аватары игрока Blitz",
"seo_description": "Все аватары игрока World of Tanks Blitz",
"last_updated": "Последнее обновление %s1",
"last_updated": "Last updated on {time}",
"search": {
"hint": "Поиск аватаров...",
"results": "Аватаров: %s1"
"results": "{count} avatars"
}
},
"session": {
@@ -1183,8 +1166,8 @@
"no_results": "Игроков не найдено"
},
"controls": {
"title": "Отслеживание %s1",
"subtitle": "Начиная с %s1",
"title": "Tracking {name}",
"subtitle": "Since {time}",
"reset": "Сброс",
"change": "Изменить"
},
@@ -1244,7 +1227,7 @@
"cancel": "Отмена",
"success": {
"title": "Скопировать URL",
"info": "Сгенерирован URL для %s1. Встройка начнет отслеживание, как только URL будет вставлен. Можно сбросить, щелкнув правой кнопкой мыши на ПК или долгим нажатием на мобильном телефоне и выбором «Сброс».",
"info": "Generated the URL for {name}. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"back": "Назад",
"copy": "Скопировать URL"
}
@@ -1329,9 +1312,9 @@
},
"api": {
"name": "API",
"button": "To the docs",
"description": "BlitzKit hosted API",
"seo_description": "BlitzKit hosted static API for World of Tanks Blitz"
"button": "К документации",
"description": "API сервера BlitzKit",
"seo_description": "Статический API сервера BlitzKit для World of Tanks Blitz"
}
},
"footer": {
+76 -93
View File
@@ -1,19 +1,19 @@
{
"test": {
"default": "тест",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is %s1 because it has the color of %s2. I like it so much that I will say its name 3 times! %s1! %s1! %s1! Once again, it's %s2, not %s3.",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.",
"fox": "Швидка бура лисиця перестрибує через лінивого собаку."
},
"common": {
"name": "BlitzKit",
"units": {
"m": "%s1м",
"mm": "%s1мм",
"deg": "%s1°",
"hp": "%s1хп",
"x": "х%s1",
"percentage": "%s1%",
"deg_s": "%s1°/с"
"m": "{value}m",
"mm": "{value}mm",
"deg": "{value}°",
"hp": "{value}hp",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}°/s"
},
"gun_types": {
"auto_loader": "Магазинна система заряджання",
@@ -186,11 +186,11 @@
"bot": {
"common": {
"errors": {
"clan_not_found": "# Не вдалося знайти клан\nНе вдалося знайти клан \"%s1\". Спробуйте вибрати клан з пошукового результату.",
"player_not_found": "# Не вдалося знайти користувача\nЯ не зміг знайти користувача \"%s1\". Спробуйте вибрати користувача з результату пошуку, ввести коректний нікнейм, або використати команду '/link'.",
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
"player_not_linked": "# Використайте команду \"/link\" щоб почати\nЯ не знаю, хто ви, але ви можете сказати мені сьогодні!",
"tank_name_not_found": "# Танк не знайдено\nНе вдалось знайти танк за ім'ям \"%s1\".",
"tank_id_not_found": "# Танк не знайдено\nНе вдалось знайти танк за ID \"%s1\". Спробуйте ввести назву танка замість числа.",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.",
"no_tank_stats": "# Немає статистики для танка\nЦей гравець не має статистики.\nМожливо, це не той гравець, якого ви шукаєте.",
"get_help": "Допомогти Discord серверу",
"uncaught_error": "# Упс! BlitzKit зіткнувся з помилкою!\nНам дуже шкода. Можете попросити допомоги на [офіційному сервері Discord](https://discord.gg/nDt7AjGJQH).",
@@ -284,19 +284,19 @@
"name": "рівень",
"description": "Рівень",
"choices": {
"tier": "Рівень %s1 - %s2"
"tier": "Tier {tier_1} - {tier_2}"
}
}
},
"periods": {
"career": "Кар'єра",
"today": "Сьогодні",
"days": "%s1 днів",
"custom": "%s1 - %s2 днів"
"days": "{days} days",
"custom": "{day_1} - {day_2} days"
},
"filters": {
"none": "Немає фільтрів",
"tier": "Рівень %s1"
"tier": "Tier {tier}"
},
"no_data": {
"battles_in_period": "За цей період боїв не було",
@@ -319,22 +319,6 @@
}
},
"commands": {
"auction": {
"name": "аукціон",
"description": "Танки доступні зараз на аукціоні",
"body": {
"title": "Бліц Аукціон",
"subtitle": "%s1 доступно • наступна ціна %s2\nПоточна ставка: %s3",
"next": "Наступна ціна:%s1",
"available": "Доступно: %s1 / %s2"
},
"errors": {
"no_auction": "# Немає поточного аукціону\n\nНаразі немає танків, доступних для купівлі на аукціоні. Якщо ви вважаєте це помилкою, будь ласка, повідомте про цю невідповідність на [офіційний Дискорд сервер](https://discord.gg/nDt7AjGJQH)."
},
"actions": {
"bid": "Поточна ставка"
}
},
"replay": {
"name": "реплей",
"description": "Показати результати реплею"
@@ -355,19 +339,19 @@
"body": {
"subtitle": "Дослідження",
"total": "Загалом",
"research": "Дослідження: %s1",
"upgrades": "Покращення: %s1",
"purchase": "Придбання: %s1",
"equipment": "Спорядження: %s1",
"research": "Research: {cost}",
"upgrades": "Upgrades: {cost}",
"purchase": "Purchase: {cost}",
"equipment": "Equipment: {cost}",
"estimation": "# Це оцінка!\n\nЦей список може включати вже досліджені танки через неточну інформацію для вантажу. Спробуйте використати \"початковий танк\" з рядка за допомогою команди."
},
"errors": {
"non_tech_tree": "# %s1 не в технічному дереві\n\nВи не можете досліджувати преміум/колекційний танк.",
"tier_1": "# %s1 це рівень I\n\nТанки рівню I завжди відкриті для всіх гравців безкоштовно.",
"already_researched": "# %s1 уже досліджено!\n\nСпробуйте забезпечити `starting-tank` коли використовуєте команду щоб подивитись підсумки гілки, яку ви вже дослідили.",
"start_end_equal": "# %s1 було надано двічі\n\nПереконайся, що `starting-tank` та `target-tank` різні.",
"tanks_not_on_line": ".",
"unordered": ""
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank."
}
},
"about": {
@@ -410,7 +394,7 @@
"wn8": "WN8",
"winrate": "Відсоток перемог",
"damage": "Шкода",
"unknown_tank": "Невідомий танк %s1"
"unknown_tank": "Unknown tank {id}"
}
},
"debug": {
@@ -446,12 +430,12 @@
"options": {
"threshold": {
"name": "поріг",
"description": "Кількість днів неактивності (за замовчуванням: %s1 днів)"
"description": "The number of days inactive (default: {days} days)"
}
},
"body": {
"subtitle": "Неактивний %s1+ днів",
"listing": "%s1 днів"
"subtitle": "Inactive for {days}+ days",
"listing": "{days} days"
}
},
"full_stats": {
@@ -494,7 +478,7 @@
"body": {
"accounts_linked": "Прив'язані акаунти",
"no_role_permissions": {
"title": "%s1 не вдалося перевірити",
"title": "{name} failed to verify",
"description": "У мене немає дозволу керувати ролями."
}
},
@@ -509,11 +493,11 @@
"options": {
"limit": {
"name": "ліміт",
"description": "Максимальна кількість результатів клану (за замовчуванням: %s1)"
"description": "The max number of clan results (default: {limit})"
}
},
"body": {
"title": "Clan search for %s1 in region %s2",
"title": "Clan search for {search} in region {region}",
"no_results": "Жодного клану не знайдено"
}
},
@@ -523,11 +507,11 @@
"options": {
"limit": {
"name": "ліміт",
"description": "The max number of player results (default: %s1)"
"description": "The max number of player results (default: {limit})"
}
},
"body": {
"title": "Player search for %s1 in region %s2",
"title": "Player search for {search} in region {region}",
"no_results": "Гравця не знайдено"
}
},
@@ -547,13 +531,13 @@
"options": {
"limit": {
"name": "ліміт",
"description": ""
"description": "How many neighbors to display (default: {count})"
},
"season": {
"name": "сезон",
"description": "Базова інформація про гравця",
"choices": {
"current": "%s1 (current)"
"current": "{season} (current)"
}
},
"league": {
@@ -562,12 +546,12 @@
}
},
"body": {
"top_players": "Top %s1 players",
"no_participation": "# %s1 didn't play rating in season %s2\n\nThis player did not participate in this season or did not get past calibration.",
"top_players": "Top {count} players",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.",
"no_ongoing_season": "# No ongoing season\n\nThere isn't a currently running rating season.",
"deleted_player": "Deleted %s1",
"deleted_player": "Deleted {id}",
"neighbors": "Rating neighbors",
"more": "+ %s1 more"
"more": "+ {count} more"
}
},
"today": {
@@ -582,14 +566,14 @@
"name": "отримані танки",
"description": "Показує всі ваші танки даного рівня",
"body": {
"title": "# %s1's owned tier %s2 tanks\n\n"
"title": "# {name}'s owned tier {tier} tanks\n\n"
}
},
"permissions": {
"name": "дозволи",
"description": "Checks wether the bot has the required permissions to function",
"body": {
"title": "# Permissions\n\n%s1",
"title": "# Permissions\n\n{body}",
"view_channels": "View channels: needed to find the message the refresh button was used on",
"read_message_history": "Read message history: needed to find the message to refresh",
"attach_files": "Attach files: needed to add images to image-based commands",
@@ -601,7 +585,7 @@
"description": "Check wether the bot is alive.",
"body": {
"pong": "Pong 🏓",
"pong_with_time": "Pong 🏓 - %s1ms"
"pong_with_time": "Pong 🏓 - {time}ms"
},
"subcommands": {
"blitzkit": {
@@ -618,7 +602,7 @@
"name": "player-info",
"description": "Базова інформація про гравця",
"body": {
"title": "%s1's information",
"title": "{name}'s information",
"nickname": "Нік",
"battles": "Бої",
"winrate": "Відсоток перемог",
@@ -647,7 +631,7 @@
}
},
"errors": {
"no_participation": "# %s1 hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"unrecorded_stats": "# Statistics currently unavailable\n\nWargaming may be currently be facing server downtime. If there is an on-going season, statistics should be available withing 24 hours."
}
}
@@ -675,12 +659,13 @@
"select_dialog_title": "Search for tanks",
"swap_dialog_title": "Swap tank",
"clear_filters": "Clear filters",
"login": "Login to use this",
"search_bar_hint": "Шукайте техніку...",
"recent": "Недавно переглянуті",
"select_all": "Вибрати все",
"count_singular": "1 танк",
"count_plural": "%s1 танків",
"sorting_by": "Сортувати за %s1",
"count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}",
"no_tanks_found": {
"body": "Нічого не знайдено.",
"search_again": "Спробуйте шукати заново.",
@@ -756,16 +741,16 @@
"action": "Discord"
},
"hero": {
"credit": "Зроблено %s1 ❤"
"credit": "By {name} ❤️"
},
"hot_tanks": {
"title": "Популярні танки",
"subtitle": "Останні %s1 дні(в)"
"subtitle": "Last {days} days"
},
"other_projects": {
"title": "Інші класні проєкти"
},
"help_translate": "Будь ласка, допоможіть перекласти %s1 на %s2!",
"help_translate": "Please help translate {name} to {language}!",
"seo_description": "Інструменти для всього, пов'язаного з WoT Blitz"
},
"docs": {
@@ -795,7 +780,7 @@
"next": "Next",
"no_results": "Немає результатів"
},
"stats": "%s1 / %s2 guessed correctly"
"stats": "{correct} / {total} guessed correctly"
},
"tankopedia": {
"search": "Search a stat...",
@@ -803,8 +788,8 @@
"button": "Знайти танки",
"description": "Танкова енциклопедія",
"seo_description": "Характеристики, броня та інше для всіх танків WoT Blitz",
"tank_seo_title": "%s1 - Рівень %s2 %s3 %s4 | %s5 Танкопедія | WoT Blitz",
"tank_seo_description": "%s1 броня, характеристики, обладнання, амуніція та більше. %s2 шкода на хвилину, %s3 разова шкода, %s4 мм пробиття, %s5 км/год максимальна швидкість, %s6 міцність.",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "{name} armor, statistics, equipment, provisions, and more. {dpm} DPM, {alpha}hp alpha, {penetration}mm penetration, {speed}kph top speed, {health}hp health.",
"visualizers": {
"reload": {
"skip": "Skip"
@@ -829,7 +814,6 @@
},
"view_range": {
"camo": "Camo",
"percentage": "%s1%",
"ghost_factory": "Ghost Factory",
"dead_rail": "Dead Rail"
},
@@ -873,7 +857,6 @@
"reset": "Reset"
},
"advanced": "Advanced highlighting",
"shooter": "Shooter:",
"shot_card": {
"element": {
"primary": "Primary",
@@ -884,15 +867,15 @@
"track": "Tracks"
},
"status": {
"penetration": "%s1hp penetration",
"penetration": "{damage}hp penetration",
"blocked": "Blocked",
"ricochet": "Рикошет",
"splash": "%s1hp splash"
"splash": "{damage}hp splash"
},
"stats": {
"thickness_and_angle": "%s1mm %s2°",
"nominal": "%s1mm nominal",
"ricochet_loss": "%s1% penetration"
"thickness_and_angle": "{thickness}mm {angle}°",
"nominal": "{thickness}mm nominal",
"ricochet_loss": "{loss}% penetration"
}
}
},
@@ -930,15 +913,15 @@
"tech_tree": {
"title": "Звичайний",
"battle": "1 бій",
"battles": "%s1 battles",
"route": "Route %s1 of %s2"
"battles": "{count} battles",
"route": "Route {index} of {count}"
},
"game_modes": {
"title": "Game mode abilities"
},
"review": {
"title": "Review videos",
"join": "Apply to %s1 YouTuber program"
"join": "Apply to {name} YouTuber program"
},
"configuration": {
"title": "Configuration",
@@ -974,15 +957,15 @@
"title": "Characteristics",
"compare": {
"label": "Compare against",
"class": "Tier %s1 %s2",
"tier": "All of tier %s1",
"class": "Tier {tier} {class}",
"tier": "All of tier {tier}",
"all": "Усі танки"
},
"values": {
"shell_index": "Снаряд %s1",
"at_distance": "At %s1m",
"shell_index": "Shell {index}",
"at_distance": "At {distance}m",
"at_distance_slider_label": "Відстань",
"dispersion_at_distance": "Dispersion at %s1m",
"dispersion_at_distance": "Dispersion at {distance}m",
"gun_flexibility": "Gun flexibility",
"speed": "Швидкість",
"terrain_coefficients": "Terrain coefficients",
@@ -1131,9 +1114,9 @@
"description": "Tank performance statistics",
"seo_description": "Best tanks and their performances in World of Tanks Blitz",
"estimation": {
"body": "Estimated stats based on %s1 players. Updated %s2 ago.",
"hours": "%s1 hours",
"minutes": "%s1 minutes"
"body": "Estimated stats based on {count} players. Updated {age} ago.",
"hours": "{count} hours",
"minutes": "{count} minutes"
},
"player_count": {
"label": "Player count"
@@ -1165,10 +1148,10 @@
"button": "Browse all",
"description": "Blitz player avatars",
"seo_description": "All World of Tanks Blitz player avatars",
"last_updated": "Last updated on %s1",
"last_updated": "Last updated on {time}",
"search": {
"hint": "Search avatars...",
"results": "%s1 avatars"
"results": "{count} avatars"
}
},
"session": {
@@ -1183,8 +1166,8 @@
"no_results": "Гравця не знайдено"
},
"controls": {
"title": "Відстежуємо %s1",
"subtitle": "Від %s1",
"title": "Tracking {name}",
"subtitle": "Since {time}",
"reset": "Скинути",
"change": "Змінити"
},
@@ -1244,7 +1227,7 @@
"cancel": "Cancel",
"success": {
"title": "Copy URL",
"info": "Generated the URL for %s1. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"info": "Generated the URL for {name}. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"back": "Назад",
"copy": "Copy URL"
}
+76 -93
View File
@@ -1,19 +1,19 @@
{
"test": {
"default": "测试",
"long": "这是一个测试用长字符串。你不会在用户界面中看见这些。我最喜欢的水果是%s1因为它的颜色是%s2。我如此喜欢它以至于我会把它的名字念3次!%s1!%s1!%s1!重申一次,它是%s2而不是%s3。",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.",
"fox": "褐色的狐狸迅速地跳过那只懒狗"
},
"common": {
"name": "BlitzKit",
"units": {
"m": "%s1公尺",
"mm": "%s1毫米",
"deg": "%s1度",
"hp": "%s1生命值",
"x": "x%s1",
"percentage": "%s1%",
"deg_s": "%s1度/秒"
"m": "{value}m",
"mm": "{value}mm",
"deg": "{value}°",
"hp": "{value}hp",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}°/s"
},
"gun_types": {
"auto_loader": "弹夹型战车",
@@ -186,11 +186,11 @@
"bot": {
"common": {
"errors": {
"clan_not_found": "# 找不到公会\n找不到\"%s1\"。请尝试从搜索结果中选择一个公会。",
"player_not_found": "# 找不到玩家\n无法找到玩家 “%s1”。 尝试从搜索结果中选择玩家,或输入一个有效的玩家名称, 或使用“/link”命令。",
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
"player_not_linked": "# 使用 `/link` 来开始\n我不知道你是谁,但你今天可以告诉我!",
"tank_name_not_found": "# 找不到战车\n找不到名为 “%s1 ”的战车。",
"tank_id_not_found": "# 找不到战车\n无法找到ID为 “%s1”的战车。 请尝试输入战车的名称而不是数字。",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.",
"no_tank_stats": "# 没有这辆战车的数据\n这个玩家没有可用资料。 这可能不是你要找的玩家。",
"get_help": "Discord的协助服务器",
"uncaught_error": "# BlitzKit 发生错误!\n我们对此感到抱歉。 欢迎加入[官方Discord](https://discord.gg/nDt7AjGJQH),以方便帮助你解决问题。",
@@ -284,19 +284,19 @@
"name": "阶级",
"description": "阶级",
"choices": {
"tier": "%s1阶 - %s2"
"tier": "Tier {tier_1} - {tier_2}"
}
}
},
"periods": {
"career": "玩家资料",
"today": "今日:",
"days": "%s1 天",
"custom": "%s1 - %s2 天"
"days": "{days} days",
"custom": "{day_1} - {day_2} days"
},
"filters": {
"none": "无筛选器",
"tier": "%s1 阶级"
"tier": "Tier {tier}"
},
"no_data": {
"battles_in_period": "在这段时间里没有参与任何战斗",
@@ -319,22 +319,6 @@
}
},
"commands": {
"auction": {
"name": "拍卖",
"description": "目前拍卖中的战车",
"body": {
"title": "Blitz 拍卖会",
"subtitle": "%s1 可用 • 下一个价格 %s2\n现在出价: %s3",
"next": "下一个价格: %s1",
"available": "可用: %s1 / %s2"
},
"errors": {
"no_auction": "# 目前没有正在进行中的拍卖会\n\n拍卖中没有可供购买的战车。 如果您认为这是一个错误,请在[官方的 Discord服务器](https://discord.gg/nDt7AjGJQH)中报告这个问题。"
},
"actions": {
"bid": "立刻购买"
}
},
"replay": {
"name": "回放",
"description": "显示重播结果"
@@ -355,19 +339,19 @@
"body": {
"subtitle": "研发",
"total": "全部",
"research": "研发:%s1",
"upgrades": "升级:%s1",
"purchase": "购买:%s1",
"equipment": "装备:%s1",
"research": "Research: {cost}",
"upgrades": "Upgrades: {cost}",
"purchase": "Purchase: {cost}",
"equipment": "Equipment: {cost}",
"estimation": "# 这是一个估计值!\n\n这个列表可能包含已经研发过的战车,因为 Wargaming 提供了不正确的资料。 如果可以,请尝试在同一研发线路中提供一个 “起始战车” 。"
},
"errors": {
"non_tech_tree": "# \"%s1\" 不在科技树里\n\n你不能研究一个 加值/收藏家 战车。",
"tier_1": "# “%s1”是一阶战车\n\n一阶战车是可免费解锁的。",
"already_researched": "# \"%s1\" 已完成研发\n\n请尝试在同一研发线路上提供“起始战车”, 以查看全部您已研发过的战车。",
"start_end_equal": "# \"%s1\" 重复提供了\n\n请确认 \"初始战车\" 和 \"目标战车\" 是不同的。",
"tanks_not_on_line": "# “%s1” 和 “%s2” 不在同一个研发线路上\n\n请确认“起始战车” 和 “目标战车” 在同一研发线路中。",
"unordered": "# “%s1” 阶级比 “%s2” 高\n\n请以 %s3 作为起始战车,因为它的阶级更低。"
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank."
}
},
"about": {
@@ -410,7 +394,7 @@
"wn8": "WN8",
"winrate": "胜率",
"damage": "伤害",
"unknown_tank": "未知战车 %s1"
"unknown_tank": "Unknown tank {id}"
}
},
"debug": {
@@ -446,12 +430,12 @@
"options": {
"threshold": {
"name": "阈值",
"description": "未上线天数( 默认:%s1 天)"
"description": "The number of days inactive (default: {days} days)"
}
},
"body": {
"subtitle": "%s1+ 天以上未上线",
"listing": "%s1 天"
"subtitle": "Inactive for {days}+ days",
"listing": "{days} days"
}
},
"full_stats": {
@@ -494,7 +478,7 @@
"body": {
"accounts_linked": "帐号已绑定",
"no_role_permissions": {
"title": "%s1 验证失败",
"title": "{name} failed to verify",
"description": "我没有管理身份的权限。"
}
},
@@ -509,11 +493,11 @@
"options": {
"limit": {
"name": "限制",
"description": "公会结果的最大数量 (默认:%s1)"
"description": "The max number of clan results (default: {limit})"
}
},
"body": {
"title": "在 %s2 地区搜索 %s1 公会的结果",
"title": "Clan search for {search} in region {region}",
"no_results": "没有找到该公会"
}
},
@@ -523,11 +507,11 @@
"options": {
"limit": {
"name": "限制",
"description": "最大玩家结果数 (默认:%s1)"
"description": "The max number of player results (default: {limit})"
}
},
"body": {
"title": "在 %s2 地区搜索 %s1 玩家的结果",
"title": "Player search for {search} in region {region}",
"no_results": "未找到玩家"
}
},
@@ -547,13 +531,13 @@
"options": {
"limit": {
"name": "限制",
"description": "显示附近有多少玩家(默认:%s1)"
"description": "How many neighbors to display (default: {count})"
},
"season": {
"name": "赛季",
"description": "赛季数 (默认:当前)",
"choices": {
"current": "%s1 (当前)"
"current": "{season} (current)"
}
},
"league": {
@@ -562,12 +546,12 @@
}
},
"body": {
"top_players": "前 %s1 玩家",
"no_participation": "# %s1 在赛季 %s2 没有进行过评价战斗\n\n该玩家没有参加该赛季或没有完成校准。",
"top_players": "Top {count} players",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.",
"no_ongoing_season": "# 没有进行中的赛季\n\n目前没有赛季。",
"deleted_player": "已删除玩家 %s1",
"deleted_player": "Deleted {id}",
"neighbors": "对邻居进行评分",
"more": "+ %s1 更多"
"more": "+ {count} more"
}
},
"today": {
@@ -582,14 +566,14 @@
"name": "已拥有的战车",
"description": "显示该阶级中所有您已拥有的战车",
"body": {
"title": "# %s1 所拥有的 %s2 阶战车\n\n"
"title": "# {name}'s owned tier {tier} tanks\n\n"
}
},
"permissions": {
"name": "权限",
"description": "检查机器人是否拥有运行所需的权限",
"body": {
"title": "# 权限\n\n%s1",
"title": "# Permissions\n\n{body}",
"view_channels": "查看频道:需要找到重新整理按钮使用的讯息",
"read_message_history": "读取消息历史: 需要找到消息以刷新",
"attach_files": "附加文件:需要将图像添加到基于图像的命令",
@@ -601,7 +585,7 @@
"description": "检查机器人是否处于活动状态。",
"body": {
"pong": "Pong 🏓",
"pong_with_time": "Pong 🏓 - %s1ms"
"pong_with_time": "Pong 🏓 - {time}ms"
},
"subcommands": {
"blitzkit": {
@@ -618,7 +602,7 @@
"name": "玩家信息",
"description": "玩家基本信息",
"body": {
"title": "%s1的信息",
"title": "{name}'s information",
"nickname": "昵称",
"battles": "战斗场次",
"winrate": "胜率",
@@ -647,7 +631,7 @@
}
},
"errors": {
"no_participation": "# %s1 未完成评价\n\n该玩家未参与本赛季的评价战斗。",
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.",
"unrecorded_stats": "# 统计数据目前无法使用\n\nWargaming 可能暂停了服务器。 如果有连续的赛季,统计数据可能在24小时内提供。"
}
}
@@ -675,12 +659,13 @@
"select_dialog_title": "Search for tanks",
"swap_dialog_title": "Swap tank",
"clear_filters": "清除筛选",
"login": "Login to use this",
"search_bar_hint": "搜寻战车……",
"recent": "最近查看的",
"select_all": "全选",
"count_singular": "1辆战车",
"count_plural": "%s1辆战车",
"sorting_by": "按 %s1 排序",
"count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}",
"no_tanks_found": {
"body": "找不到战车。",
"search_again": "请尝试重新搜索。",
@@ -756,16 +741,16 @@
"action": "Discord"
},
"hero": {
"credit": "由 %s1 制作 ❤️"
"credit": "By {name} ❤️"
},
"hot_tanks": {
"title": "受欢迎的坦克",
"subtitle": "过去 %s1 天"
"subtitle": "Last {days} days"
},
"other_projects": {
"title": "其他酷炫的项目"
},
"help_translate": "请帮忙将 %s1 翻译成 %s2!",
"help_translate": "Please help translate {name} to {language}!",
"seo_description": "战车世界闪击战 全方位工具"
},
"docs": {
@@ -795,7 +780,7 @@
"next": "下一个",
"no_results": "沒有結果"
},
"stats": "猜对了 %s1 / %s2"
"stats": "{correct} / {total} guessed correctly"
},
"tankopedia": {
"search": "搜索属性……",
@@ -803,8 +788,8 @@
"button": "搜索战车",
"description": "闪击战战车百科全书",
"seo_description": "战车世界闪击战的所有坦克参数, 装甲, 等等...",
"tank_seo_title": "%s1 - %s2 阶 %s3 %s4 | %s5 战车百科 | 战车世界闪击战 (WoTB)",
"tank_seo_description": "%s1 装甲,统计设备,装备,供给等。 %s2 每分钟伤害, %s3生命值, %s4毫米穿透, %s5kph 最高速度, %s6hp 生命值。",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "{name} armor, statistics, equipment, provisions, and more. {dpm} DPM, {alpha}hp alpha, {penetration}mm penetration, {speed}kph top speed, {health}hp health.",
"visualizers": {
"reload": {
"skip": "跳过"
@@ -829,7 +814,6 @@
},
"view_range": {
"camo": "迷彩",
"percentage": "%s1%",
"ghost_factory": "幽灵工厂",
"dead_rail": "死亡铁道"
},
@@ -873,7 +857,6 @@
"reset": "重置"
},
"advanced": "进阶高亮显示",
"shooter": "主视角射击者",
"shot_card": {
"element": {
"primary": "主装甲",
@@ -884,15 +867,15 @@
"track": "履带"
},
"status": {
"penetration": "%s1生命值 击穿",
"penetration": "{damage}hp penetration",
"blocked": "抵挡伤害",
"ricochet": "跳弹",
"splash": "%s1生命值 溅射"
"splash": "{damage}hp splash"
},
"stats": {
"thickness_and_angle": "等效%s1毫米 %s2度",
"nominal": "%s1毫米 装甲厚度",
"ricochet_loss": "%s1%概率击穿"
"thickness_and_angle": "{thickness}mm {angle}°",
"nominal": "{thickness}mm nominal",
"ricochet_loss": "{loss}% penetration"
}
}
},
@@ -930,15 +913,15 @@
"tech_tree": {
"title": "科技树",
"battle": "一场比赛",
"battles": "%s1场比赛",
"route": "路线 %s1 / %s2"
"battles": "{count} battles",
"route": "Route {index} of {count}"
},
"game_modes": {
"title": "游戏模式技能"
},
"review": {
"title": "回顾影片",
"join": "应用到 %s1 YouTuber程序"
"join": "Apply to {name} YouTuber program"
},
"configuration": {
"title": "配置设定",
@@ -974,15 +957,15 @@
"title": "属性",
"compare": {
"label": "比较",
"class": "%s1阶 %s2",
"tier": "所有 %s1 阶",
"class": "Tier {tier} {class}",
"tier": "All of tier {tier}",
"all": "所有战车"
},
"values": {
"shell_index": "炮弹 %s1",
"at_distance": "在 %s1 公尺",
"shell_index": "Shell {index}",
"at_distance": "At {distance}m",
"at_distance_slider_label": "距离",
"dispersion_at_distance": "%s1 公尺扩散度",
"dispersion_at_distance": "Dispersion at {distance}m",
"gun_flexibility": "炮管转动界限",
"speed": "速度",
"terrain_coefficients": "地形系数",
@@ -1131,9 +1114,9 @@
"description": "战车性能统计",
"seo_description": "最好的战车及其在战车世界闪击战中的表现",
"estimation": {
"body": "基于 %s1 个玩家的估计数据。更新于 %s2 之前。",
"hours": "%s1 小时",
"minutes": "%s1 分钟"
"body": "Estimated stats based on {count} players. Updated {age} ago.",
"hours": "{count} hours",
"minutes": "{count} minutes"
},
"player_count": {
"label": "玩家数量"
@@ -1165,10 +1148,10 @@
"button": "浏览全部",
"description": "Blitz玩家头像",
"seo_description": "所有战车世界闪击战玩家头像",
"last_updated": "最后更新于 %s1",
"last_updated": "Last updated on {time}",
"search": {
"hint": "搜索頭像……",
"results": "%s1 头像"
"results": "{count} avatars"
}
},
"session": {
@@ -1183,8 +1166,8 @@
"no_results": "找不到玩家"
},
"controls": {
"title": "追踪 %s1",
"subtitle": "起始于 %s1",
"title": "Tracking {name}",
"subtitle": "Since {time}",
"reset": "重置",
"change": "变更"
},
@@ -1244,7 +1227,7 @@
"cancel": "取消",
"success": {
"title": "拷贝 URL",
"info": "已为 %s1 生成 URL。 当 URL 粘贴后,嵌入功能将开始追踪。 您可以随时在 PC 上点击右键或手机上长按并选择「重置」来重置。",
"info": "Generated the URL for {name}. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
"back": "返回",
"copy": "拷贝 URL"
}
@@ -1,11 +1,11 @@
import { BLITZKIT_TANK_ICON_SIZE, fetchTankDefinitions } from '@blitzkit/core';
import { launch } from 'puppeteer';
import sharp from 'sharp';
import { commitAssets } from '../core/github/commitAssets';
import { FileChange } from '../core/github/commitMultipleFiles';
import { BLITZKIT_TANK_ICON_SIZE, fetchTankDefinitions } from "@blitzkit/core";
import { launch } from "puppeteer";
import sharp from "sharp";
import { commitAssets } from "../core/github/commitAssets";
import { FileChange } from "../core/github/commitMultipleFiles";
export async function blitzkitTankIcons() {
console.log('Building blitzkit tank icons...');
console.log("Building blitzkit tank icons...");
const browser = await launch();
const page = await browser.newPage();
@@ -21,7 +21,7 @@ export async function blitzkitTankIcons() {
try {
await page.goto(`http://localhost:4321/api/tankopedia/tank-icon/${id}/`, {
waitUntil: 'networkidle0',
waitUntil: "networkidle0",
});
} catch (error) {
console.error(`${id} ${name} time out`, error);
@@ -29,21 +29,21 @@ export async function blitzkitTankIcons() {
}
const screenshot = await page.screenshot({
type: 'webp',
type: "webp",
omitBackground: true,
});
const content = await sharp(screenshot).trim({ threshold: 100 }).toBuffer();
index++;
console.log(
`Rendered ${id} (${name}) ${((index / tanks.length) * 100).toFixed(2)}%`,
`Rendered ${id} (${name}) ${((index / tanks.length) * 100).toFixed(2)}%`
);
files.push({ path: `icons/tanks/blitzkit/${id}.webp`, content });
files.push({ path: `icons/tanks/big/${id}.webp`, content });
}
await page.close();
await browser.close();
await commitAssets('tank icons', files);
await commitAssets("tank icons", files);
}
+12 -5
View File
@@ -1,3 +1,4 @@
import node from "@astrojs/node";
import react from "@astrojs/react";
import { wrapper } from "@blitzkit/i18n";
import locales from "@blitzkit/i18n/locales.json";
@@ -9,19 +10,25 @@ import { defineConfig } from "astro/config";
import packageJSON from "../../package.json";
import { tools } from "./src/constants/tools";
const POSSIBLE_TARGETS = ["app", "web"];
const target = process.env.PUBLIC_TARGET;
if (!target || !POSSIBLE_TARGETS.includes(target)) {
throw new Error("Invalid target");
}
export default defineConfig({
devToolbar: { enabled: false },
vite: { server: { allowedHosts: [] } },
output: "static",
output: target === "web" ? "static" : "server",
site: "https://blitzkit.app",
outDir: "../../dist/website",
prefetch: {
defaultStrategy: "hover",
prefetchAll: true,
},
prefetch: { defaultStrategy: "hover", prefetchAll: true },
build: { concurrency: 4 },
adapter: target === "app" ? node({ mode: "standalone" }) : undefined,
integrations: [
favicons({
+7 -3
View File
@@ -2,14 +2,15 @@
"name": "@blitzkit/website",
"type": "module",
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"dev": "PUBLIC_TARGET=web astro dev",
"build": "PUBLIC_TARGET=web astro build",
"preview": "PUBLIC_TARGET=web astro preview",
"lint": "astro check",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/node": "^9.4.4",
"@astrojs/react": "^4.4.0",
"@astrolib/seo": "^1.0.0-beta.8",
"@fontsource/inter": "^5.2.8",
@@ -20,6 +21,7 @@
"@react-three/fiber": "^9.3.0",
"@types/react": "^19.1.14",
"@types/react-dom": "^19.1.9",
"@types/three": "^0.180.0",
"@vite-pwa/astro": "^1.1.0",
"astro": "^5.14.1",
"astro-favicons": "^3.1.5",
@@ -31,6 +33,8 @@
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-promise-suspense": "^0.3.4",
"three": "^0.180.0",
"three-stdlib": "^2.36.0",
"typescript": "^5.9.2",
"urlon": "^3.1.0"
}
@@ -53,32 +53,38 @@ function LayerEntry({
<td>
{layer.type === null && (
<Text size="2" color={shotStatusColor}>
{literals(strings.common.units.mm, [
Math.round(layer.distance * 1000).toLocaleString(locale),
])}
{literals(strings.common.units.mm, {
value: Math.round(layer.distance * 1000).toLocaleString(locale),
})}
</Text>
)}
{layer.type === ArmorType.External && (
<Text size="2" color={shotStatusColor}>
{literals(strings.common.units.mm, [
Math.round(layer.thickness).toLocaleString(locale),
])}
{literals(strings.common.units.mm, {
value: Math.round(layer.thickness).toLocaleString(locale),
})}
</Text>
)}
{(layer.type === ArmorType.Primary ||
layer.type === ArmorType.Spaced) && (
<Text size="2" color={shotStatusColor}>
{literals(
angle === undefined
? strings.common.units.mm
: strings.website.tools.tankopedia.sandbox.dynamic.shot_card
{angle === undefined
? literals(strings.common.units.mm, {
value: Math.round(layer.thicknessAngled).toLocaleString(
locale
),
})
: literals(
strings.website.tools.tankopedia.sandbox.dynamic.shot_card
.stats.thickness_and_angle,
[
Math.round(layer.thicknessAngled).toLocaleString(locale),
radToDeg(angle ?? 0).toFixed(0),
]
)}
{
thickness: Math.round(layer.thicknessAngled).toLocaleString(
locale
),
angle: radToDeg(angle ?? 0).toFixed(0),
}
)}
</Text>
)}
</td>
@@ -89,7 +95,7 @@ function LayerEntry({
{literals(
strings.website.tools.tankopedia.sandbox.dynamic.shot_card.stats
.ricochet_loss,
[Math.max(-100, -50 * layer.distance).toFixed(0)]
{ loss: Math.max(-100, -50 * layer.distance).toFixed(0) }
)}
</Text>
)}
@@ -100,7 +106,7 @@ function LayerEntry({
{literals(
strings.website.tools.tankopedia.sandbox.dynamic.shot_card.stats
.nominal,
[Math.round(layer.thickness).toLocaleString(locale)]
{ thickness: Math.round(layer.thickness).toLocaleString(locale) }
)}
</Text>
)}
@@ -132,7 +138,7 @@ export function ShotDisplayCard({ shot, ...props }: ShotDisplayCardProps) {
strings.website.tools.tankopedia.sandbox.dynamic.shot_card.status[
shot.in.status
],
[Math.round(shot.damage).toLocaleString(locale)]
{ damage: Math.round(shot.damage).toLocaleString(locale) }
)}
</Text>
@@ -202,7 +208,7 @@ export function ShotDisplayCard({ shot, ...props }: ShotDisplayCardProps) {
{literals(
strings.website.tools.tankopedia.sandbox.dynamic.shot_card
.status[shot.out.status],
[Math.round(shot.damage).toLocaleString(locale)]
{ damage: Math.round(shot.damage).toLocaleString(locale) }
)}
</Text>
@@ -7,6 +7,7 @@ import { hasEquipment } from "../../../core/blitzkit/hasEquipment";
import { modelTransformEvent } from "../../../core/blitzkit/modelTransform";
import { nameToArmorId } from "../../../core/blitzkit/nameToArmorId";
import { resolveArmor } from "../../../core/blitzkit/resolveThickness";
import { controlsEnabledEvent } from "../../../core/controlsEnabled";
import { useArmor } from "../../../hooks/useArmor";
import { useModel } from "../../../hooks/useModel";
import { useTankModelDefinition } from "../../../hooks/useTankModelDefinition";
@@ -154,9 +155,8 @@ export const StaticArmor = memo<ArmorSceneProps>(({ thicknessRange }) => {
position.set(event.clientX, event.clientY);
Tankopedia.mutate((draft) => {
draft.controlsEnabled = false;
});
controlsEnabledEvent.dispatch(false);
Tankopedia.mutate((draft) => {
draft.shot = undefined;
draft.highlightArmor = undefined;
@@ -192,9 +192,7 @@ export const StaticArmor = memo<ArmorSceneProps>(({ thicknessRange }) => {
modelTransformEvent.dispatch({ pitch, yaw });
}
function handlePointerUp() {
Tankopedia.mutate((draft) => {
draft.controlsEnabled = true;
});
controlsEnabledEvent.dispatch(true);
window.removeEventListener("pointermove", handlePointerMove);
window.removeEventListener("pointerup", handlePointerUp);
}
@@ -243,9 +241,7 @@ export const StaticArmor = memo<ArmorSceneProps>(({ thicknessRange }) => {
function onPointerDown(event: ThreeEvent<PointerEvent>) {
event.stopPropagation();
Tankopedia.mutate((draft) => {
draft.controlsEnabled = false;
});
controlsEnabledEvent.dispatch(false);
Tankopedia.mutate((draft) => {
draft.shot = undefined;
draft.highlightArmor = undefined;
@@ -284,9 +280,7 @@ export const StaticArmor = memo<ArmorSceneProps>(({ thicknessRange }) => {
modelTransformEvent.dispatch({ pitch, yaw });
}
function handlePointerUp() {
Tankopedia.mutate((draft) => {
draft.controlsEnabled = true;
});
controlsEnabledEvent.dispatch(true);
window.removeEventListener("pointermove", handlePointerMove);
window.removeEventListener("pointerup", handlePointerUp);
}
@@ -324,9 +318,7 @@ export const StaticArmor = memo<ArmorSceneProps>(({ thicknessRange }) => {
function onPointerDown(event: ThreeEvent<PointerEvent>) {
event.stopPropagation();
Tankopedia.mutate((draft) => {
draft.controlsEnabled = false;
});
controlsEnabledEvent.dispatch(false);
Tankopedia.mutate((draft) => {
draft.shot = undefined;
draft.highlightArmor = undefined;
@@ -364,9 +356,7 @@ export const StaticArmor = memo<ArmorSceneProps>(({ thicknessRange }) => {
modelTransformEvent.dispatch({ pitch, yaw });
}
function handlePointerUp() {
Tankopedia.mutate((draft) => {
draft.controlsEnabled = true;
});
controlsEnabledEvent.dispatch(true);
window.removeEventListener("pointermove", handlePointerMove);
window.removeEventListener("pointerup", handlePointerUp);
@@ -51,10 +51,9 @@ export function CompareTable({ stats }: CompareTableProps) {
variant="surface"
style={{
position: "absolute",
maxWidth: "100%",
maxHeight: "100%",
width: "100%",
height: "100%",
// height: 'calc(100vh - 128px)'
borderRadius: 0,
}}
>
<Table.Header>
@@ -155,7 +155,7 @@ export function GenerateURL({ embed }: GenerateURLProps) {
{literals(
strings.website.tools.embed.configuration.export.generate
.success.info,
[`${copyUser?.nickname}`]
{ name: copyUser?.nickname }
)}
</Text>
</Flex>
@@ -50,9 +50,9 @@ export function GalleryList({ skeleton }: MaybeSkeletonComponentProps) {
{skeleton ? (
<InlineSkeleton width="7rem" />
) : (
literals(strings.website.tools.gallery.search.results, [
filtered.length.toLocaleString(locale),
])
literals(strings.website.tools.gallery.search.results, {
count: filtered.length.toLocaleString(locale),
})
)}
</Text>
+12 -4
View File
@@ -1,4 +1,5 @@
import {
asset,
SEARCH_KEYS,
TankDefinition,
TIER_ROMAN_NUMERALS,
@@ -110,6 +111,7 @@ export function Guesser() {
return (
<SearchResults.Item
key={result.id}
onClick={() => {
if (!input.current) return;
@@ -118,6 +120,12 @@ export function Guesser() {
setResults(null);
}}
text={unwrap(result.name)}
prefix={
<img
style={{ width: "1em", height: "1em" }}
src={asset(`flags/circle/${result.nation}.webp`)}
/>
}
discriminator={
<Flex
align="center"
@@ -139,10 +147,10 @@ export function Guesser() {
<Flex justify="center" style={{ userSelect: "none" }}>
<Text>
{literals(strings.website.tools.guess.stats, [
`${correctGuesses}`,
`${totalGuesses}`,
])}
{literals(strings.website.tools.guess.stats, {
correct: correctGuesses,
total: totalGuesses,
})}
</Text>
</Flex>
+18 -16
View File
@@ -1,8 +1,8 @@
---
import { Code, Flex, Heading, Text } from '@radix-ui/themes';
import { resolveBranchName } from '../core/blitzkit/branches';
import { getStrings } from '../core/i18n/getStrings';
import { literals } from '@blitzkit/i18n/src/literals';
import { Code, Flex, Heading, Text } from "@radix-ui/themes";
import { resolveBranchName } from "../core/blitzkit/branches";
import { getStrings } from "../core/i18n/getStrings";
import { literals } from "@blitzkit/i18n/src/literals";
const { locale } = Astro.params;
const branchName = resolveBranchName(locale);
@@ -45,7 +45,7 @@ const strings = getStrings(locale);
);
}
#home-hero[data-variant='pride'] {
#home-hero[data-variant="pride"] {
--g-1-dark: var(--crimson-3);
--g-1-light: var(--crimson-7);
--g-2-dark: var(--orange-3);
@@ -58,7 +58,7 @@ const strings = getStrings(locale);
--g-7-light: var(--purple-7);
}
#home-hero[data-variant='spooky'] {
#home-hero[data-variant="spooky"] {
--g-1-dark: var(--orange-3);
--g-1-light: var(--orange-7);
--g-2-dark: var(--tomato-3);
@@ -73,23 +73,23 @@ const strings = getStrings(locale);
</style>
<script>
import { clamp, times } from 'lodash-es';
import { clamp, times } from "lodash-es";
const n = 5;
const homeHero = document.getElementById('home-hero');
const homeHero = document.getElementById("home-hero");
if (homeHero) {
switch (new Date().getMonth()) {
case 5:
homeHero.dataset.variant = 'pride';
homeHero.dataset.variant = "pride";
break;
case 9:
homeHero.dataset.variant = 'spooky';
homeHero.dataset.variant = "spooky";
break;
}
window.addEventListener('pointermove', (event) => {
window.addEventListener("pointermove", (event) => {
const x = event.clientX / window.innerWidth;
const c = clamp(
(1 -
@@ -97,7 +97,7 @@ const strings = getStrings(locale);
window.innerHeight) **
2,
0,
1,
1
);
// https://www.desmos.com/calculator/ndz2poxk32
@@ -128,13 +128,13 @@ const strings = getStrings(locale);
width="100%"
>
<Flex direction="column" align="center" gap="1">
<Heading size={{ initial: '8', xs: '9' }} weight="bold" align="center">
<Flex align="center" gap={{ initial: '2', xs: '4' }}>
<Heading size={{ initial: "8", xs: "9" }} weight="bold" align="center">
<Flex align="center" gap={{ initial: "2", xs: "4" }}>
BlitzKit
{
isBranchNamed && (
<Code
size={{ initial: '7', xs: '8' }}
size={{ initial: "7", xs: "8" }}
color="gray"
variant="outline"
>
@@ -146,7 +146,9 @@ const strings = getStrings(locale);
</Heading>
<Text color="gray" align="center" size="4"
>{literals(strings.website.home.hero.credit, ['TrèsAbhi'])}</Text
>{
literals(strings.website.home.hero.credit, { name: "TrèsAbhi" })
}</Text
>
</Flex>
</Flex>
@@ -32,7 +32,7 @@ function Content() {
{strings.website.home.hot_tanks.title}
</Heading>
<Text color="gray" align="center" mb="5" size="2">
{literals(strings.website.home.hot_tanks.subtitle, ["7"])}
{literals(strings.website.home.hot_tanks.subtitle, { days: 7 })}
</Text>
<Flex justify="center" gap="4" wrap="wrap">
@@ -1,11 +1,25 @@
import { useThree, type ThreeEvent } from "@react-three/fiber";
import type { QuicklimeEvent } from "quicklime";
import { useCallback, useEffect, useRef } from "react";
import { Group, Vector2 } from "three";
import { awaitableModelDefinitions } from "../../../core/awaitables/modelDefinitions";
import { jsxTree } from "../../../core/blitzkit/jsxTree";
import {
modelTransformEvent,
type ModelTransformEventData,
} from "../../../core/blitzkit/modelTransform";
import { controlsEnabledEvent } from "../../../core/controlsEnabled";
import { useModel } from "../../../hooks/useModel";
import { Mixer } from "../../../stores/mixer";
const modelDefinitions = await awaitableModelDefinitions;
export function Model() {
const canvas = useThree((state) => state.gl.domElement);
const turretGroup = useRef<Group>(null!);
const gunGroup = useRef<Group>(null!);
const hull = Mixer.use((state) => state.hull);
const turret = Mixer.use((state) => state.turret);
const gun = Mixer.use((state) => state.gun);
@@ -31,6 +45,58 @@ export function Model() {
const gunTurretModel = gunTankModel.turrets[gun.turret.id];
const gunModel = gunTurretModel.guns[gun.gun.id];
const pointer = useRef(new Vector2());
const delta = useRef(new Vector2());
const enablePitchRotation = useRef(true);
const handlePointerDown = useCallback((event: ThreeEvent<PointerEvent>) => {
event.stopPropagation();
controlsEnabledEvent.dispatch(false);
pointer.current.set(event.clientX, event.clientY);
window.addEventListener("pointermove", handlePointerMove);
window.addEventListener("pointerup", handlePointerUp);
}, []);
const handlePointerMove = useCallback((event: PointerEvent) => {
const bounds = canvas.getBoundingClientRect();
delta.current.set(event.clientX, event.clientY).sub(pointer.current);
pointer.current.set(event.clientX, event.clientY);
modelTransformEvent.dispatch({
pitch:
modelTransformEvent.last!.pitch -
(enablePitchRotation.current
? delta.current.y * (Math.PI / bounds.height)
: 0),
yaw:
modelTransformEvent.last!.yaw +
delta.current.x * (Math.PI / bounds.width),
});
}, []);
const handlePointerUp = useCallback(() => {
controlsEnabledEvent.dispatch(true);
window.removeEventListener("pointermove", handlePointerMove);
window.removeEventListener("pointerup", handlePointerUp);
}, []);
useEffect(() => {
function handleModelTransform(
event: QuicklimeEvent<ModelTransformEventData>
) {
turretGroup.current.rotation.z = event.data.yaw;
gunGroup.current.rotation.x = event.data.pitch;
}
modelTransformEvent.on(handleModelTransform);
return () => {
modelTransformEvent.off(handleModelTransform);
};
}, []);
return (
<group rotation={[-Math.PI / 2, 0, 0]}>
{hullNodes.map((node) => {
@@ -49,75 +115,105 @@ export function Model() {
})}
<group
ref={turretGroup}
rotation={[0, 0, modelTransformEvent.last!.yaw]}
position={[
tankModel.turret_origin.x +
trackModel.origin.x -
turretTankModel.turret_origin.x -
turretTrackModel.origin.x,
tankModel.turret_origin.z +
trackModel.origin.z -
turretTankModel.turret_origin.z -
turretTrackModel.origin.z,
tankModel.turret_origin.y +
trackModel.origin.y -
turretTankModel.turret_origin.y -
turretTrackModel.origin.y,
tankModel.turret_origin.x + trackModel.origin.x,
tankModel.turret_origin.z + trackModel.origin.z,
tankModel.turret_origin.y + trackModel.origin.y,
]}
>
{turretNodes.map((node) => {
const isCurrentTurret =
node.name ===
`turret_${turretModel.model_id.toString().padStart(2, "0")}`;
const isVisible = isCurrentTurret;
if (!isVisible) return null;
return jsxTree(node, {
mesh(_, props, key) {
return <mesh {...props} key={key} castShadow receiveShadow />;
},
});
})}
<group
position={[
turretTankModel.turret_origin.x +
turretTrackModel.origin.x +
turretModel.gun_origin.x -
gunTankModel.turret_origin.x -
gunTrackModel.origin.x -
gunTurretModel.gun_origin.x,
turretTankModel.turret_origin.z +
turretTrackModel.origin.z +
turretModel.gun_origin.z -
gunTankModel.turret_origin.z -
gunTrackModel.origin.z -
gunTurretModel.gun_origin.z,
turretTankModel.turret_origin.y +
turretTrackModel.origin.y +
turretModel.gun_origin.y -
gunTankModel.turret_origin.y -
gunTrackModel.origin.y -
gunTurretModel.gun_origin.y,
-turretTankModel.turret_origin.x - turretTrackModel.origin.x,
-turretTankModel.turret_origin.z - turretTrackModel.origin.z,
-turretTankModel.turret_origin.y - turretTrackModel.origin.y,
]}
>
{gunNodes.map((node) => {
const isCurrentMantlet =
{turretNodes.map((node) => {
const isCurrentTurret =
node.name ===
`gun_${gunModel.model_id.toString().padStart(2, "0")}_mask`;
const isCurrentGun =
node.name ===
`gun_${gunModel.model_id.toString().padStart(2, "0")}`;
const isVisible = isCurrentGun || isCurrentMantlet;
`turret_${turretModel.model_id.toString().padStart(2, "0")}`;
const isVisible = isCurrentTurret;
if (!isVisible) return null;
return jsxTree(node, {
mesh(_, props, key) {
return <mesh {...props} key={key} castShadow receiveShadow />;
return (
<mesh
{...props}
key={key}
castShadow
receiveShadow
onPointerDown={(event) => {
enablePitchRotation.current = false;
handlePointerDown(event);
}}
/>
);
},
});
})}
<group
ref={gunGroup}
rotation={[modelTransformEvent.last!.pitch, 0, 0]}
position={[
turretTankModel.turret_origin.x +
turretTrackModel.origin.x +
turretModel.gun_origin.x,
turretTankModel.turret_origin.z +
turretTrackModel.origin.z +
turretModel.gun_origin.z,
turretTankModel.turret_origin.y +
turretTrackModel.origin.y +
turretModel.gun_origin.y,
]}
>
<group
position={[
-gunTankModel.turret_origin.x -
gunTrackModel.origin.x -
gunTurretModel.gun_origin.x,
-gunTankModel.turret_origin.z -
gunTrackModel.origin.z -
gunTurretModel.gun_origin.z,
-gunTankModel.turret_origin.y -
gunTrackModel.origin.y -
gunTurretModel.gun_origin.y,
]}
>
{gunNodes.map((node) => {
const isCurrentMantlet =
node.name ===
`gun_${gunModel.model_id.toString().padStart(2, "0")}_mask`;
const isCurrentGun =
node.name ===
`gun_${gunModel.model_id.toString().padStart(2, "0")}`;
const isVisible = isCurrentGun || isCurrentMantlet;
if (!isVisible) return null;
return jsxTree(node, {
mesh(_, props, key) {
return (
<mesh
{...props}
key={key}
castShadow
receiveShadow
onPointerDown={(event) => {
enablePitchRotation.current = true;
handlePointerDown(event);
}}
/>
);
},
});
})}
</group>
</group>
</group>
</group>
</group>
@@ -1,12 +1,30 @@
import { OrbitControls } from "@react-three/drei";
import { Canvas } from "@react-three/fiber";
import { forwardRef, Suspense } from "react";
import type { QuicklimeEvent } from "quicklime";
import { forwardRef, Suspense, useEffect, useRef } from "react";
import type { OrbitControls as OrbitControlsClass } from "three-stdlib";
import { controlsEnabledEvent } from "../../core/controlsEnabled";
import { Lighting } from "../Tankopedia/HeroSection/components/TankSandbox/components/Lighting";
import { SceneProps } from "../Tankopedia/HeroSection/components/TankSandbox/components/SceneProps";
import { MixerFallback } from "./components/MixerFallback";
import { Model } from "./components/Model";
export const MixerScene = forwardRef<HTMLCanvasElement>((_, ref) => {
const controls = useRef<OrbitControlsClass>(null!);
useEffect(() => {
function handleControlsEnabled(event: QuicklimeEvent<boolean>) {
if (!controls.current) return;
controls.current.enabled = event.data;
}
controlsEnabledEvent.on(handleControlsEnabled);
return () => {
controlsEnabledEvent.off(handleControlsEnabled);
};
}, []);
return (
<Canvas
ref={ref}
@@ -18,6 +36,7 @@ export const MixerScene = forwardRef<HTMLCanvasElement>((_, ref) => {
}}
>
<OrbitControls
ref={controls}
maxDistance={20}
minDistance={5}
enableDamping={false}
+3 -2
View File
@@ -11,6 +11,7 @@ import { getStrings } from "../core/i18n/getStrings";
import { Var } from "../core/radix/var";
import { LinkI18n } from "./LinkI18n";
import { tools } from "../constants/tools";
import { NavbarAccount } from "./NavbarAccount";
export interface Props {
integrated?: boolean;
@@ -182,7 +183,7 @@ const strings = getStrings(locale);
<GearIcon width="1em" height="1em" />
</LinkI18n>
<!-- <NavbarAccount client:idle /> -->
<NavbarAccount {locale} client:idle />
<Flex align="center" display={{ initial: "flex", sm: "none" }}>
<IconButton variant="ghost" color="gray" className="hamburger">
@@ -200,7 +201,7 @@ const strings = getStrings(locale);
display={{ initial: "flex", sm: "none" }}
>
{
toolsFiltered.map(( tool) => {
toolsFiltered.map((tool) => {
const toolStrings =
strings.website.tools[
(tool.strings ?? tool.id) as keyof typeof strings.website.tools
@@ -8,13 +8,25 @@ import {
Text,
} from "@radix-ui/themes";
import { Suspense } from "react";
import {
LocaleProvider,
type LocaleAcceptorProps,
} from "../../hooks/useLocale";
import { App } from "../../stores/app";
import { BlitzKitTheme } from "../BlitzKitTheme";
import { WargamingAccountName } from "../WargamingAccountName";
import { WargamingIcon } from "../WargamingIcon";
import { WargamingLoginButton } from "../WargamingLoginButton";
export function NavbarAccount() {
export function NavbarAccount({ locale }: LocaleAcceptorProps) {
return (
<LocaleProvider locale={locale}>
<Content />
</LocaleProvider>
);
}
function Content() {
const logins = App.use((state) => state.logins);
return (
@@ -1,12 +1,12 @@
import { formatCompact } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n/src/literals';
import { InfoCircledIcon } from '@radix-ui/react-icons';
import { Callout, Flex } from '@radix-ui/themes';
import { awaitableAverageDefinitions } from '../../core/awaitables/averageDefinitions';
import { awaitableDiscoveredIdsDefinitions } from '../../core/awaitables/discoveredIdsDefinitions';
import { useLocale } from '../../hooks/useLocale';
import type { MaybeSkeletonComponentProps } from '../../types/maybeSkeletonComponentProps';
import { InlineSkeleton } from '../InlineSkeleton';
import { formatCompact } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n/src/literals";
import { InfoCircledIcon } from "@radix-ui/react-icons";
import { Callout, Flex } from "@radix-ui/themes";
import { awaitableAverageDefinitions } from "../../core/awaitables/averageDefinitions";
import { awaitableDiscoveredIdsDefinitions } from "../../core/awaitables/discoveredIdsDefinitions";
import { useLocale } from "../../hooks/useLocale";
import type { MaybeSkeletonComponentProps } from "../../types/maybeSkeletonComponentProps";
import { InlineSkeleton } from "../InlineSkeleton";
const [discoveredIdsDefinitions, averageDefinitions] = await Promise.all([
awaitableDiscoveredIdsDefinitions,
@@ -17,22 +17,22 @@ export function PerformanceInfo({ skeleton }: MaybeSkeletonComponentProps) {
const { strings, locale } = useLocale();
const samples = formatCompact(
locale,
Math.round(discoveredIdsDefinitions.count),
Math.round(discoveredIdsDefinitions.count)
);
const minutesAgo = Math.floor(
(Date.now() - averageDefinitions.time) / (1000 * 60),
(Date.now() - averageDefinitions.time) / (1000 * 60)
);
const hoursAgo = Math.floor(minutesAgo / 60);
const timeAgo = literals(
strings.website.tools.performance.estimation[
hoursAgo === 0 ? 'minutes' : 'hours'
hoursAgo === 0 ? "minutes" : "hours"
],
[`${hoursAgo === 0 ? minutesAgo : hoursAgo}`],
{ count: hoursAgo === 0 ? minutesAgo : hoursAgo }
);
return (
<Flex justify="center">
<Callout.Root style={{ width: 'fit-content' }}>
<Callout.Root style={{ width: "fit-content" }}>
<Callout.Icon>
<InfoCircledIcon />
</Callout.Icon>
@@ -40,10 +40,10 @@ export function PerformanceInfo({ skeleton }: MaybeSkeletonComponentProps) {
{skeleton && <InlineSkeleton width="9rem" />}
{!skeleton &&
literals(strings.website.tools.performance.estimation.body, [
samples,
timeAgo,
])}
literals(strings.website.tools.performance.estimation.body, {
count: samples,
age: timeAgo,
})}
</Callout.Text>
</Callout.Root>
</Flex>
@@ -2,29 +2,30 @@ import {
Badge,
Button,
Flex,
Text,
type ButtonProps,
type FlexProps,
} from '@radix-ui/themes';
import type { ReactNode } from 'react';
} from "@radix-ui/themes";
import type { ReactNode } from "react";
function Root(props: FlexProps) {
return <Flex direction="column" gap="2" width="100%" {...props} />;
}
interface ItemProps extends ButtonProps {
interface ItemProps extends Omit<ButtonProps, "prefix"> {
prefix?: React.ReactNode;
text: string;
discriminator?: ReactNode;
}
function Item({ text, discriminator, ...props }: ItemProps) {
function Item({ text, discriminator, prefix, ...props }: ItemProps) {
return (
<Button variant="ghost" {...props} highContrast>
<Flex
justify={discriminator === undefined ? 'center' : 'between'}
width="100%"
gap="2"
>
{text}
<Flex width="100%" gap="2" align="center">
{prefix}
<Text style={{ flex: 1 }} align={prefix ? "left" : "center"}>
{text}
</Text>
{discriminator !== undefined && <Badge>{discriminator}</Badge>}
</Flex>
</Button>
@@ -5,6 +5,11 @@ import {
TankType,
TIER_ROMAN_NUMERALS,
} from "@blitzkit/core";
import {
ComponentBooleanIcon,
LockClosedIcon,
LockOpen2Icon,
} from "@radix-ui/react-icons";
import {
Box,
Flex,
@@ -13,15 +18,17 @@ import {
Link,
Popover,
Text,
Tooltip,
type FlexProps,
} from "@radix-ui/themes";
import { isEqual, times } from "lodash-es";
import { awaitableGameDefinitions } from "../../../core/awaitables/gameDefinitions";
import { Var } from "../../../core/radix/var";
import { useLocale } from "../../../hooks/useLocale";
import { App } from "../../../stores/app";
import { TankFilters } from "../../../stores/tankFilters";
import { TankSort } from "../../../stores/tankopediaSort";
import { classIcons } from "../../ClassIcon";
import { ExperimentIcon } from "../../ExperimentIcon";
import { GunAutoloaderIcon } from "../../GunAutoloaderIcon";
import { GunAutoreloaderIcon } from "../../GunAutoreloaderIcon";
import { GunRegularIcon } from "../../GunRegularIcon";
@@ -108,28 +115,80 @@ function ShellFilter({ index, premium }: { index: number; premium?: boolean }) {
);
}
export function FilterControl({ compact }: FilterControlProps) {
function OwnershipFilter(props: FlexProps) {
const tankFilters = TankFilters.use();
const wargaming = App.use((state) => state.logins.wargaming);
return (
<Flex
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction="column"
{...props}
>
<IconButton
disabled={!wargaming}
variant={tankFilters.ownership === "all" ? "solid" : "soft"}
radius="none"
color={tankFilters.ownership === "all" ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
draft.ownership = "all";
});
}}
>
<ComponentBooleanIcon />
</IconButton>
<IconButton
disabled={!wargaming}
variant={tankFilters.ownership === "owned" ? "solid" : "soft"}
radius="none"
color={tankFilters.ownership === "owned" ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
draft.ownership = "owned";
});
}}
>
<LockOpen2Icon />
</IconButton>
<IconButton
disabled={!wargaming}
variant={tankFilters.ownership === "unowned" ? "solid" : "soft"}
radius="none"
color={tankFilters.ownership === "unowned" ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
draft.ownership = "unowned";
});
}}
>
<LockClosedIcon />
</IconButton>
</Flex>
);
}
export function FilterControl() {
const tankFilters = TankFilters.use();
const { strings } = useLocale();
const clearable = !isEqual(tankFilters, TankFilters.initial);
const wargaming = App.use((state) => state.logins.wargaming);
return (
<Flex direction="column" align="center">
<Flex
height="fit-content"
gap="2"
align={{ initial: "start", md: "center" }}
justify="center"
>
<Flex height="fit-content" gap="1" align="start" justify="center">
<Flex
flexShrink="0"
direction={compact ? "row" : { initial: "row", md: "column" }}
overflow="hidden"
style={{ borderRadius: "var(--radius-5)" }}
style={{ borderRadius: "var(--radius-4)" }}
>
<Flex
direction={compact ? "column" : { md: "row", initial: "column" }}
>
<Flex direction="column">
{times(5, (index) => {
const tier = index + 1;
const selected = tankFilters.tiers?.includes(tier);
@@ -167,9 +226,7 @@ export function FilterControl({ compact }: FilterControlProps) {
}}
/>
<Flex
direction={compact ? "column" : { md: "row", initial: "column" }}
>
<Flex direction="column">
{times(5, (index) => {
const tier = index + 6;
const selected = tankFilters.tiers?.includes(tier);
@@ -202,13 +259,10 @@ export function FilterControl({ compact }: FilterControlProps) {
<Flex
flexShrink="0"
direction={compact ? "row" : { initial: "row", md: "column" }}
overflow="hidden"
style={{ borderRadius: "var(--radius-5)" }}
style={{ borderRadius: "var(--radius-4)" }}
>
<Flex
direction={compact ? "column" : { md: "row", initial: "column" }}
>
<Flex direction="column">
{gameDefinitions.nations
.slice(0, Math.ceil(gameDefinitions.nations.length / 2))
.map((nation) => {
@@ -250,9 +304,7 @@ export function FilterControl({ compact }: FilterControlProps) {
}}
/>
<Flex
direction={compact ? "column" : { md: "row", initial: "column" }}
>
<Flex direction="column">
{gameDefinitions.nations
.slice(Math.ceil(gameDefinitions.nations.length / 2))
.map((nation) => {
@@ -289,298 +341,274 @@ export function FilterControl({ compact }: FilterControlProps) {
</Flex>
<Flex
direction={compact ? "row" : { initial: "row", md: "column" }}
align="start"
gap={{ initial: "2", md: "1" }}
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction="column"
>
<Flex gap="2" align="start">
<Flex
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction={compact ? "column" : { md: "row", initial: "column" }}
>
{TANK_CLASSES.map((tankClass) => {
const Icon = classIcons[tankClass];
const selected = tankFilters.classes?.includes(tankClass);
{TANK_CLASSES.map((tankClass) => {
const Icon = classIcons[tankClass];
const selected = tankFilters.classes?.includes(tankClass);
return (
<IconButton
key={tankClass}
variant={selected ? "solid" : "soft"}
radius="none"
color={selected ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.classes.includes(tankClass)) {
draft.classes = draft.classes.filter(
(c) => c !== tankClass
);
} else {
draft.classes = [...draft.classes, tankClass];
}
});
}}
>
<Icon style={{ width: "1em", height: "1em" }} />
</IconButton>
);
})}
</Flex>
<Flex
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction={compact ? "column" : { md: "row", initial: "column" }}
>
return (
<IconButton
variant={
tankFilters.gunType.includes("regular") ? "solid" : "soft"
}
key={tankClass}
variant={selected ? "solid" : "soft"}
radius="none"
color={
tankFilters.gunType.includes("regular") ? undefined : "gray"
}
color={selected ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.gunType.includes("regular")) {
draft.gunType = draft.gunType.filter(
(t) => t !== "regular"
if (tankFilters.classes.includes(tankClass)) {
draft.classes = draft.classes.filter(
(c) => c !== tankClass
);
} else {
draft.gunType = [...draft.gunType, "regular"];
draft.classes = [...draft.classes, tankClass];
}
});
}}
>
<GunRegularIcon style={{ width: "1em", height: "1em" }} />
<Icon style={{ width: "1em", height: "1em" }} />
</IconButton>
<IconButton
variant={
tankFilters.gunType.includes("auto_loader") ? "solid" : "soft"
}
radius="none"
color={
tankFilters.gunType.includes("auto_loader")
? undefined
: "gray"
}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.gunType.includes("auto_loader")) {
draft.gunType = draft.gunType.filter(
(t) => t !== "auto_loader"
);
} else {
draft.gunType = [...draft.gunType, "auto_loader"];
}
});
}}
>
<GunAutoloaderIcon style={{ width: "1em", height: "1em" }} />
</IconButton>
<IconButton
variant={
tankFilters.gunType.includes("auto_reloader")
? "solid"
: "soft"
}
radius="none"
color={
tankFilters.gunType.includes("auto_reloader")
? undefined
: "gray"
}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.gunType.includes("auto_reloader")) {
draft.gunType = draft.gunType.filter(
(t) => t !== "auto_reloader"
);
} else {
draft.gunType = [...draft.gunType, "auto_reloader"];
}
});
}}
>
<GunAutoreloaderIcon style={{ width: "1em", height: "1em" }} />
</IconButton>
</Flex>
<Flex
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction={compact ? "column" : { md: "row", initial: "column" }}
>
<ShellFilter index={0} />
<ShellFilter index={1} premium />
<ShellFilter index={2} />
</Flex>
</Flex>
<Flex gap="2" align="start">
<Flex
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction={compact ? "column" : { md: "row", initial: "column" }}
>
<IconButton
variant={
tankFilters.types?.includes(TankType.RESEARCHABLE)
? "solid"
: "soft"
}
radius="none"
color={
tankFilters.types?.includes(TankType.RESEARCHABLE)
? undefined
: "gray"
}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.types.includes(TankType.RESEARCHABLE)) {
draft.types = draft.types.filter(
(t) => t !== TankType.RESEARCHABLE
);
} else {
draft.types = [...draft.types, TankType.RESEARCHABLE];
}
});
}}
>
<ResearchedIcon style={{ width: "1em", height: "1em" }} />
</IconButton>
<IconButton
variant={
tankFilters.types?.includes(TankType.PREMIUM)
? "solid"
: "soft"
}
radius="none"
color={
tankFilters.types?.includes(TankType.PREMIUM)
? "amber"
: "gray"
}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.types.includes(TankType.PREMIUM)) {
draft.types = draft.types.filter(
(t) => t !== TankType.PREMIUM
);
} else {
draft.types = [...draft.types, TankType.PREMIUM];
}
});
}}
>
<Text
color={
tankFilters.types?.includes(TankType.PREMIUM)
? undefined
: "amber"
}
style={{ display: "flex", justifyContent: "center" }}
>
<ResearchedIcon style={{ width: "1em", height: "1em" }} />
</Text>
</IconButton>
<IconButton
variant={
tankFilters.types?.includes(TankType.COLLECTOR)
? "solid"
: "soft"
}
radius="none"
color={
tankFilters.types?.includes(TankType.COLLECTOR)
? "blue"
: "gray"
}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.types.includes(TankType.COLLECTOR)) {
draft.types = draft.types.filter(
(t) => t !== TankType.COLLECTOR
);
} else {
draft.types = [...draft.types, TankType.COLLECTOR];
}
});
}}
>
<Text
color={
tankFilters.types?.includes(TankType.COLLECTOR)
? undefined
: "blue"
}
style={{ display: "flex", justifyContent: "center" }}
>
<ResearchedIcon style={{ width: "1em", height: "1em" }} />
</Text>
</IconButton>
</Flex>
<Flex
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction={compact ? "column" : { md: "row", initial: "column" }}
>
<IconButton
variant={tankFilters.testing === "include" ? "solid" : "soft"}
radius="none"
color={tankFilters.testing === "include" ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
draft.testing = "include";
});
}}
>
<ExperimentIcon
style={{ width: "1em", height: "1em", color: "currentColor" }}
/>
</IconButton>
<IconButton
variant={tankFilters.testing === "exclude" ? "solid" : "soft"}
radius="none"
color={tankFilters.testing === "exclude" ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
draft.testing = "exclude";
});
}}
>
<ScienceOffIcon
style={{ width: "1em", height: "1em", color: "currentColor" }}
/>
</IconButton>
<IconButton
variant={tankFilters.testing === "only" ? "solid" : "soft"}
radius="none"
color={tankFilters.testing === "only" ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
draft.testing = "only";
});
}}
>
<ScienceIcon
style={{ width: "1em", height: "1em", color: "currentColor" }}
/>
</IconButton>
</Flex>
</Flex>
);
})}
</Flex>
<Flex
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction="column"
>
<IconButton
variant={tankFilters.gunType.includes("regular") ? "solid" : "soft"}
radius="none"
color={tankFilters.gunType.includes("regular") ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.gunType.includes("regular")) {
draft.gunType = draft.gunType.filter((t) => t !== "regular");
} else {
draft.gunType = [...draft.gunType, "regular"];
}
});
}}
>
<GunRegularIcon style={{ width: "1em", height: "1em" }} />
</IconButton>
<IconButton
variant={
tankFilters.gunType.includes("auto_loader") ? "solid" : "soft"
}
radius="none"
color={
tankFilters.gunType.includes("auto_loader") ? undefined : "gray"
}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.gunType.includes("auto_loader")) {
draft.gunType = draft.gunType.filter(
(t) => t !== "auto_loader"
);
} else {
draft.gunType = [...draft.gunType, "auto_loader"];
}
});
}}
>
<GunAutoloaderIcon style={{ width: "1em", height: "1em" }} />
</IconButton>
<IconButton
variant={
tankFilters.gunType.includes("auto_reloader") ? "solid" : "soft"
}
radius="none"
color={
tankFilters.gunType.includes("auto_reloader") ? undefined : "gray"
}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.gunType.includes("auto_reloader")) {
draft.gunType = draft.gunType.filter(
(t) => t !== "auto_reloader"
);
} else {
draft.gunType = [...draft.gunType, "auto_reloader"];
}
});
}}
>
<GunAutoreloaderIcon style={{ width: "1em", height: "1em" }} />
</IconButton>
</Flex>
<Flex
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction="column"
>
<ShellFilter index={0} />
<ShellFilter index={1} premium />
<ShellFilter index={2} />
</Flex>
<Flex
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction="column"
>
<IconButton
variant={
tankFilters.types?.includes(TankType.RESEARCHABLE)
? "solid"
: "soft"
}
radius="none"
color={
tankFilters.types?.includes(TankType.RESEARCHABLE)
? undefined
: "gray"
}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.types.includes(TankType.RESEARCHABLE)) {
draft.types = draft.types.filter(
(t) => t !== TankType.RESEARCHABLE
);
} else {
draft.types = [...draft.types, TankType.RESEARCHABLE];
}
});
}}
>
<ResearchedIcon style={{ width: "1em", height: "1em" }} />
</IconButton>
<IconButton
variant={
tankFilters.types?.includes(TankType.PREMIUM) ? "solid" : "soft"
}
radius="none"
color={
tankFilters.types?.includes(TankType.PREMIUM) ? "amber" : "gray"
}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.types.includes(TankType.PREMIUM)) {
draft.types = draft.types.filter(
(t) => t !== TankType.PREMIUM
);
} else {
draft.types = [...draft.types, TankType.PREMIUM];
}
});
}}
>
<Text
color={
tankFilters.types?.includes(TankType.PREMIUM)
? undefined
: "amber"
}
style={{ display: "flex", justifyContent: "center" }}
>
<ResearchedIcon style={{ width: "1em", height: "1em" }} />
</Text>
</IconButton>
<IconButton
variant={
tankFilters.types?.includes(TankType.COLLECTOR) ? "solid" : "soft"
}
radius="none"
color={
tankFilters.types?.includes(TankType.COLLECTOR) ? "blue" : "gray"
}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
if (tankFilters.types.includes(TankType.COLLECTOR)) {
draft.types = draft.types.filter(
(t) => t !== TankType.COLLECTOR
);
} else {
draft.types = [...draft.types, TankType.COLLECTOR];
}
});
}}
>
<Text
color={
tankFilters.types?.includes(TankType.COLLECTOR)
? undefined
: "blue"
}
style={{ display: "flex", justifyContent: "center" }}
>
<ResearchedIcon style={{ width: "1em", height: "1em" }} />
</Text>
</IconButton>
</Flex>
<Flex
overflow="hidden"
style={{ borderRadius: "var(--radius-full)" }}
direction="column"
>
<IconButton
variant={tankFilters.testing === "include" ? "solid" : "soft"}
radius="none"
color={tankFilters.testing === "include" ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
draft.testing = "include";
});
}}
>
<ComponentBooleanIcon />
</IconButton>
<IconButton
variant={tankFilters.testing === "exclude" ? "solid" : "soft"}
radius="none"
color={tankFilters.testing === "exclude" ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
draft.testing = "exclude";
});
}}
>
<ScienceOffIcon
style={{ width: "1em", height: "1em", color: "currentColor" }}
/>
</IconButton>
<IconButton
variant={tankFilters.testing === "only" ? "solid" : "soft"}
radius="none"
color={tankFilters.testing === "only" ? undefined : "gray"}
highContrast
onClick={() => {
TankFilters.mutate((draft) => {
draft.testing = "only";
});
}}
>
<ScienceIcon
style={{ width: "1em", height: "1em", color: "currentColor" }}
/>
</IconButton>
</Flex>
{wargaming ? (
<OwnershipFilter />
) : (
<Tooltip content={strings.website.common.tank_search.login}>
<OwnershipFilter />
</Tooltip>
)}
</Flex>
{clearable && (
@@ -11,13 +11,15 @@ import { Callout, Flex, Link, Text, type FlexProps } from "@radix-ui/themes";
import fuzzysort from "fuzzysort";
import { times, uniq } from "lodash-es";
import { memo, useEffect, useMemo, useState } from "react";
import usePromise from "react-promise-suspense";
import { awaitableGameDefinitions } from "../../core/awaitables/gameDefinitions";
import { awaitableModelDefinitions } from "../../core/awaitables/modelDefinitions";
import { awaitableTankDefinitions } from "../../core/awaitables/tankDefinitions";
import { awaitableTankNames } from "../../core/awaitables/tankNames";
import { filterTank } from "../../core/blitzkit/filterTank";
import { filterTanks } from "../../core/blitzkit/filterTanks";
import { resolveReload } from "../../core/blitzkit/resolveReload";
import { useLocale } from "../../hooks/useLocale";
import { App } from "../../stores/app";
import { TankFilters } from "../../stores/tankFilters";
import { TankopediaPersistent } from "../../stores/tankopediaPersistent";
import { SORT_UNITS } from "../../stores/tankopediaPersistent/constants";
@@ -54,15 +56,34 @@ const [gameDefinitions, modelDefinitions, tankDefinitions, tankNames] =
export const TankSearch = memo<TankSearchProps>(
({ compact, onSelect, onSelectAll, skeleton, ...props }) => {
const { strings, locale } = useLocale();
const wargaming = App.use((state) => state.logins.wargaming);
const awaitedTanksDefinitionsArray = Object.values(tankDefinitions.tanks);
const tankopediaSort = TankSort.use();
const tankFilters = TankFilters.use();
const tanksFiltered = useMemo(() => {
const filtered = usePromise(
() => {
if (tankFilters.search === null) {
return filterTanks(
tankFilters,
awaitedTanksDefinitionsArray,
wargaming?.id
);
} else {
return Promise.resolve(
fuzzysort
.go(tankFilters.search, tankNames, {
keys: SEARCH_KEYS,
})
.map((result) => tankDefinitions.tanks[result.obj.id])
);
}
},
// react-promise-suspense has awful type annotations
[tankFilters] as any
);
const sorted = useMemo(() => {
if (tankFilters.search === null) {
const filtered = awaitedTanksDefinitionsArray.filter((tank) =>
filterTank(tankFilters, tank)
);
let sorted: TankDefinition[];
switch (tankopediaSort.by) {
@@ -396,17 +417,12 @@ export const TankSearch = memo<TankSearchProps>(
? sorted
: sorted.reverse();
} else {
const searchedRaw = fuzzysort.go(tankFilters.search, tankNames, {
keys: SEARCH_KEYS,
});
const searchedTanks = searchedRaw.map(
(result) => tankDefinitions.tanks[result.obj.id]
);
return searchedTanks;
return filtered;
}
}, [tankFilters, tankopediaSort]);
const [loadedCards, setLoadedCards] = useState(DEFAULT_LOADED_CARDS);
const tanks = tanksFiltered.slice(0, loadedCards);
const tanks = sorted.slice(0, loadedCards);
useEffect(() => {
setLoadedCards(DEFAULT_LOADED_CARDS);
@@ -420,20 +436,18 @@ export const TankSearch = memo<TankSearchProps>(
onSelect={onSelect}
/>
{!tankFilters.search && !tankFilters.searching && (
<FilterControl compact={compact} />
)}
{!tankFilters.search && !tankFilters.searching && <FilterControl />}
{!skeleton && !compact && <RecentlyViewed />}
<Flex mt="2" gap="1" align="center" justify="center" direction="column">
<Flex gap="2">
<Text color="gray">
{tanksFiltered.length === 1
{sorted.length === 1
? strings.website.common.tank_search.count_singular
: literals(strings.website.common.tank_search.count_plural, [
`${tanksFiltered.length.toLocaleString(locale)}`,
])}
: literals(strings.website.common.tank_search.count_plural, {
count: sorted.length.toLocaleString(locale),
})}
</Text>
{onSelectAll && (
@@ -442,10 +456,10 @@ export const TankSearch = memo<TankSearchProps>(
href="#"
onClick={(event) => {
event.preventDefault();
onSelectAll(tanksFiltered);
onSelectAll(sorted);
TankopediaPersistent.mutate((draft) => {
draft.recentlyViewed = uniq([
...tanksFiltered.map(({ id }) => id),
...sorted.map(({ id }) => id),
...draft.recentlyViewed,
])
.filter((id) => id in tankDefinitions.tanks)
@@ -460,9 +474,11 @@ export const TankSearch = memo<TankSearchProps>(
{tankopediaSort.by !== "meta.none" && (
<Text color="gray">
{literals(strings.website.common.tank_search.sorting_by, [
strings.website.common.tank_search.sort[tankopediaSort.by],
])}
{literals(strings.website.common.tank_search.sorting_by, {
name: strings.website.common.tank_search.sort[
tankopediaSort.by
],
})}
{SORT_UNITS[tankopediaSort.by] === undefined
? ""
: ` (${SORT_UNITS[tankopediaSort.by]})`}
@@ -497,14 +513,14 @@ export const TankSearch = memo<TankSearchProps>(
))}
{times(
Math.min(PREVIEW_COUNT, tanksFiltered.length - loadedCards),
Math.min(PREVIEW_COUNT, sorted.length - loadedCards),
(index) => {
return (
<SkeletonTankCard
key={index}
onIntersection={() => {
setLoadedCards((state) =>
Math.min(state + 2, tanksFiltered.length)
Math.min(state + 2, sorted.length)
);
}}
/>
@@ -1,16 +1,16 @@
import type { AssaultRanges } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { Box, Flex, Text } from '@radix-ui/themes';
import { clamp } from 'three/src/math/MathUtils.js';
import type { AssaultRanges } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { Box, Flex, Text } from "@radix-ui/themes";
import { clamp } from "three/src/math/MathUtils.js";
import {
fakeLogSquishyHigh,
fakeLogSquishyLow,
} from '../../../../../../../core/blitzkit/fakeLog';
import type { TankCharacteristics } from '../../../../../../../core/blitzkit/tankCharacteristics';
import { Var } from '../../../../../../../core/radix/var';
import { useLocale } from '../../../../../../../hooks/useLocale';
import { VisualizerCard } from '../VisualizerCard';
import { AssaultCursor } from './components/Cursor';
} from "../../../../../../../core/blitzkit/fakeLog";
import type { TankCharacteristics } from "../../../../../../../core/blitzkit/tankCharacteristics";
import { Var } from "../../../../../../../core/radix/var";
import { useLocale } from "../../../../../../../hooks/useLocale";
import { VisualizerCard } from "../VisualizerCard";
import { AssaultCursor } from "./components/Cursor";
interface Props {
ranges: AssaultRanges;
@@ -48,27 +48,29 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
p="3"
pt="8"
pr="5"
style={{ backgroundColor: Var('gray-1') }}
style={{ backgroundColor: Var("gray-1") }}
flexGrow="1"
>
<Flex flexGrow="1">
<Box position="relative" width={Var('space-8')}>
<Box position="relative" width={Var("space-8")}>
{ranges.map((range, index) => (
<Text
key={index}
style={{
position: 'absolute',
position: "absolute",
left: 0,
bottom: `${fakeLogSquishyLow(range.factor / maxFactor) * 100}%`,
transform: 'translateY(50%)',
transform: "translateY(50%)",
}}
color="gray"
size="1"
wrap="nowrap"
>
{literals(strings.common.units.hp, [
`${Math.round(stats.damageWithoutAssault * range.factor)}`,
])}
{literals(strings.common.units.hp, {
value: Math.round(
stats.damageWithoutAssault * range.factor
),
})}
</Text>
))}
</Box>
@@ -77,8 +79,8 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
{ranges.map((range, index) => {
const mix =
clamp(2 * (range.factor / maxFactor - 1) + 1, 0, 1) * 100;
const color0 = `color-mix(in hsl, ${Var('tomato-9')}, ${Var('jade-9')} ${mix}%)`;
const color1 = `color-mix(in hsl, ${Var('tomato-7')}, ${Var('jade-7')} ${mix}%)`;
const color0 = `color-mix(in hsl, ${Var("tomato-9")}, ${Var("jade-9")} ${mix}%)`;
const color1 = `color-mix(in hsl, ${Var("tomato-7")}, ${Var("jade-7")} ${mix}%)`;
const last = ranges[index - 1];
const lastFakeDistance = last?.fakeDistance ?? 0;
const fakeWidth = range.fakeDistance - lastFakeDistance;
@@ -105,8 +107,8 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
width="100%"
height="1pt"
style={{
transform: 'translateY(50%)',
backgroundColor: Var('gray-11'),
transform: "translateY(50%)",
backgroundColor: Var("gray-11"),
}}
/>
))}
@@ -118,7 +120,7 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
</Flex>
</Flex>
<Flex ml="8" height={Var('space-7')}>
<Flex ml="8" height={Var("space-7")}>
{ranges.map((range, index) => {
const last = ranges[index - 1];
const lastFakeDistance = last?.fakeDistance ?? 0;
@@ -137,15 +139,15 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
color="gray"
mt="2"
style={{
position: 'absolute',
position: "absolute",
right: 0,
transform: 'translateX(50%)',
writingMode: 'vertical-rl',
transform: "translateX(50%)",
writingMode: "vertical-rl",
}}
>
{literals(strings.common.units.m, [
`${Math.round(range.distance)}`,
])}
{literals(strings.common.units.m, {
value: Math.round(range.distance),
})}
</Text>
</Box>
);
@@ -38,16 +38,17 @@ export function CompareOptions(props: FlexProps) {
<SegmentedControl.Item value={`${TankopediaRelativeAgainst.Class}`}>
{literals(
strings.website.tools.tankopedia.characteristics.compare.class,
[
TIER_ROMAN_NUMERALS[tank.tier],
strings.common.tank_class_short_plural_lowercase[tank.class],
]
{
tier: TIER_ROMAN_NUMERALS[tank.tier],
class:
strings.common.tank_class_short_plural_lowercase[tank.class],
}
)}
</SegmentedControl.Item>
<SegmentedControl.Item value={`${TankopediaRelativeAgainst.Tier}`}>
{literals(
strings.website.tools.tankopedia.characteristics.compare.tier,
[TIER_ROMAN_NUMERALS[tank.tier]]
{ tier: TIER_ROMAN_NUMERALS[tank.tier] }
)}
</SegmentedControl.Item>
<SegmentedControl.Item value={`${TankopediaRelativeAgainst.All}`}>
@@ -1,15 +1,15 @@
import { CREW_MEMBER_NAMES, CrewType } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { AccessibilityIcon, InfoCircledIcon } from '@radix-ui/react-icons';
import { Flex, Heading, IconButton, Popover, Text } from '@radix-ui/themes';
import { Fragment } from 'react/jsx-runtime';
import { awaitableProvisionDefinitions } from '../../../../../../core/awaitables/provisionDefinitions';
import { useEquipment } from '../../../../../../hooks/useEquipment';
import { useLocale } from '../../../../../../hooks/useLocale';
import { Duel } from '../../../../../../stores/duel';
import { InfoWithDelta } from './InfoWithDelta';
import { StatsTableWrapper } from './StatsTableWrapper';
import type { StatsAcceptorProps } from './TraverseVisualizer';
import { CREW_MEMBER_NAMES, CrewType } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { AccessibilityIcon, InfoCircledIcon } from "@radix-ui/react-icons";
import { Flex, Heading, IconButton, Popover, Text } from "@radix-ui/themes";
import { Fragment } from "react/jsx-runtime";
import { awaitableProvisionDefinitions } from "../../../../../../core/awaitables/provisionDefinitions";
import { useEquipment } from "../../../../../../hooks/useEquipment";
import { useLocale } from "../../../../../../hooks/useLocale";
import { Duel } from "../../../../../../stores/duel";
import { InfoWithDelta } from "./InfoWithDelta";
import { StatsTableWrapper } from "./StatsTableWrapper";
import type { StatsAcceptorProps } from "./TraverseVisualizer";
const provisionDefinitions = await awaitableProvisionDefinitions;
@@ -24,7 +24,7 @@ export function Crew({ stats }: StatsAcceptorProps) {
provisionDefinitions.provisions[provision].crew
? total + provisionDefinitions.provisions[provision].crew! / 100
: total,
0,
0
) + (hasImprovedVentilation ? 0.08 : 0);
const commanderMastery = 1 + provisionCrewBonus;
@@ -65,8 +65,8 @@ export function Crew({ stats }: StatsAcceptorProps) {
]
}${
member.count > 1
? ` ${literals(strings.common.units.x, [`${member.count}`])}`
: ''
? ` ${literals(strings.common.units.x, { value: member.count })}`
: ""
}`}
decimals={0}
noRanking
@@ -93,9 +93,9 @@ export function Crew({ stats }: StatsAcceptorProps) {
? strings.website.tools.tankopedia.crew[
CREW_MEMBER_NAMES[sub]
]
: sub,
: sub
)
.join(', ')}
.join(", ")}
</Flex>
</>
}
@@ -119,7 +119,7 @@ export function Firepower({
name={literals(
strings.website.tools.tankopedia.characteristics.values
.shell_index,
[`${index + 1}`]
{ index: index + 1 }
)}
decimals={2}
deltaType="lowerIsBetter"
@@ -191,7 +191,7 @@ export function Firepower({
name={literals(
strings.website.tools.tankopedia.characteristics.values
.dispersion_at_distance,
["100"]
{ distance: 100 }
)}
/>
<InfoWithDelta
@@ -359,31 +359,33 @@ export function GunFlexibilityVisualizer({
<VisualizerCornerStat
label={strings.website.tools.tankopedia.visualizers.flexibility.max}
value={literals(strings.common.units.deg, [
radToDeg(maxPitch).toFixed(0),
])}
value={literals(strings.common.units.deg, {
value: radToDeg(maxPitch).toFixed(0),
})}
side="bottom-left"
/>
<VisualizerCornerStat
label={strings.website.tools.tankopedia.visualizers.flexibility.min}
value={literals(strings.common.units.deg, [
radToDeg(minPitch).toFixed(0),
])}
value={literals(strings.common.units.deg, {
value: radToDeg(minPitch).toFixed(0),
})}
side="bottom-right"
/>
<VisualizerCornerStat
label={strings.website.tools.tankopedia.visualizers.flexibility.pitch}
value={literals(strings.common.units.deg, [
radToDeg(pitch).toFixed(0),
])}
value={literals(strings.common.units.deg, {
value: radToDeg(pitch).toFixed(0),
})}
side="top-left"
/>
<VisualizerCornerStat
label={strings.website.tools.tankopedia.visualizers.flexibility.yaw}
value={literals(strings.common.units.deg, [radToDeg(yaw).toFixed(0)])}
value={literals(strings.common.units.deg, {
value: radToDeg(yaw).toFixed(0),
})}
side="top-right"
/>
</VisualizerCard>
@@ -1,15 +1,15 @@
import { asset, isExplosive } from '@blitzkit/core';
import { literals } from '@blitzkit/i18n';
import { Box, Flex, Text } from '@radix-ui/themes';
import { useRef, useState } from 'react';
import { clamp, degToRad, radToDeg } from 'three/src/math/MathUtils.js';
import { Var } from '../../../../../../../core/radix/var';
import { useLocale } from '../../../../../../../hooks/useLocale';
import { Duel } from '../../../../../../../stores/duel';
import type { StatsAcceptorProps } from '../TraverseVisualizer';
import { VisualizerCard } from '../VisualizerCard';
import { VisualizerCornerStat } from '../VisualizerCornerStat';
import { ShellSwitcher } from './components/ShellSwitcher';
import { asset, isExplosive } from "@blitzkit/core";
import { literals } from "@blitzkit/i18n";
import { Box, Flex, Text } from "@radix-ui/themes";
import { useRef, useState } from "react";
import { clamp, degToRad, radToDeg } from "three/src/math/MathUtils.js";
import { Var } from "../../../../../../../core/radix/var";
import { useLocale } from "../../../../../../../hooks/useLocale";
import { Duel } from "../../../../../../../stores/duel";
import type { StatsAcceptorProps } from "../TraverseVisualizer";
import { VisualizerCard } from "../VisualizerCard";
import { VisualizerCornerStat } from "../VisualizerCornerStat";
import { ShellSwitcher } from "./components/ShellSwitcher";
export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
const shell = Duel.use((state) => state.protagonist.shell);
@@ -30,7 +30,7 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
<Flex direction="column" mb="6" align="center">
<VisualizerCard
mb="0"
style={{ width: '100%' }}
style={{ width: "100%" }}
ref={container}
onPointerMove={(event) => {
if (!container.current || explodes) return;
@@ -50,7 +50,7 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
top="0"
left="0"
style={{
background: `linear-gradient(to right, transparent, ${Var('gray-a4')})`,
background: `linear-gradient(to right, transparent, ${Var("gray-a4")})`,
}}
>
<Box
@@ -73,20 +73,20 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
background: `conic-gradient(
at 0 50%,
${Var('ruby-a2')},
${Var('ruby-a1')} ${Math.PI / 2 - ricochet}rad,
${Var("ruby-a2")},
${Var("ruby-a1")} ${Math.PI / 2 - ricochet}rad,
${Var('jade-a2')} ${Math.PI / 2 - ricochet}rad,
${Var('jade-a4')} ${Math.PI / 2 - normalization}rad,
${Var("jade-a2")} ${Math.PI / 2 - ricochet}rad,
${Var("jade-a4")} ${Math.PI / 2 - normalization}rad,
${Var('cyan-a5')} ${Math.PI / 2 - normalization}rad,
${Var('cyan-a3')} ${Math.PI / 2 + normalization}rad,
${Var("cyan-a5")} ${Math.PI / 2 - normalization}rad,
${Var("cyan-a3")} ${Math.PI / 2 + normalization}rad,
${Var('jade-a2')} ${Math.PI / 2 + normalization}rad,
${Var('jade-a4')} ${Math.PI / 2 + ricochet}rad,
${Var("jade-a2")} ${Math.PI / 2 + normalization}rad,
${Var("jade-a4")} ${Math.PI / 2 + ricochet}rad,
${Var('ruby-a1')} ${Math.PI / 2 + ricochet}rad,
${Var('ruby-a2')} 180deg
${Var("ruby-a1")} ${Math.PI / 2 + ricochet}rad,
${Var("ruby-a2")} 180deg
`,
}}
/>
@@ -97,7 +97,7 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
top="50%"
height="18rem"
style={{
transformOrigin: 'top center',
transformOrigin: "top center",
transform: `translateX(-50%) rotate(${-Math.PI / 2 - angle}rad)`,
}}
>
@@ -107,8 +107,8 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
height="100%"
bottom="100%"
style={{
transform: 'translateX(-50%)',
backgroundColor: Var('gray-a8'),
transform: "translateX(-50%)",
backgroundColor: Var("gray-a8"),
}}
/>
<Box
@@ -116,22 +116,22 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
width="3px"
height="100%"
style={{
transform: 'translateX(-50%)',
background: `linear-gradient(${Var('gray-a11')}, ${Var('gray-a4')})`,
transform: "translateX(-50%)",
background: `linear-gradient(${Var("gray-a11")}, ${Var("gray-a4")})`,
}}
/>
<img
src={asset(`icons/shells/${shell.icon}.webp`)}
style={{
objectFit: 'contain',
transform: 'translate(-50%, -50%) rotate(-45deg)',
position: 'absolute',
width: '2rem',
height: '2rem',
top: '6rem',
objectFit: "contain",
transform: "translate(-50%, -50%) rotate(-45deg)",
position: "absolute",
width: "2rem",
height: "2rem",
top: "6rem",
left: 0,
filter: 'drop-shadow(0px 0px 0.25rem black)',
filter: "drop-shadow(0px 0px 0.25rem black)",
}}
/>
</Box>
@@ -142,7 +142,7 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
top="50%"
height="16rem"
style={{
transformOrigin: 'top center',
transformOrigin: "top center",
transform: `translateX(-50%) rotate(${-Math.PI / 2 - effectiveAngle}rad)`,
}}
>
@@ -152,17 +152,17 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
height="100%"
top="-100%"
style={{
transform: 'translateX(-50%)',
background: `linear-gradient(${Var('gray-a4')}, ${Var('gray-a11')})`,
transform: "translateX(-50%)",
background: `linear-gradient(${Var("gray-a4")}, ${Var("gray-a11")})`,
}}
/>
</Box>
<VisualizerCornerStat
label={strings.website.tools.tankopedia.visualizers.ricochet.angle}
value={literals(strings.common.units.deg, [
radToDeg(Math.abs(angle)).toFixed(0),
])}
value={literals(strings.common.units.deg, {
value: radToDeg(Math.abs(angle)).toFixed(0),
})}
side="top-left"
/>
<VisualizerCornerStat
@@ -171,10 +171,12 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
}
value={
doesRicochet
? '-'
: literals(strings.common.units.deg, [
radToDeg(Math.min(normalization, Math.abs(angle))).toFixed(0),
])
? "-"
: literals(strings.common.units.deg, {
value: radToDeg(
Math.min(normalization, Math.abs(angle))
).toFixed(0),
})
}
side="top-right"
/>
@@ -185,10 +187,10 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
}
value={
doesRicochet
? '-'
: literals(strings.common.units.deg, [
radToDeg(Math.abs(effectiveAngle)).toFixed(0),
])
? "-"
: literals(strings.common.units.deg, {
value: radToDeg(Math.abs(effectiveAngle)).toFixed(0),
})
}
side="bottom-left"
/>
@@ -196,10 +198,10 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
label={strings.website.tools.tankopedia.visualizers.ricochet.armor}
value={
doesRicochet
? '-'
: literals(strings.common.units.percentage, [
armorPercentage.toFixed(0),
])
? "-"
: literals(strings.common.units.percentage, {
value: armorPercentage.toFixed(0),
})
}
side="bottom-right"
/>
@@ -215,7 +217,7 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
top="0"
left="0"
style={{
background: `radial-gradient(${Var('black-a7')}, ${Var('black-a11')})`,
background: `radial-gradient(${Var("black-a7")}, ${Var("black-a11")})`,
}}
>
<Text color="gray" align="center">
@@ -1,20 +1,20 @@
import { literals } from '@blitzkit/i18n';
import { Checkbox, Code, Flex, Tabs, Text } from '@radix-ui/themes';
import { useEffect, useRef, useState } from 'react';
import type { TankCharacteristics } from '../../../../../../../core/blitzkit/tankCharacteristics';
import { useLocale } from '../../../../../../../hooks/useLocale';
import { VisualizerCard } from '../VisualizerCard';
import { literals } from "@blitzkit/i18n";
import { Checkbox, Code, Flex, Tabs, Text } from "@radix-ui/themes";
import { useEffect, useRef, useState } from "react";
import type { TankCharacteristics } from "../../../../../../../core/blitzkit/tankCharacteristics";
import { useLocale } from "../../../../../../../hooks/useLocale";
import { VisualizerCard } from "../VisualizerCard";
export interface StatsAcceptorProps {
stats: TankCharacteristics;
}
type Terrain = 'Hard' | 'Medium' | 'Soft';
type Terrain = "Hard" | "Medium" | "Soft";
export function TraverseVisualizer({ stats }: StatsAcceptorProps) {
const hull = useRef<HTMLDivElement>(null);
const turret = useRef<HTMLImageElement>(null);
const [terrain, setTerrain] = useState<Terrain>('Hard');
const [terrain, setTerrain] = useState<Terrain>("Hard");
const [rotateHull, setRotateHull] = useState(true);
const [rotateTurret, setRotateTurret] = useState(true);
const { strings } = useLocale();
@@ -63,10 +63,10 @@ export function TraverseVisualizer({ stats }: StatsAcceptorProps) {
<div
ref={hull}
style={{
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
position: "absolute",
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
animationDuration: `${
rotateHull ? 360 / stats[`hullTraverse${terrain}Terrain`] : 0
}s`,
@@ -75,12 +75,12 @@ export function TraverseVisualizer({ stats }: StatsAcceptorProps) {
<img
draggable="false"
style={{
width: isTurretless ? '22rem' : '12rem',
height: isTurretless ? '22rem' : '12rem',
objectFit: 'contain',
filter: 'drop-shadow(0px 0px 4px black)',
width: isTurretless ? "22rem" : "12rem",
height: isTurretless ? "22rem" : "12rem",
objectFit: "contain",
filter: "drop-shadow(0px 0px 4px black)",
}}
src={`/assets/images/tankopedia/visualizers/hull-traverse/hull${isTurretless ? '-only' : ''}.png`}
src={`/assets/images/tankopedia/visualizers/hull-traverse/hull${isTurretless ? "-only" : ""}.png`}
/>
{!isTurretless && (
@@ -88,14 +88,14 @@ export function TraverseVisualizer({ stats }: StatsAcceptorProps) {
draggable="false"
ref={turret}
style={{
width: '27rem',
height: '27rem',
objectFit: 'contain',
position: 'absolute',
top: '50%',
left: '50%',
filter: 'drop-shadow(0px 0px 4px black)',
transform: 'translate(-50%, -50%)',
width: "27rem",
height: "27rem",
objectFit: "contain",
position: "absolute",
top: "50%",
left: "50%",
filter: "drop-shadow(0px 0px 4px black)",
transform: "translate(-50%, -50%)",
animationDuration: `${
rotateTurret ? 360 / stats.turretTraverseSpeed : 0
}s`,
@@ -110,7 +110,7 @@ export function TraverseVisualizer({ stats }: StatsAcceptorProps) {
bottom="0"
left="50%"
style={{
transform: 'translateX(-50%)',
transform: "translateX(-50%)",
}}
>
<Tabs.Root
@@ -137,16 +137,16 @@ export function TraverseVisualizer({ stats }: StatsAcceptorProps) {
left="50%"
bottom="7"
style={{
transform: 'translateX(-50%)',
transform: "translateX(-50%)",
}}
>
<Text color="gray" size="1">
{strings.website.tools.tankopedia.visualizers.rotator.effective}
</Text>
<Code size="1" variant="ghost">
{literals(strings.common.units.deg_s, [
`${(turretSpeedDeg + hullSpeedDeg).toFixed(1)}`,
])}
{literals(strings.common.units.deg_s, {
value: (turretSpeedDeg + hullSpeedDeg).toFixed(1),
})}
</Code>
</Flex>
@@ -160,15 +160,15 @@ export function TraverseVisualizer({ stats }: StatsAcceptorProps) {
gap="5"
justify="center"
style={{
transform: 'translateX(-50%)',
userSelect: 'none',
transform: "translateX(-50%)",
userSelect: "none",
}}
>
<Flex
align="center"
gap="2"
onClick={() => setRotateHull((state) => !state)}
style={{ cursor: 'pointer' }}
style={{ cursor: "pointer" }}
>
<Checkbox variant="classic" checked={rotateHull} />
<Text size="2">
@@ -180,7 +180,7 @@ export function TraverseVisualizer({ stats }: StatsAcceptorProps) {
align="center"
gap="2"
onClick={() => setRotateTurret((state) => !state)}
style={{ cursor: 'pointer' }}
style={{ cursor: "pointer" }}
>
<Checkbox variant="classic" checked={rotateTurret} />
<Text size="2">
@@ -1,20 +1,20 @@
import { literals } from '@blitzkit/i18n';
import { EyeOpenIcon } from '@radix-ui/react-icons';
import { Box, Card, Code, Flex, Slider, Tabs, Text } from '@radix-ui/themes';
import { useRef, useState } from 'react';
import { Var } from '../../../../../../core/radix/var';
import { useLocale } from '../../../../../../hooks/useLocale';
import type { StatsAcceptorProps } from './TraverseVisualizer';
import { literals } from "@blitzkit/i18n";
import { EyeOpenIcon } from "@radix-ui/react-icons";
import { Box, Card, Code, Flex, Slider, Tabs, Text } from "@radix-ui/themes";
import { useRef, useState } from "react";
import { Var } from "../../../../../../core/radix/var";
import { useLocale } from "../../../../../../hooks/useLocale";
import type { StatsAcceptorProps } from "./TraverseVisualizer";
const maps = [
{
id: 'ghost-factory',
string: 'ghost_factory',
id: "ghost-factory",
string: "ghost_factory",
size: 512,
},
{
id: 'dead-rail',
string: 'dead_rail',
id: "dead-rail",
string: "dead_rail",
size: 512,
},
] as const;
@@ -32,7 +32,7 @@ export function ViewRangeVisualizer({ stats }: StatsAcceptorProps) {
return (
<Card
style={{ aspectRatio: '1 / 1', touchAction: 'none' }}
style={{ aspectRatio: "1 / 1", touchAction: "none" }}
mb="6"
variant="classic"
>
@@ -61,8 +61,8 @@ export function ViewRangeVisualizer({ stats }: StatsAcceptorProps) {
style={{
backgroundImage: `url(/assets/images/tankopedia/visualizers/range/${map.id}.png)`,
filter: `grayscale(0.5) brightness(0.8) contrast(1.2)`,
backgroundSize: 'cover',
backgroundPosition: 'center',
backgroundSize: "cover",
backgroundPosition: "center",
}}
/>
@@ -75,16 +75,18 @@ export function ViewRangeVisualizer({ stats }: StatsAcceptorProps) {
align="center"
justify="center"
style={{
aspectRatio: '1 / 1',
transform: 'translate(-50%, -50%)',
background: `radial-gradient(${Var('black-a6')}, ${Var('gray-a12')})`,
borderRadius: '50%',
aspectRatio: "1 / 1",
transform: "translate(-50%, -50%)",
background: `radial-gradient(${Var("black-a6")}, ${Var("gray-a12")})`,
borderRadius: "50%",
}}
>
<Text style={{ userSelect: 'none' }}>
<Text style={{ userSelect: "none" }}>
<Flex align="center" gap="1">
<EyeOpenIcon width="1.25rem" height="1.25rem" />
{literals(strings.common.units.m, [resolvedViewRange.toFixed(0)])}
{literals(strings.common.units.m, {
value: resolvedViewRange.toFixed(0),
})}
</Flex>
</Text>
</Flex>
@@ -100,8 +102,8 @@ export function ViewRangeVisualizer({ stats }: StatsAcceptorProps) {
gap="3"
align="center"
style={{
backgroundColor: Var('black-a7'),
backdropFilter: 'blur(4rem)',
backgroundColor: Var("black-a7"),
backdropFilter: "blur(4rem)",
}}
>
<Text size="2">
@@ -120,11 +122,9 @@ export function ViewRangeVisualizer({ stats }: StatsAcceptorProps) {
<Code size="1" color="gray" variant="ghost">
<Flex justify="center" width="2em">
{literals(
strings.website.tools.tankopedia.visualizers.view_range
.percentage,
[`${Math.round(camouflage * 100)}`.padStart(3, ' ')],
)}
{literals(strings.common.units.percentage, {
percentage: `${Math.round(camouflage * 100)}`.padStart(3, " "),
})}
</Flex>
</Code>
</Flex>
@@ -136,7 +136,7 @@ export function ViewRangeVisualizer({ stats }: StatsAcceptorProps) {
left="0"
width="100%"
style={{
background: `radial-gradient(at 50% 100%, ${Var('gray-1')}, transparent 70%)`,
background: `radial-gradient(at 50% 100%, ${Var("gray-1")}, transparent 70%)`,
}}
>
<Tabs.Root
@@ -151,7 +151,7 @@ export function CustomShellButton() {
}}
>
<TextField.Slot side="right">
{literals(strings.common.units.mm, [""])}
{literals(strings.common.units.mm, { value: "" })}
</TextField.Slot>
</TextField.Root>
</Flex>
@@ -188,7 +188,7 @@ export function CustomShellButton() {
}}
>
<TextField.Slot side="right">
{literals(strings.common.units.mm, [""])}
{literals(strings.common.units.mm, { value: "" })}
</TextField.Slot>
</TextField.Root>
</Flex>
@@ -212,9 +212,9 @@ export function CustomShellButton() {
minWidth="8rem"
>
<Text color="gray">
{literals(strings.common.units.deg, [
(customShell.normalization ?? 0).toFixed(0),
])}
{literals(strings.common.units.deg, {
value: (customShell.normalization ?? 0).toFixed(0),
})}
</Text>
<Slider
variant="classic"
@@ -243,9 +243,9 @@ export function CustomShellButton() {
<Flex align="center" gap="2" flexGrow="1" maxWidth="15rem">
<Text color="gray">
{literals(strings.common.units.deg, [
(customShell.ricochet ?? 90).toFixed(0),
])}
{literals(strings.common.units.deg, {
value: (customShell.ricochet ?? 90).toFixed(0),
})}
</Text>
<Slider
variant="classic"
@@ -1,17 +1,17 @@
import { HeightIcon, WidthIcon } from '@radix-ui/react-icons';
import { Flex, TextField } from '@radix-ui/themes';
import type { QuicklimeEvent } from 'quicklime';
import { useEffect, useRef } from 'react';
import { degToRad, radToDeg } from 'three/src/math/MathUtils.js';
import { applyPitchYawLimits } from '../../../../../../../core/blitz/applyPitchYawLimits';
import { HeightIcon, WidthIcon } from "@radix-ui/react-icons";
import { Flex, TextField } from "@radix-ui/themes";
import type { QuicklimeEvent } from "quicklime";
import { useEffect, useRef } from "react";
import { degToRad, radToDeg } from "three/src/math/MathUtils.js";
import { applyPitchYawLimits } from "../../../../../../../core/blitz/applyPitchYawLimits";
import {
type ModelTransformEventData,
modelTransformEvent,
} from '../../../../../../../core/blitzkit/modelTransform';
import { useEquipment } from '../../../../../../../hooks/useEquipment';
import { useTankModelDefinition } from '../../../../../../../hooks/useTankModelDefinition';
import { Duel } from '../../../../../../../stores/duel';
import './index.css';
} from "../../../../../../../core/blitzkit/modelTransform";
import { useEquipment } from "../../../../../../../hooks/useEquipment";
import { useTankModelDefinition } from "../../../../../../../hooks/useTankModelDefinition";
import { Duel } from "../../../../../../../stores/duel";
import "./index.css";
export function QuickInputs() {
const protagonist = Duel.use((state) => state.protagonist);
@@ -28,12 +28,12 @@ export function QuickInputs() {
useEffect(() => {
function handleTransformEvent(
event: QuicklimeEvent<ModelTransformEventData>,
event: QuicklimeEvent<ModelTransformEventData>
) {
if (!pitchInput.current || !yawInput.current) return;
pitchInput.current.value = (
-radToDeg(event.data.pitch) +
radToDeg(event.data.pitch) +
(tankModelDefinition.initial_turret_rotation?.pitch ?? 0)
).toFixed(1);
@@ -56,11 +56,11 @@ export function QuickInputs() {
width="4rem"
direction="column"
style={{
pointerEvents: 'auto',
position: 'absolute',
top: '50%',
transform: 'translateY(-50%)',
transitionDuration: '0.2s',
pointerEvents: "auto",
position: "absolute",
top: "50%",
transform: "translateY(-50%)",
transitionDuration: "0.2s",
}}
className="quick-inputs"
>
@@ -68,14 +68,14 @@ export function QuickInputs() {
variant="classic"
size="1"
radius="full"
style={{ flex: 1, textAlign: 'right' }}
style={{ flex: 1, textAlign: "right" }}
defaultValue="0.0"
onBlur={() => {
const value = Number(yawInput.current!.value);
if (isNaN(value)) {
yawInput.current!.value = radToDeg(
modelTransformEvent.last!.yaw,
modelTransformEvent.last!.yaw
).toFixed(1);
return;
}
@@ -86,23 +86,23 @@ export function QuickInputs() {
gunModelDefinition.pitch,
turretModelDefinition.yaw,
hasImprovedVerticalStabilizer,
hasDownImprovedVerticalStabilizer,
hasDownImprovedVerticalStabilizer
);
modelTransformEvent.dispatch({ pitch, yaw });
yawInput.current!.value = radToDeg(
modelTransformEvent.last!.yaw,
modelTransformEvent.last!.yaw
).toFixed(1);
}}
onKeyDown={(event) => {
if (event.key === 'Enter') {
if (event.key === "Enter") {
yawInput.current?.blur();
}
}}
onFocus={() => yawInput.current?.focus()}
ref={yawInput}
>
<TextField.Slot style={{ userSelect: 'none' }}>
<TextField.Slot style={{ userSelect: "none" }}>
<WidthIcon />
</TextField.Slot>
<TextField.Slot />
@@ -112,31 +112,31 @@ export function QuickInputs() {
variant="classic"
size="1"
radius="full"
style={{ flex: 1, textAlign: 'right' }}
style={{ flex: 1, textAlign: "right" }}
defaultValue="0.0"
onBlur={() => {
const value = Number(pitchInput.current!.value);
if (isNaN(value)) {
pitchInput.current!.value = (
-radToDeg(modelTransformEvent.last!.pitch) + initialGunPitch
radToDeg(modelTransformEvent.last!.pitch) + initialGunPitch
).toFixed(1);
return;
}
const [pitch, yaw] = applyPitchYawLimits(
degToRad(-value + initialGunPitch),
degToRad(value + initialGunPitch),
modelTransformEvent.last!.yaw,
gunModelDefinition.pitch,
turretModelDefinition.yaw,
hasImprovedVerticalStabilizer,
hasDownImprovedVerticalStabilizer,
hasDownImprovedVerticalStabilizer
);
modelTransformEvent.dispatch({ pitch, yaw });
pitchInput.current!.value = (
-radToDeg(modelTransformEvent.last!.pitch) + initialGunPitch
radToDeg(modelTransformEvent.last!.pitch) + initialGunPitch
).toFixed(1);
}}
onKeyDown={(event) => {
if (event.key === 'Enter') {
if (event.key === "Enter") {
pitchInput.current?.blur();
}
}}
@@ -145,7 +145,7 @@ export function QuickInputs() {
>
<TextField.Slot
style={{
userSelect: 'none',
userSelect: "none",
}}
>
<HeightIcon />
@@ -59,15 +59,15 @@ export function Thicknesses({ thicknessRange, skeleton }: ThicknessesProps) {
>
<Flex direction="column" align="end" justify="between">
<Text color="gray" size="1">
{literals(strings.common.units.mm, [
(thicknessRange.value * 1.5).toFixed(0),
])}
{literals(strings.common.units.mm, {
value: (thicknessRange.value * 1.5).toFixed(0),
})}
</Text>
<Text size="1">
{strings.website.tools.tankopedia.sandbox.static.primary}
</Text>
<Text color="gray" size="1">
{literals(strings.common.units.mm, ["0"])}
{literals(strings.common.units.mm, { value: 0 })}
</Text>
</Flex>
@@ -100,15 +100,15 @@ export function Thicknesses({ thicknessRange, skeleton }: ThicknessesProps) {
>
<Flex direction="column" align="end" justify="between">
<Text color="gray" size="1">
{literals(strings.common.units.mm, [
thicknessRange.value.toFixed(0),
])}
{literals(strings.common.units.mm, {
value: thicknessRange.value.toFixed(0),
})}
</Text>
<Text size="1">
{strings.website.tools.tankopedia.sandbox.static.spaced}
</Text>
<Text color="gray" size="1">
{literals(strings.common.units.mm, ["0"])}
{literals(strings.common.units.mm, { value: 0 })}
</Text>
</Flex>
@@ -6,13 +6,15 @@ import {
} from "@blitzkit/core";
import { literals } from "@blitzkit/i18n/src/literals";
import {
Crosshair1Icon,
EnterFullScreenIcon,
ExitFullScreenIcon,
EyeOpenIcon,
ShadowInnerIcon,
ShadowNoneIcon,
} from "@radix-ui/react-icons";
import {
Button,
Checkbox,
Dialog,
DropdownMenu,
Flex,
@@ -92,14 +94,14 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
>
{!hasCustomShell && (
<Text color="gray" size={{ initial: "1", sm: "2" }}>
{literals(strings.common.units.mm, [
(
{literals(strings.common.units.mm, {
value: (
resolvePenetrationCoefficient(
hasCalibratedShells,
antagonistShell.type
) * antagonistShell.penetration.near
).toFixed(0),
])}
})}
</Text>
)}
@@ -156,9 +158,9 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
discriminator={TIER_ROMAN_NUMERALS[gun.tier]}
secondaryDiscriminator={
<Text style={{ fontSize: "0.75em" }}>
{literals(strings.common.units.mm, [
gun.shells[0].caliber.toFixed(0),
])}
{literals(strings.common.units.mm, {
value: gun.shells[0].caliber.toFixed(0),
})}
</Text>
}
/>
@@ -284,78 +286,100 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
bottom={revealed ? "4" : "-100%"}
left="50%"
style={{ transform: "translateX(-50%)", transitionDuration: "200ms" }}
gap="2"
>
<Flex
direction="column"
gap="2"
align="center"
style={{ transitionDuration: "200ms" }}
position="relative"
bottom={display === TankopediaDisplay.DynamicArmor ? "0" : "-7rem"}
>
<Flex
align="center"
gap="2"
mb="1"
style={{ cursor: "pointer" }}
onClick={() => {
TankopediaPersistent.mutate((draft) => {
draft.advancedHighlighting = !draft.advancedHighlighting;
});
}}
>
<Checkbox variant="classic" checked={advancedHighlighting} />
<Text color="gray" size="2">
{strings.website.tools.tankopedia.sandbox.dynamic.advanced}
</Text>
</Flex>
<Flex align="center" gap="2">
<Text color="gray" size="2">
{strings.website.tools.tankopedia.sandbox.dynamic.shooter}
</Text>
<Dialog.Root
open={antagonistSelectorOpen}
onOpenChange={setAntagonistSelectorOpen}
>
<Dialog.Trigger>
<Button variant="ghost">
<Flex gap="2" align="center">
<SmallTankIcon id={antagonistTank.id} size={16} />
{unwrap(antagonistTank.name)}
</Flex>
</Button>
</Dialog.Trigger>
<Dialog.Content>
<Dialog.Title align="center">
{strings.website.common.tank_search.select_dialog_title}
</Dialog.Title>
<Tabs.Root
value={tab}
onValueChange={setTab}
style={{ position: "relative" }}
{disturbed && (
<>
{display === TankopediaDisplay.DynamicArmor && (
<IconButton
size="2"
highContrast
onClick={() => {
TankopediaPersistent.mutate((draft) => {
draft.advancedHighlighting = !draft.advancedHighlighting;
});
}}
color={advancedHighlighting ? undefined : "gray"}
variant={advancedHighlighting ? "solid" : "surface"}
>
<TankSearch
compact
onSelect={(tank) => {
Duel.mutate((draft) => {
draft.antagonist.tank = tank;
draft.antagonist.engine = tank.engines.at(-1)!;
draft.antagonist.track = tank.tracks.at(-1)!;
draft.antagonist.turret = tank.turrets.at(-1)!;
draft.antagonist.gun =
draft.antagonist.turret.guns.at(-1)!;
draft.antagonist.shell = draft.antagonist.gun.shells[0];
});
setAntagonistSelectorOpen(false);
}}
/>
</Tabs.Root>
</Dialog.Content>
</Dialog.Root>
</Flex>
{advancedHighlighting ? (
<ShadowInnerIcon />
) : (
<ShadowNoneIcon />
)}
</IconButton>
)}
<DropdownMenu.Root>
<DropdownMenu.Trigger>
<IconButton
size="2"
variant="surface"
highContrast
color="gray"
>
<EyeOpenIcon />
</IconButton>
</DropdownMenu.Trigger>
<DropdownMenu.Content>
<DropdownMenu.Item
onClick={() => poseEvent.emit(Pose.HullDown)}
>
{strings.website.tools.tankopedia.sandbox.poses.hull_down}
</DropdownMenu.Item>
<DropdownMenu.Item
onClick={() => poseEvent.emit(Pose.FaceHug)}
>
{strings.website.tools.tankopedia.sandbox.poses.face_hug}
</DropdownMenu.Item>
<DropdownMenu.Item
onClick={() => poseEvent.emit(Pose.Default)}
>
{strings.website.tools.tankopedia.sandbox.poses.default}
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Root>
<ScreenshotButton
color="gray"
size="2"
variant="surface"
highContrast
canvas={canvas}
name={protagonistTank.slug}
/>
{fullScreenAvailable && (
<IconButton
size="2"
highContrast
onClick={() => {
if (isFullScreen) {
document.exitFullscreen();
} else document.body.requestFullscreen();
}}
color={isFullScreen ? undefined : "gray"}
variant={isFullScreen ? "solid" : "surface"}
>
{isFullScreen ? (
<ExitFullScreenIcon />
) : (
<EnterFullScreenIcon />
)}
</IconButton>
)}
</>
)}
</Flex>
<Flex gap="3" align="center" mt="2">
@@ -407,61 +431,47 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
</SegmentedControl.Item>
</SegmentedControl.Root>
{disturbed && (
<>
<DropdownMenu.Root>
<DropdownMenu.Trigger>
<IconButton variant="ghost" color="gray">
<EyeOpenIcon />
</IconButton>
</DropdownMenu.Trigger>
{display === TankopediaDisplay.DynamicArmor && (
<Dialog.Root
open={antagonistSelectorOpen}
onOpenChange={setAntagonistSelectorOpen}
>
<Dialog.Trigger>
<Button variant="solid" highContrast>
<Crosshair1Icon />
{unwrap(antagonistTank.name)}
<SmallTankIcon id={antagonistTank.id} size={16} />
</Button>
</Dialog.Trigger>
<DropdownMenu.Content>
<DropdownMenu.Item
onClick={() => poseEvent.emit(Pose.HullDown)}
>
{strings.website.tools.tankopedia.sandbox.poses.hull_down}
</DropdownMenu.Item>
<Dialog.Content>
<Dialog.Title align="center">
{strings.website.common.tank_search.select_dialog_title}
</Dialog.Title>
<DropdownMenu.Item
onClick={() => poseEvent.emit(Pose.FaceHug)}
>
{strings.website.tools.tankopedia.sandbox.poses.face_hug}
</DropdownMenu.Item>
<DropdownMenu.Item
onClick={() => poseEvent.emit(Pose.Default)}
>
{strings.website.tools.tankopedia.sandbox.poses.default}
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Root>
<ScreenshotButton
color="gray"
variant="ghost"
canvas={canvas}
name={protagonistTank.slug}
/>
{fullScreenAvailable && (
<IconButton
color="gray"
variant="ghost"
onClick={() => {
if (isFullScreen) {
document.exitFullscreen();
} else document.body.requestFullscreen();
}}
<Tabs.Root
value={tab}
onValueChange={setTab}
style={{ position: "relative" }}
>
{isFullScreen ? (
<ExitFullScreenIcon />
) : (
<EnterFullScreenIcon />
)}
</IconButton>
)}
</>
<TankSearch
compact
onSelect={(tank) => {
Duel.mutate((draft) => {
draft.antagonist.tank = tank;
draft.antagonist.engine = tank.engines.at(-1)!;
draft.antagonist.track = tank.tracks.at(-1)!;
draft.antagonist.turret = tank.turrets.at(-1)!;
draft.antagonist.gun =
draft.antagonist.turret.guns.at(-1)!;
draft.antagonist.shell = draft.antagonist.gun.shells[0];
});
setAntagonistSelectorOpen(false);
}}
/>
</Tabs.Root>
</Dialog.Content>
</Dialog.Root>
)}
</Flex>
</Flex>
@@ -1,6 +1,7 @@
import { I_HAT, J_HAT } from "@blitzkit/core";
import { OrbitControls } from "@react-three/drei";
import { invalidate, useFrame, useThree } from "@react-three/fiber";
import type { QuicklimeEvent } from "quicklime";
import { useEffect, useRef } from "react";
import { PerspectiveCamera, Vector3 } from "three";
import { OrbitControls as OrbitControlsClass } from "three-stdlib";
@@ -8,6 +9,7 @@ import { awaitableModelDefinitions } from "../../../../../../core/awaitables/mod
import { applyPitchYawLimits } from "../../../../../../core/blitz/applyPitchYawLimits";
import { hasEquipment } from "../../../../../../core/blitzkit/hasEquipment";
import { Pose, poseEvent } from "../../../../../../core/blitzkit/pose";
import { controlsEnabledEvent } from "../../../../../../core/controlsEnabled";
import { Duel } from "../../../../../../stores/duel";
import { Tankopedia } from "../../../../../../stores/tankopedia";
@@ -99,12 +101,12 @@ export function Controls({
});
useEffect(() => {
const unsubscribeTankopediaEphemeral = Tankopedia.on(
(state) => state.controlsEnabled,
(enabled) => {
if (orbitControls.current) orbitControls.current.enabled = enabled;
}
);
function handleControlsEnabled(event: QuicklimeEvent<boolean>) {
if (!orbitControls.current) return;
orbitControls.current.enabled = event.data;
}
controlsEnabledEvent.on(handleControlsEnabled);
function handlePoseEvent(event: Pose) {
const hasImprovedVerticalStabilizer = hasEquipment(
@@ -203,7 +205,7 @@ export function Controls({
poseEvent.on(handlePoseEvent);
return () => {
unsubscribeTankopediaEphemeral();
controlsEnabledEvent.off(handleControlsEnabled);
poseEvent.off(handlePoseEvent);
};
}, [camera, protagonistTank.id, antagonistTank.id]);
@@ -264,7 +266,7 @@ export function Controls({
enableZoom={zoomable}
zoomSpeed={zoomable ? undefined : 0}
ref={orbitControls}
enabled={Tankopedia.state.controlsEnabled}
enabled={controlsEnabledEvent.last!}
enableDamping={false}
/>
);
@@ -19,6 +19,7 @@ const TARGET_FRAME_RATE = 30;
export function Lighting() {
const [cast, setCast] = useState(true);
const t0 = useRef(0);
const topLight = useRef<SpotLight>(null!);
const frontLight = useRef<SpotLight>(null!);
@@ -28,8 +29,15 @@ export function Lighting() {
const last = useRef<number>(0);
const samples = useRef<number[]>([]);
useFrame(({ clock }) => {
if (!cast || clock.elapsedTime < TARGET_FRAME_RATE * N) return;
useFrame(({ clock, frameloop }) => {
if (frameloop === "never") {
t0.current = clock.elapsedTime;
samples.current = [];
return;
}
if (!cast || clock.elapsedTime - t0.current < TARGET_FRAME_RATE * N) {
return;
}
const dt = clock.elapsedTime - last.current;
last.current = clock.elapsedTime;
@@ -5,6 +5,7 @@ import { applyPitchYawLimits } from "../../../../../../core/blitz/applyPitchYawL
import { hasEquipment } from "../../../../../../core/blitzkit/hasEquipment";
import { jsxTree } from "../../../../../../core/blitzkit/jsxTree";
import { modelTransformEvent } from "../../../../../../core/blitzkit/modelTransform";
import { controlsEnabledEvent } from "../../../../../../core/controlsEnabled";
import { useModel } from "../../../../../../hooks/useModel";
import { useTankModelDefinition } from "../../../../../../hooks/useTankModelDefinition";
import { useTankTransform } from "../../../../../../hooks/useTankTransform";
@@ -62,9 +63,7 @@ export function TankModel() {
position.set(event.clientX, event.clientY);
event.stopPropagation();
Tankopedia.mutate((draft) => {
draft.controlsEnabled = false;
});
controlsEnabledEvent.dispatch(false);
window.addEventListener("pointermove", handlePointerMove);
window.addEventListener("pointerup", handlePointerUp);
@@ -81,9 +80,7 @@ export function TankModel() {
translateTexture(deltaX + deltaY);
}
function handlePointerUp() {
Tankopedia.mutate((draft) => {
draft.controlsEnabled = true;
});
controlsEnabledEvent.dispatch(true);
window.removeEventListener("pointermove", handlePointerMove);
window.removeEventListener("pointerup", handlePointerUp);
@@ -123,9 +120,7 @@ export function TankModel() {
position.set(event.clientX, event.clientY);
Tankopedia.mutate((draft) => {
draft.controlsEnabled = false;
});
controlsEnabledEvent.dispatch(false);
Tankopedia.mutate((draft) => {
draft.shot = undefined;
draft.highlightArmor = undefined;
@@ -161,9 +156,7 @@ export function TankModel() {
modelTransformEvent.dispatch({ pitch, yaw });
}
function handlePointerUp() {
Tankopedia.mutate((draft) => {
draft.controlsEnabled = true;
});
controlsEnabledEvent.dispatch(true);
window.removeEventListener("pointermove", handlePointerMove);
window.removeEventListener("pointerup", handlePointerUp);
}
@@ -205,9 +198,7 @@ export function TankModel() {
function onPointerDown(event: ThreeEvent<PointerEvent>) {
event.stopPropagation();
Tankopedia.mutate((draft) => {
draft.controlsEnabled = false;
});
controlsEnabledEvent.dispatch(false);
Tankopedia.mutate((draft) => {
draft.shot = undefined;
draft.highlightArmor = undefined;
@@ -246,9 +237,7 @@ export function TankModel() {
modelTransformEvent.dispatch({ pitch, yaw });
}
function handlePointerUp() {
Tankopedia.mutate((draft) => {
draft.controlsEnabled = true;
});
controlsEnabledEvent.dispatch(true);
window.removeEventListener("pointermove", handlePointerMove);
window.removeEventListener("pointerup", handlePointerUp);
}
@@ -1,8 +1,8 @@
import { asset } from '@blitzkit/core';
import { Flex, type FlexProps, Progress } from '@radix-ui/themes';
import { useProgress } from '@react-three/drei';
import { asset } from "@blitzkit/core";
import { Flex, type FlexProps, Progress } from "@radix-ui/themes";
import { useProgress } from "@react-three/drei";
type TankSandboxLoaderProps = Omit<FlexProps, 'id'> & {
type TankSandboxLoaderProps = Omit<FlexProps, "id"> & {
id: number;
};
@@ -12,13 +12,13 @@ export function TankSandboxLoader({ id, ...props }: TankSandboxLoaderProps) {
return (
<Flex width="100%" height="100%" align="center" justify="center" {...props}>
<img
src={asset(`icons/tanks/blitzkit/${id}.webp`)}
style={{ height: '75%', filter: 'blur(1rem)' }}
src={asset(`icons/tanks/big/${id}.webp`)}
style={{ height: "75%", filter: "blur(1rem)" }}
/>
<Progress
size="3"
value={data.progress}
style={{ position: 'absolute', width: '16rem', maxWidth: '50vw' }}
style={{ position: "absolute", width: "16rem", maxWidth: "50vw" }}
/>
</Flex>
);
@@ -135,7 +135,7 @@ export function Node({ id, highlight, nextIds, skeleton }: NodeProps) {
? strings.website.tools.tankopedia.tech_tree.battle
: literals(
strings.website.tools.tankopedia.tech_tree.battles,
[`${games}`]
{ count: games }
))}
</Text>
)}
@@ -158,7 +158,7 @@ export function TechTreeSection({ skeleton }: MaybeSkeletonComponentProps) {
pl="1"
>
<Text size="2">
{literals(strings.common.units.x, [`${multiplier}`])}
{literals(strings.common.units.x, { value: multiplier })}
</Text>
</Flex>
);
@@ -218,10 +218,10 @@ export function TechTreeSection({ skeleton }: MaybeSkeletonComponentProps) {
<CaretLeftIcon />
</IconButton>
<Text>
{literals(strings.website.tools.tankopedia.tech_tree.route, [
`${lineIndex + 1}`,
`${lines.length}`,
])}
{literals(strings.website.tools.tankopedia.tech_tree.route, {
index: lineIndex + 1,
count: lines.length,
})}
</Text>
<IconButton
size="2"
@@ -1,30 +1,37 @@
import type { TankDefinition } from '@blitzkit/core';
import { times } from 'lodash-es';
import type { TankFilters } from '../../stores/tankFilters';
import type { TankDefinition } from "@blitzkit/core";
import { times } from "lodash-es";
import type { TankFilters } from "../../stores/tankFilters";
const SHELLS = times(3, (index) => index);
export function filterTank(filters: TankFilters, tank: TankDefinition) {
export async function filterTank(
filters: TankFilters,
tank: TankDefinition,
owned: number[] = []
) {
return (
(filters.ownership === "all" ||
(filters.ownership === "owned" && owned.includes(tank.id)) ||
(filters.ownership === "unowned" && !owned.includes(tank.id))) &&
(filters.tiers.length === 0 || filters.tiers.includes(tank.tier)) &&
(filters.nations.length === 0 || filters.nations.includes(tank.nation)) &&
(filters.classes.length === 0 || filters.classes.includes(tank.class)) &&
(filters.types.length === 0 || filters.types.includes(tank.type)) &&
(filters.testing === 'include' ||
(filters.testing === 'only' && tank.testing) ||
(filters.testing === 'exclude' && !tank.testing)) &&
(filters.testing === "include" ||
(filters.testing === "only" && tank.testing) ||
(filters.testing === "exclude" && !tank.testing)) &&
(filters.gunType.length === 0 ||
(filters.gunType.includes('regular') &&
(filters.gunType.includes("regular") &&
tank.turrets.some((turret) =>
turret.guns.some((gun) => gun.gun_type!.$case === 'regular'),
turret.guns.some((gun) => gun.gun_type!.$case === "regular")
)) ||
(filters.gunType.includes('auto_loader') &&
(filters.gunType.includes("auto_loader") &&
tank.turrets.some((turret) =>
turret.guns.some((gun) => gun.gun_type!.$case === 'auto_loader'),
turret.guns.some((gun) => gun.gun_type!.$case === "auto_loader")
)) ||
(filters.gunType.includes('auto_reloader') &&
(filters.gunType.includes("auto_reloader") &&
tank.turrets.some((turret) =>
turret.guns.some((gun) => gun.gun_type!.$case === 'auto_reloader'),
turret.guns.some((gun) => gun.gun_type!.$case === "auto_reloader")
))) &&
tank.turrets.some((turret) =>
turret.guns.some((gun) =>
@@ -32,9 +39,9 @@ export function filterTank(filters: TankFilters, tank: TankDefinition) {
(index) =>
filters.shells[index] === null ||
gun.shells[index] === undefined ||
gun.shells[index].type === filters.shells[index],
),
),
gun.shells[index].type === filters.shells[index]
)
)
)
);
}
@@ -0,0 +1,26 @@
import { getTankStats, idToRegion, TankDefinition } from "@blitzkit/core";
import { TankFilters } from "../../stores/tankFilters";
import { filterTank } from "./filterTank";
export async function filterTanks(
filters: TankFilters,
tanks: TankDefinition[],
player?: number
) {
const filtered: TankDefinition[] = [];
let owned: number[] | undefined;
if (player) {
const tankStats = await getTankStats(idToRegion(player), player, {
fields: "tank_id",
});
owned = tankStats?.map(({ tank_id }) => tank_id);
}
for (const tank of tanks) {
if (await filterTank(filters, tank, owned)) filtered.push(tank);
}
return filtered;
}
@@ -0,0 +1,3 @@
import { Quicklime } from "quicklime";
export const controlsEnabledEvent = new Quicklime(true);
-10
View File
@@ -1,10 +0,0 @@
import { useRef } from 'react';
import usePromise from 'react-promise-suspense';
/**
* A more stable alternative to `use` using `usePromise`.
*/
export function useAwait<Type>(promise: Promise<Type>) {
const callback = useRef(async () => await promise);
return usePromise(callback.current, []);
}
@@ -1,7 +1,6 @@
import { fetchEquipmentDefinitions } from '@blitzkit/core';
import { useAwait } from './useAwait';
import { awaitableEquipmentDefinitions } from "../core/awaitables/equipmentDefinitions";
const equipmentDefinitions = useAwait(fetchEquipmentDefinitions());
const equipmentDefinitions = await awaitableEquipmentDefinitions;
export function useEquipmentPreset(preset: string) {
return equipmentDefinitions.presets[preset];
+14 -14
View File
@@ -4,24 +4,24 @@ import {
K_HAT,
TrackDefinition,
TurretDefinition,
} from '@blitzkit/core';
import { invalidate } from '@react-three/fiber';
import type { QuicklimeEvent } from 'quicklime';
import { type RefObject, useEffect } from 'react';
import { Euler, Group, Vector3 } from 'three';
import { degToRad } from 'three/src/math/MathUtils.js';
import { correctZYTuple } from '../core/blitz/correctZYTuple';
} from "@blitzkit/core";
import { invalidate } from "@react-three/fiber";
import type { QuicklimeEvent } from "quicklime";
import { type RefObject, useEffect } from "react";
import { Euler, Group, Vector3 } from "three";
import { degToRad } from "three/src/math/MathUtils.js";
import { correctZYTuple } from "../core/blitz/correctZYTuple";
import {
modelTransformEvent,
type ModelTransformEventData,
} from '../core/blitzkit/modelTransform';
import { useTankModelDefinition } from './useTankModelDefinition';
} from "../core/blitzkit/modelTransform";
import { useTankModelDefinition } from "./useTankModelDefinition";
export function useTankTransform(
track: TrackDefinition,
turret: TurretDefinition,
turretContainer: RefObject<Group>,
gunContainer: RefObject<Group>,
gunContainer: RefObject<Group>
) {
const tankModelDefinition = useTankModelDefinition();
@@ -37,7 +37,7 @@ export function useTankTransform(
const gunRotation = new Euler();
function handleModelTransform(
event: QuicklimeEvent<ModelTransformEventData>,
event: QuicklimeEvent<ModelTransformEventData>
) {
handleModelTransformInner(event.data);
}
@@ -70,13 +70,13 @@ export function useTankTransform(
if (tankModelDefinition.initial_turret_rotation) {
const initialPitch = -degToRad(
tankModelDefinition.initial_turret_rotation.pitch,
tankModelDefinition.initial_turret_rotation.pitch
);
const initialYaw = -degToRad(
tankModelDefinition.initial_turret_rotation.yaw,
tankModelDefinition.initial_turret_rotation.yaw
);
const initialRoll = -degToRad(
tankModelDefinition.initial_turret_rotation.roll,
tankModelDefinition.initial_turret_rotation.roll
);
turretPosition
@@ -117,7 +117,7 @@ function Content() {
}, [members]);
return (
<PageWrapper color="crimson" maxWidth="100%">
<PageWrapper color="crimson" maxWidth="100%" px="0" pb="0">
<Flex justify="center" gap="4" align="center" direction="column">
<DamageWarning />
<Controls
@@ -88,12 +88,13 @@ export const getStaticPaths = (() => {
target="_blank"
underline="always"
>
{literals(strings.website.home.help_translate, [
"BlitzKit",
strings.common.locales[
locale as keyof typeof strings.common.locales
],
])}
{literals(strings.website.home.help_translate, {
name: "BlitzKit",
language:
strings.common.locales[
locale as keyof typeof strings.common.locales
],
})}
</Link>
</Flex>
)
@@ -277,14 +277,14 @@ function Content() {
>
<Flex mt="2" mb="2" direction="column" gap="2">
<Heading size="5">
{literals(strings.website.tools.session.controls.title, [
`${accountInfo?.nickname}`,
])}
{literals(strings.website.tools.session.controls.title, {
name: accountInfo?.nickname,
})}
</Heading>
<Text color="gray">
{literals(strings.website.tools.session.controls.subtitle, [
new Date(session.player.since).toLocaleString(locale),
])}
{literals(strings.website.tools.session.controls.subtitle, {
time: new Date(session.player.since).toLocaleString(locale),
})}
</Text>
</Flex>
@@ -49,16 +49,16 @@ const tankModelDefinitions = await fetchModelDefinitions();
const tank = tankDefinitions.tanks[id];
const tankModelDefinition = tankModelDefinitions.models[tank.id];
const unwrap = unwrapper(locale);
const title = literals(strings.website.tools.tankopedia.tank_seo_title, [
unwrap(tank.name),
TIER_ROMAN_NUMERALS[tank.tier],
strings.common.nations_adjectives[
tank.nation as keyof typeof strings.common.nations_adjectives
],
strings.common.tank_class_short[tank.class],
"BlitzKit",
strings.common.nations[tank.nation as keyof typeof strings.common.nations],
]);
const title = literals(strings.website.tools.tankopedia.tank_seo_title, {
name: unwrap(tank.name),
tier: TIER_ROMAN_NUMERALS[tank.tier],
nationality:
strings.common.nations_adjectives[
tank.nation as keyof typeof strings.common.nations_adjectives
],
class: strings.common.tank_class_short[tank.class],
website: "BlitzKit",
});
const url = import.meta.env.SITE + Astro.url.pathname;
const icon = asset(`icons/tanks/big/${id}.webp`);
@@ -91,14 +91,14 @@ const characteristics = tankCharacteristics(
);
const description = literals(
strings.website.tools.tankopedia.tank_seo_description,
[
unwrap(tank.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),
]
{
name: unwrap(tank.name),
dpm: Math.round(characteristics.dpm).toLocaleString(locale),
alpha: Math.round(characteristics.damage).toLocaleString(locale),
penetration: Math.round(characteristics.penetration).toLocaleString(locale),
speed: Math.round(characteristics.speedForwards).toLocaleString(locale),
health: Math.round(characteristics.health).toLocaleString(locale),
}
);
export interface TankGuide {
+1 -1
View File
@@ -6,7 +6,7 @@ export interface WargamingLogin {
expires: number;
}
interface App {
export interface App {
developerMode: boolean;
policiesAgreementIndex: number;
logins: {
@@ -22,6 +22,7 @@ export interface TankFilters {
searching: boolean;
gunType: CaseType<GunDefinition>[];
shells: [ShellType | null, ShellType | null, ShellType | null];
ownership: "all" | "owned" | "unowned";
}
export const TankFilters = new Varuna<TankFilters>({
@@ -34,4 +35,5 @@ export const TankFilters = new Varuna<TankFilters>({
searching: false,
gunType: [],
shells: [null, null, null],
ownership: "all",
});
Loaded 100 of 102 files, more files were not shown because too many files have changed in this diff. Show more