lang: translate messages for errors that were missing

This commit is contained in:
Marius Begby committed 2023-12-23 23:14:20 +01:00
1 parent 16333201a9
commit 733b638cb0
6 files changed
+81 -26

No files matched your search

+2 -2
View File
@@ -102,7 +102,7 @@ class HelpCommand extends BaseSlashCommandInteraction {
private getCommandString(command: BaseSlashCommandInteraction, interaction: ChatInputCommandInteraction): string {
const commandName = command.data.name;
const metadataKey = `commands.${commandName}.metadata`;
const locale = interaction.guildLocale ?? 'en';
const locale = interaction.guildLocale ?? 'en-US';
let translatedData: CommandMetadata | undefined = undefined;
translatedData = translatorInstance.getResource(locale, 'bot', metadataKey) as CommandMetadata | undefined;
@@ -122,7 +122,7 @@ class HelpCommand extends BaseSlashCommandInteraction {
if (option instanceof SlashCommandNumberOption || option instanceof SlashCommandStringOption) {
const metadataKey = `commands.${commandName}.metadata.options.${option.name}`;
const locale = interaction.guildLocale ?? 'en';
const locale = interaction.guildLocale ?? 'en-US';
let translatedData: CommandMetadata | undefined = undefined;
translatedData = translatorInstance.getResource(locale, 'bot', metadataKey) as CommandMetadata | undefined;
return `**\`${translatedData?.name ?? option.name}\`** `;