From a246b9424125e82ab264d454ab624ac8a2fa4dc7 Mon Sep 17 00:00:00 2001 From: Macintosh II Date: Thu, 28 Sep 2023 01:00:02 +0300 Subject: [PATCH] Use Messages.DescriptionActionExpiresAt --- locale/Messages.resx | 3 --- locale/Messages.ru.resx | 3 --- locale/Messages.tt-ru.resx | 3 --- src/Commands/ToolsCommandGroup.cs | 12 ++++++------ src/Messages.Designer.cs | 6 ------ 5 files changed, 6 insertions(+), 21 deletions(-) diff --git a/locale/Messages.resx b/locale/Messages.resx index 7d6b9e0..93dfa2d 100644 --- a/locale/Messages.resx +++ b/locale/Messages.resx @@ -636,7 +636,4 @@ Muted with a mute role - - Until - diff --git a/locale/Messages.ru.resx b/locale/Messages.ru.resx index 56722cf..ca4c00c 100644 --- a/locale/Messages.ru.resx +++ b/locale/Messages.ru.resx @@ -636,7 +636,4 @@ Заглушен с помощью мут роли - - До - diff --git a/locale/Messages.tt-ru.resx b/locale/Messages.tt-ru.resx index 5bce0c6..eeda594 100644 --- a/locale/Messages.tt-ru.resx +++ b/locale/Messages.tt-ru.resx @@ -636,7 +636,4 @@ замучен ролькой - - до - diff --git a/src/Commands/ToolsCommandGroup.cs b/src/Commands/ToolsCommandGroup.cs index 217528e..dca2890 100644 --- a/src/Commands/ToolsCommandGroup.cs +++ b/src/Commands/ToolsCommandGroup.cs @@ -144,8 +144,8 @@ public class ToolsCommandGroup : CommandGroup if (memberData.BannedUntil < DateTimeOffset.MaxValue) { builder.Append("- ").AppendLine(Messages.ShowInfoBanned) - .Append(" - ").Append(Messages.ShowInfoUntil).Append(' ') - .AppendLine(Markdown.Timestamp(memberData.BannedUntil.Value)); + .Append(" - ").AppendLine(string.Format( + Messages.DescriptionActionExpiresAt, Markdown.Timestamp(memberData.BannedUntil.Value))); } if (memberData.BannedUntil >= DateTimeOffset.MaxValue) @@ -161,15 +161,15 @@ public class ToolsCommandGroup : CommandGroup if (memberData.MutedUntil is not null && DateTimeOffset.UtcNow <= memberData.MutedUntil) { builder.Append(" - ").AppendLine(Messages.ShowInfoMutedWithMuteRole) - .Append(" - ").Append(Messages.ShowInfoUntil).Append(' ') - .AppendLine(Markdown.Timestamp(memberData.MutedUntil.Value)); + .Append(" - ").Append(" - ").AppendLine(string.Format( + Messages.DescriptionActionExpiresAt, Markdown.Timestamp(memberData.MutedUntil.Value))); } if (guildMember is not null && guildMember.CommunicationDisabledUntil.IsDefined()) { builder.Append(" - ").AppendLine(Messages.ShowInfoMutedWithTimeout) - .Append(" - ").Append(Messages.ShowInfoUntil).Append(' ') - .AppendLine(Markdown.Timestamp(guildMember.CommunicationDisabledUntil.Value.Value)); + .Append(" - ").Append(" - ").AppendLine(string.Format( + Messages.DescriptionActionExpiresAt, Markdown.Timestamp(guildMember.CommunicationDisabledUntil.Value.Value))); } } } diff --git a/src/Messages.Designer.cs b/src/Messages.Designer.cs index 29f4dc5..4d59769 100644 --- a/src/Messages.Designer.cs +++ b/src/Messages.Designer.cs @@ -1085,11 +1085,5 @@ namespace Boyfriend { return ResourceManager.GetString("ShowInfoMutedWithMuteRole", resourceCulture); } } - - internal static string ShowInfoUntil { - get { - return ResourceManager.GetString("ShowInfoUntil", resourceCulture); - } - } } }