diff --git a/suggestions/cogs/suggestion_cog.py b/suggestions/cogs/suggestion_cog.py index 3ef838b..e011b95 100644 --- a/suggestions/cogs/suggestion_cog.py +++ b/suggestions/cogs/suggestion_cog.py @@ -225,10 +225,13 @@ async def suggest( try: embed: disnake.Embed = disnake.Embed( - description=f"Hey, {interaction.author.mention}. Your suggestion has been sent " - f"to {channel.mention} to be voted on!\n\n" - f"Please wait until it gets approved or rejected by a staff member.\n\n" - f"Your suggestion ID (sID) for reference is **{suggestion.suggestion_id}**.", + description=self.bot.get_locale( + "SUGGEST_INNER_SUGGESTION_SENT", interaction.locale + ).format( + interaction.author.mention, + channel.mention, + suggestion.suggestion_id, + ), timestamp=self.state.now, color=self.bot.colors.embed_color, ) @@ -237,7 +240,9 @@ async def suggest( icon_url=icon_url, ) embed.set_footer( - text=f"Guild ID: {interaction.guild_id} | sID: {suggestion.suggestion_id}" + text=self.bot.get_locale( + "SUGGEST_INNER_SUGGESTION_SENT_FOOTER", interaction.locale + ).format(interaction.guild_id, suggestion.suggestion_id) ) user_config: UserConfig = await UserConfig.from_id( interaction.author.id, self.bot.state @@ -245,7 +250,10 @@ async def suggest( if user_config.dm_messages_disabled or guild_config.dm_messages_disabled: await interaction.send(embed=embed, ephemeral=True) else: - await interaction.send("Thanks for your suggestion!", ephemeral=True) + await interaction.send( + self.bot.get_locale("SUGGEST_INNER_THANKS", interaction.locale), + ephemeral=True, + ) await interaction.author.send(embed=embed) except disnake.HTTPException as e: log.debug( @@ -307,7 +315,12 @@ async def approve( guild_config=guild_config, ) - await interaction.send(f"You have approved **{suggestion_id}**", ephemeral=True) + await interaction.send( + self.bot.get_locale("APPROVE_INNER_MESSAGE", interaction.locale).format( + suggestion_id + ), + ephemeral=True, + ) log.debug( "User %s approved suggestion %s in guild %s", interaction.author.id, @@ -359,7 +372,12 @@ async def reject( guild_config=guild_config, ) - await interaction.send(f"You have rejected **{suggestion_id}**", ephemeral=True) + await interaction.send( + self.bot.get_locale("REJECT_INNER_MESSAGE", interaction.locale).format( + suggestion_id + ), + ephemeral=True, + ) log.debug( "User %s rejected suggestion %s in guild %s", interaction.author.id, @@ -410,7 +428,10 @@ async def clear( await suggestion.mark_cleared_by(self.state, interaction.user.id, response) await interaction.send( - f"I have cleared `{suggestion_id}` for you.", ephemeral=True + self.bot.get_locale("CLEAR_INNER_MESSAGE", interaction.locale).format( + suggestion_id + ), + ephemeral=True, ) log.debug( "User %s cleared suggestion %s in guild %s", diff --git a/suggestions/locales/en_GB.json b/suggestions/locales/en_GB.json index 46fa153..e36e257 100644 --- a/suggestions/locales/en_GB.json +++ b/suggestions/locales/en_GB.json @@ -43,5 +43,11 @@ "DISPLAY_DATA_INNER_OLD_SUGGESTION_TYPE": "Suggestions using reactions are not supported by this command.", "DISPLAY_DATA_INNER_NO_VOTERS": "There are no voters to show you for this.", "VOTER_PAGINATOR_INNER_EMBED_TITLE": "{} for suggestion `{}`", - "VOTER_PAGINATOR_INNER_EMBED_FOOTER": "Page {} of {}" + "VOTER_PAGINATOR_INNER_EMBED_FOOTER": "Page {} of {}", + "APPROVE_INNER_MESSAGE": "You have approved **{}**", + "REJECT_INNER_MESSAGE": "You have rejected **{}**", + "CLEAR_INNER_MESSAGE": "I have cleared `{}` for you.", + "SUGGEST_INNER_SUGGESTION_SENT": "Hey, {}. Your suggestion has been sent to {} to be voted on!\nPlease wait until it gets approved or rejected by a staff member.\nYour suggestion ID (sID) for reference is **{}**.", + "SUGGEST_INNER_SUGGESTION_SENT_FOOTER": "Guild ID: {} | sID: {}", + "SUGGEST_INNER_THANKS": "Thanks for your suggestion!" } \ No newline at end of file