feat: more strings

This commit is contained in:
TrèsAbhi committed 2024-03-09 12:01:41 -06:00
1 parent 8e216ebe46
commit 9840982aa2
4 files changed
+10 -7

No files matched your search

+1
View File
@@ -5,6 +5,7 @@
"accountinfo",
"aeson",
"alphatest",
"APAC",
"apcr",
"artefacts",
"atgm",
+2 -3
View File
@@ -2,7 +2,6 @@ import CommandWrapper from '../components/CommandWrapper';
import NoData from '../components/NoData';
import * as Tanks from '../components/Tanks';
import TitleBar from '../components/TitleBar';
import { encyclopediaInfo } from '../core/blitz/encyclopediaInfo';
import { getAccountInfo } from '../core/blitz/getAccountInfo';
import { getClanAccountInfo } from '../core/blitz/getClanAccountInfo';
import getTankStats from '../core/blitz/getTankStats';
@@ -88,9 +87,9 @@ export const ownedTanksCommand = new Promise<CommandRegistry>((resolve) => {
const rightColumn = tanks.slice(leftColumnSize);
return (
<Tanks.Root>
<Tanks.Root key={nation}>
<Tanks.Title>
{(await encyclopediaInfo).vehicle_nations[nation]}
{translate(`common.nations.${nation}`)}
</Tanks.Title>
<Tanks.Row>
@@ -13,6 +13,7 @@ import buttonLink from '../../../core/discord/buttonLink';
import embedWarning from '../../../core/discord/embedWarning';
import normalizeInteractionReturnable from '../../../core/discord/normalizeInteractionReturnable';
import { psa } from '../../../core/discord/psa';
import { translator } from '../../../core/localization/translator';
import { UserError } from '../../../hooks/userError';
export default async function handleChatInputCommand(
@@ -107,10 +108,11 @@ export default async function handleChatInputCommand(
interaction.followUp(followUp);
}
} catch (error) {
const { t } = translator(interaction.locale);
const components = [
new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder()
.setLabel('Get Help on Discord Server')
.setLabel(t`bot.common.errors.get_help`)
.setURL('https://discord.gg/nDt7AjGJQH')
.setStyle(ButtonStyle.Link),
),
@@ -125,8 +127,7 @@ export default async function handleChatInputCommand(
console.error(interaction.commandName, error);
interaction.editReply({
content:
"# Blitzkrieg 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.",
content: t`bot.common.errors.uncaught_error`,
components,
});
}
+3 -1
View File
@@ -184,7 +184,9 @@
"player_not_linked": "# I don't know who you are\nUse the `/link` command to get started.",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"%s\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"%s\". 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."
"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": "# Blitzkrieg 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."
}
},