From ba17aae706e8d19c70a3f7c9fd0d09c876bb164d Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:29:41 -0500 Subject: [PATCH 1/2] feat: bump int size --- docs/changelogs/1.27.3.md | 9 +++++++++ package.json | 2 +- .../src/core/blitzkit/getBlitzFromDiscord.ts | 6 ++++-- prisma/schema.prisma | 19 +++---------------- 4 files changed, 17 insertions(+), 19 deletions(-) create mode 100644 docs/changelogs/1.27.3.md diff --git a/docs/changelogs/1.27.3.md b/docs/changelogs/1.27.3.md new file mode 100644 index 000000000..73c49da1e --- /dev/null +++ b/docs/changelogs/1.27.3.md @@ -0,0 +1,9 @@ +# BlitzKit 1.27.3 + +This update only affects the bot. + +## Fixes + +- Added support for 64-bit IDs allowing users with new accounts to link with BlitzKit + - This comes at the added cost of resetting the links of all other accounts + - Just re-link and you're good to go diff --git a/package.json b/package.json index 270773745..649b22a3c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "blitzkit", "private": true, - "version": "1.27.2", + "version": "1.27.3", "description": "🎉 Tools for everything World of Tanks Blitz", "type": "module", "types": "./types.d.ts", diff --git a/packages/bot/src/core/blitzkit/getBlitzFromDiscord.ts b/packages/bot/src/core/blitzkit/getBlitzFromDiscord.ts index 4821d1291..4bb31df02 100644 --- a/packages/bot/src/core/blitzkit/getBlitzFromDiscord.ts +++ b/packages/bot/src/core/blitzkit/getBlitzFromDiscord.ts @@ -8,6 +8,8 @@ export async function getBlitzFromDiscord(discordId: bigint) { if (unique === null) return null; - await flagUserActivity(unique.blitz_id); - return { id: unique.blitz_id, region: idToRegion(unique.blitz_id) }; + const id = Number(unique.blitz_id); + + await flagUserActivity(id); + return { id, region: idToRegion(id) }; } diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 2d169b953..f4bced458 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -9,28 +9,15 @@ datasource db { } model User { - blitz_id Int @id @map("blitz") // map: "blitz" was too vague - last_used DateTime? @default(now()) - tank_votes TankVote[] + blitz_id BigInt @id @map("blitz") // map: "blitz" was too vague + last_used DateTime? @default(now()) @@map("Users") // map: "Users" was mistakenly plural } -model TankVote { - id Int @id - last_updated DateTime @default(now()) - easiness Int? - firepower Int? - maneuverability Int? - survivability Int? - - user User @relation(fields: [user_blitz_id], references: [blitz_id]) - user_blitz_id Int -} - model DiscordUser { discord_id BigInt @id @map("discord") // map: "discord" was too vague - blitz_id Int @map("blitz") // map: "blitz" was too vague + blitz_id BigInt @map("blitz") // map: "blitz" was too vague @@map("DiscordUsers") // map: "DiscordUsers" was mistakenly plural } From 836cf69f01062f2abeac59fff74c2d7ab3fcc4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:37:29 -0500 Subject: [PATCH 2/2] New Crowdin updates (#149) * New translations en.json (Russian) * New translations en.json (Ukrainian) * New translations en.json (Spanish) * New translations en.json (Chinese Simplified) --- packages/i18n/strings/es.json | 210 +++++++++++++++++----------------- packages/i18n/strings/ru.json | 6 +- packages/i18n/strings/uk.json | 24 ++-- packages/i18n/strings/zh.json | 42 +++---- 4 files changed, 141 insertions(+), 141 deletions(-) diff --git a/packages/i18n/strings/es.json b/packages/i18n/strings/es.json index 83ddbd04b..1e25798f5 100644 --- a/packages/i18n/strings/es.json +++ b/packages/i18n/strings/es.json @@ -843,105 +843,105 @@ }, "tech_tree": { "title": "Árbol tecnológico", - "battle": "1 battle", - "battles": "%s1 battles", - "route": "Route %s1 of %s2" + "battle": "1 batalla", + "battles": "%s1 batallas", + "route": "Ruta %s1 de %s2" }, "game_modes": { - "title": "Game mode abilities" + "title": "Habilidades del modo de juego" }, "review": { - "title": "Review videos", + "title": "Vídeos de reseña", "disclaimer": "BlitzKit no respalda ningún vídeo de reseñas.", - "join": "Apply to %s1 YouTuber program" + "join": "Aplica para el programa de YouTube de %s1" }, "configuration": { "title": "", "modules": { - "title": "Modules", - "stock": "Stock", - "upgrade": "Upgrade" + "title": "Módulos", + "stock": "Base", + "upgrade": "Mejorar" }, "equipment": { - "title": "Equipment", - "clear": "Clear" + "title": "Equipo", + "clear": "Limpiar" }, "provisions": { "title": "Provisiones", "clear": "Limpiar" }, "consumables": { - "title": "Consumables", - "clear": "Clear", - "info": "Yellow consumables do not affect the statistics." + "title": "Consumibles", + "clear": "Limpiar", + "info": "Consumibles amarillos no afectan las estadísticas." }, "skills": { - "title": "Crew skills", - "clear": "Clear", - "maximize": "Maximize", - "info": "Yellow skills only apply under special circumstances. Hold Space to quickly toggle between level 0 and 7." + "title": "Habilidades de tripulación", + "clear": "Limpiar", + "maximize": "Maximizar", + "info": "Las habilidades en amarillo solo se aplican en circunstancias especiales. Mantenga el espacio para cambiar rápidamente entre los niveles 0 y 7." }, "miscellaneous": { "title": "Misceláneo" } }, "characteristics": { - "title": "Characteristics", + "title": "Características", "compare": { - "label": "Compare against", - "class": "Tier %s1 %s2", - "tier": "All of tier %s1", - "all": "All tanks" + "label": "Comparar con", + "class": "Nivel %s1 - %s2", + "tier": "Todos de nivel %s1", + "all": "Todos los tanques" }, "values": { - "shell_index": "Shell %s1", - "at_distance": "At %s1m", - "at_distance_slider_label": "Distance", - "dispersion_at_distance": "Dispersion at %s1m", - "gun_flexibility": "Gun flexibility", - "speed": "Speed", - "terrain_coefficients": "Terrain coefficients", - "raw_terrain_coefficients": "Raw terrain coefficients", - "power_to_weight_ratio": "Power to weight ratio", - "hull_traverse_speed": "Hull traverse speed", - "camouflage": "Camouflage", - "reload": "Reload", - "crewCount": "Crew count", + "shell_index": "Proyectil %s1", + "at_distance": "A %s1m", + "at_distance_slider_label": "Distancia", + "dispersion_at_distance": "Dispersión a %s1m", + "gun_flexibility": "Flexibilidad del arma", + "speed": "Velocidad", + "terrain_coefficients": "Coeficientes de terreno", + "raw_terrain_coefficients": "Coeficientes de terreno en bruto", + "power_to_weight_ratio": "Relación peso-potencia", + "hull_traverse_speed": "Velocidad de rotación del casco", + "camouflage": "Camuflaje", + "reload": "Recarga", + "crewCount": "Cantidad de tripulantes", "shellNormalization": "Normalización", "shellRicochet": "Rebote", "dpm": "DPM", "dpmEffective": "Effective at 60s", - "shells": "Shells", - "mostOptimalShellIndex": "Most optimal shell", - "shellReloads": "Shell reloads", - "shellReload": "Shell reload", + "shells": "Proyectiles", + "mostOptimalShellIndex": "Proyectil más óptimo", + "shellReloads": "Tiempos de recarga", + "shellReload": "Tiempo de recarga", "intraClip": "Intra-clip", "caliber": "Calibre", "penetration": "Penetración", "damage": "Daño", "clipDamage": "Clipping potential", - "moduleDamage": "Module damage", + "moduleDamage": "Daño a módulos", "explosionRadius": "Radio de Explosión", - "shellVelocity": "Shell velocity", - "aimTime": "Aim time", - "dispersion": "Still", - "dispersionMoving": "Moving", + "shellVelocity": "Velocidad del proyectil", + "aimTime": "Tiempo de apuntado", + "dispersion": "Quieto", + "dispersionMoving": "En movimiento", "dispersionHullTraversing": "Hull traversing", "dispersionTurretTraversing": "Turret traversing", - "dispersionShooting": "Shooting", - "dispersionGunDamaged": "Gun damaged", - "gunDepression": "Depression", - "gunElevation": "Elevation", - "gunFrontalDepression": "Frontal depression", - "gunFrontalElevation": "Frontal elevation", - "gunRearDepression": "Rear depression", - "gunRearElevation": "Rear elevation", + "dispersionShooting": "Disparando", + "dispersionGunDamaged": "Arma dañada", + "gunDepression": "Depresión", + "gunElevation": "Elevación", + "gunFrontalDepression": "Depresión frontal", + "gunFrontalElevation": "Elevación frontal", + "gunRearDepression": "Depresión trasera", + "gunRearElevation": "Elevación trasera", "azimuthLeft": "Azimuth left", "azimuthRight": "Azimuth right", - "speedForwards": "Forwards", - "speedBackwards": "Backwards", - "hardTerrainCoefficient": "Hard", - "hardTerrainCoefficientRaw": "Hard", + "speedForwards": "Avance", + "speedBackwards": "Marcha atrás", + "hardTerrainCoefficient": "Duro", + "hardTerrainCoefficientRaw": "Duro", "mediumTerrainCoefficient": "Medio", "mediumTerrainCoefficientRaw": "Medio", "softTerrainCoefficient": "Suave", @@ -1026,7 +1026,7 @@ "maximize": "Maximizar" }, "modules": { - "stock": "Stock", + "stock": "Base", "upgrade": "Mejorar" }, "provisions": { @@ -1107,22 +1107,22 @@ }, "no_battles": { "title": "No battles", - "hint": "Go ahead and play a game" + "hint": "Sigue adelante y juega una partida" }, "table": { "tank": "Tanque", "total": "Total", - "remove": "Remove" + "remove": "Remover" } }, "tier_list": { "name": "Tier list", "button": "Rank tanks", "description": "Rank Blitz tanks", - "seo_description": "Explore tier lists ranking tanks from best to worst, based on player ratings and statistical performance in World of Tanks Blitz", + "seo_description": "Explora las listas de clasificación de los tanques de mejor a peor, basadas en las calificaciones de los jugadores y el rendimiento estadístico en World of Tanks Blitz", "buttons": { "reset": "Restablecer", - "share": "Share" + "share": "Compartir" } }, "embed": { @@ -1131,54 +1131,54 @@ "description": "Embeds for streaming", "seo_description": "Create embeds for streaming World of Tanks Blitz with extreme customization", "coming_soon": "More embeds coming soon.", - "suggest": "Suggest ideas.", + "suggest": "Sugerir ideas.", "preview": { "title": "Example preview", "upload": "Upload test background" }, "configuration": { "import": { - "title": "Import", - "description": "Paste your current URL if you have one already to import your settings", - "hint": "Paste URL...", - "apply": "Apply", - "idiot_title": "Invalid URL", - "idiot_description": "Try pasting the URL that BlitzKit previously generated, you silly goose!", + "title": "Importar", + "description": "Pega tu URL actual si ya tienes una para importar la configuración", + "hint": "Pegar URL...", + "apply": "Aplicar", + "idiot_title": "URL inválida", + "idiot_description": "Intenta pegar la URL que BlitzKit generó anteriormente, ¡Torpe!", "idiot_button": "Okay, my bad" }, "export": { - "title": "Export", - "description": "Copy all properties for you streaming software", + "title": "Exportar", + "description": "Copiar todas las propiedades para tu software de streaming", "generate": { - "button": "Generate URL", - "title": "Generate URL", - "subtitle": "Search an account to track", - "cancel": "Cancel", + "button": "Generar URL", + "title": "Generar URL", + "subtitle": "Buscar una cuenta para seguir", + "cancel": "Cancelar", "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\".", + "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\".", "back": "Volver", - "copy": "Copy URL" + "copy": "Copiar URL" } }, - "css": "Copy CSS", - "width": "Copy Width", - "height": "Copy Height", + "css": "Copiar CSS", + "width": "Copiar ancho", + "height": "Copiar altura", "framerate": "Copy Framerate" }, "customize": { - "title": "Customize", + "title": "Personalizar", "reset": "Restablecer", "description": "Bells and whistles of your embed" } }, "types": { "breakdown": { - "name": "Breakdown", + "name": "Desglose", "options": { "width": "Ancho", "height": "Altura", - "showTotal": "Show total", + "showTotal": "Mostrar total", "listGap": "List gap", "listMaxTanks": "Max tanks", "cardRadius": "Card radius", @@ -1189,25 +1189,25 @@ "cardTitleClassIcon": "Card title class icon", "cardBodyBackgroundColor": "Card body background color", "cardBodyPadding": "Card body padding", - "columnGap": "Column gap", - "columnValue": "Column value", - "columnLabel": "Column label", - "column1": "Column 1", - "column2": "Column 2", - "column3": "Column 3", - "column4": "Column 4", - "column1CustomLabel": "Column 1 label", - "column2CustomLabel": "Column 2 label", - "column3CustomLabel": "Column 3 label" + "columnGap": "Espacio entre columnas", + "columnValue": "Valor de columna", + "columnLabel": "Etiqueta de columna", + "column1": "Columna 1", + "column2": "Columna 2", + "column3": "Columna 3", + "column4": "Columna 4", + "column1CustomLabel": "Etiqueta de la columna 1", + "column2CustomLabel": "Etiqueta de la columna 2", + "column3CustomLabel": "Etiqueta de la columna 3" } } } }, "charts": { - "name": "Charts", + "name": "Gráficos", "button": "Nerd out", "description": "Lots of graphs", - "seo_description": "Charts and graphs on anything and everything about tanks, players, and events in World of Tanks Blitz" + "seo_description": "Gráficos y tablas sobre todo lo relacionado con tanques, jugadores y eventos en World of Tanks Blitz" }, "rating": { "name": "Rating", @@ -1218,11 +1218,11 @@ "discord": { "name": "Discord bot", "button": "Install now", - "description": "Stats right in Discord", - "seo_description": "Get stats right in Discord with BlitzKit's Discord bot" + "description": "Estadísticas en Discord", + "seo_description": "Obtén estadísticas en Discord con el bot de Discord de BlitzKit" }, "more": { - "name": "More coming soon", + "name": "Más próximamente", "button": "Join Discord", "description": "What we're making", "seo_description": "What we're making with BlitzKit" @@ -1241,7 +1241,7 @@ }, "blitz_analysis": { "name": "BlitzAnalysis[]", - "button": "Analyze now", + "button": "Analizar ahora", "description": "Rich historic average stats", "seo_description": "Rich historic average stats in World of Tanks Blitz" }, @@ -1253,19 +1253,19 @@ } }, "footer": { - "motto": "Everything World of Tanks Blitz", - "copyright": "Unaffiliated with Wargaming or any service", + "motto": "Todo sobre World of Tanks Blitz", + "copyright": "No afiliado con Wargaming u otros servicios", "about": { "title": "About", "credits": "Credits", "discord": "Discord", "github": "GitHub", - "patches": "Patches" + "patches": "Parches" }, "legal": { "title": "Legal", - "privacy": "Privacy policy", - "terms": "Terms of service" + "privacy": "Política de Privacidad", + "terms": "Términos del servicio" } } } diff --git a/packages/i18n/strings/ru.json b/packages/i18n/strings/ru.json index 5e4e87541..0b9f1ec59 100644 --- a/packages/i18n/strings/ru.json +++ b/packages/i18n/strings/ru.json @@ -716,7 +716,7 @@ "label": "Сортировка", "fire": "Стрельба", "maneuverability": "Манёвренность", - "survivability": "Живучесть" + "survivability": "Выживаемость" }, "direction": { "label": "Направление", @@ -975,7 +975,7 @@ } }, "firepower": { - "title": "Огневая мощь" + "title": "Стрельба" }, "crew": { "title": "Мастерство экипажа", @@ -991,7 +991,7 @@ "title": "Манёвренность" }, "survivability": { - "title": "Живучесть" + "title": "Выживаемость" } }, "compare": { diff --git a/packages/i18n/strings/uk.json b/packages/i18n/strings/uk.json index 4c4e5ca39..360315c33 100644 --- a/packages/i18n/strings/uk.json +++ b/packages/i18n/strings/uk.json @@ -86,14 +86,14 @@ "other": "Збірна нація" }, "nations_adjectives": { - "ussr": "Радянська", - "germany": "Німецька", - "usa": "Американська", - "china": "Китайська", - "uk": "Британська", - "france": "Французька", - "japan": "Японська", - "european": "Європейська", + "ussr": "Радянський", + "germany": "Німецький", + "usa": "Американський", + "china": "Китайський", + "uk": "Британський", + "france": "Французький", + "japan": "Японський", + "european": "Європейський", "other": "Гібрид" }, "tank_class_short": { @@ -363,8 +363,8 @@ "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 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." + "tanks_not_on_line": ".", + "unordered": "" } }, "about": { @@ -544,7 +544,7 @@ "options": { "limit": { "name": "ліміт", - "description": "How many neighbors to display (default: %s1)" + "description": "" }, "season": { "name": "season", @@ -594,7 +594,7 @@ } }, "ping": { - "name": "ping", + "name": "", "description": "Check wether the bot is alive.", "body": { "pong": "Pong 🏓", diff --git a/packages/i18n/strings/zh.json b/packages/i18n/strings/zh.json index 34da7184e..6e6a794ba 100644 --- a/packages/i18n/strings/zh.json +++ b/packages/i18n/strings/zh.json @@ -754,7 +754,7 @@ "tank_seo_description": "%s1-Tier %s2 %s3 %s4 | %s5 Tankopedia | 戰車世界閃擊戰 (WoTB)", "sandbox": { "poses": { - "hull_down": "坦克下部", + "hull_down": "戰車下部", "face_hug": "面部色调", "default": "預設" }, @@ -897,21 +897,21 @@ "shell_index": "炮弹 %s1", "at_distance": "在 %s1m", "at_distance_slider_label": "距离", - "dispersion_at_distance": "%s1米的散射度", + "dispersion_at_distance": "%s1公尺擴散度", "gun_flexibility": "炮控灵活度", "speed": "速度", "terrain_coefficients": "地势系数", "raw_terrain_coefficients": "原始地形系数", "power_to_weight_ratio": "推重比", "hull_traverse_speed": "炮塔旋转速度", - "camouflage": "伪装", + "camouflage": "偽裝", "reload": "裝填", "crewCount": "乘员人数", "shellNormalization": "轉正", "shellRicochet": "跳彈", - "dpm": "每分钟伤害", + "dpm": "每分鍾傷害血量", "dpmEffective": "60秒内生效", - "shells": "炮弹 ", + "shells": "砲彈", "mostOptimalShellIndex": "最优炮弹", "shellReloads": "炮弹重装", "shellReload": "炮弹重装", @@ -1040,19 +1040,19 @@ "performance": { "name": "性能表现", "button": "查看坦克", - "description": "坦克性能统计", - "seo_description": "最好的坦克及其在世界坦克闪电战中的表现", + "description": "戰車性能統計", + "seo_description": "最好的戰車及其在戰車世界閃擊戰中的表現", "estimation": { "body": "基于 %s1个玩家的估计数据。更新 %s2 之前。", - "hours": "%s1 小时", - "minutes": "%s1 分钟" + "hours": "%s1 小時", + "minutes": "%s1 分鐘" }, "player_count": { "label": "玩家数量" }, "table": { "tanks": { - "header": "坦克", + "header": "戰車", "total": "全部" }, "stats": { @@ -1068,15 +1068,15 @@ "hits": "命中數", "damage_ratio": "伤害效率", "damage_taken": "伤害值", - "capture_points": "占领值" + "capture_points": "佔領點數" } } }, "gallery": { - "name": "图库", - "button": "浏览全部", - "description": "Blitz玩家头像", - "seo_description": "所有坦克闪电战玩家头像", + "name": "圖庫", + "button": "瀏覽所有", + "description": "Blitz 玩家頭像", + "seo_description": "所有戰車世界閃擊戰玩家頭像", "last_updated": "最後更新於 %s1", "search": { "hint": "搜尋頭像……", @@ -1131,17 +1131,17 @@ "description": "串流嵌入功能", "seo_description": "創建具有極高自訂化的《戰車世界:閃擊戰》串流嵌入功能", "coming_soon": "更多嵌入功能即將推出。", - "suggest": "建议与想法", + "suggest": "建議與想法。", "preview": { - "title": "示例预览", - "upload": "上传测试背景" + "title": "範例", + "upload": "上傳測試背景" }, "configuration": { "import": { - "title": "导入", + "title": "導入", "description": "如果您已经有一个要导入您的设置,请粘贴您当前的 URL", - "hint": "粘贴链接...", - "apply": "应用", + "hint": "貼上 URL……", + "apply": "套用", "idiot_title": "無效的 URL", "idiot_description": "試著貼上 BlitzKit 先前生成的網址吧,你這隻傻鵝!", "idiot_button": "好吧,我的錯"