From 771750c92282d61bcd1421ee406c92bd97331706 Mon Sep 17 00:00:00 2001 From: Macintxsh <95250141+mctaylors@users.noreply.github.com> Date: Mon, 18 Mar 2024 21:27:35 +0300 Subject: [PATCH] Rename locale Sound to Loaded for clarity (#270) If you go through the locales, sooner or later you will notice `Sound*`, which is used in `GuildLoadedResponder.cs`. A new contributor (most likely) will not understand what it is used for at once, because we use `$"Loaded{i}".Localized()` instead of `Messages.Sound*` directly. Also, if you change the locale's value, for example the same "Loaded!", `Sound` will not fit anymore, because "Loaded!" is not a sound, but a phrase. Other suggestions are welcome. Signed-off-by: mctaylors --- locale/Messages.resx | 6 +++--- locale/Messages.ru.resx | 6 +++--- locale/Messages.tt-ru.resx | 6 +++--- src/Messages.Designer.cs | 12 ++++++------ src/Responders/GuildLoadedResponder.cs | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/locale/Messages.resx b/locale/Messages.resx index c8ef510..c2b9abb 100644 --- a/locale/Messages.resx +++ b/locale/Messages.resx @@ -117,13 +117,13 @@ {0}, welcome to {1} - + Veemo! - + Woomy! - + Ngyes! diff --git a/locale/Messages.ru.resx b/locale/Messages.ru.resx index eb8e57b..814106a 100644 --- a/locale/Messages.ru.resx +++ b/locale/Messages.ru.resx @@ -117,13 +117,13 @@ {0}, добро пожаловать на сервер {1} - + Виимо! - + Вууми! - + Нгьес! diff --git a/locale/Messages.tt-ru.resx b/locale/Messages.tt-ru.resx index df50d8d..71357ad 100644 --- a/locale/Messages.tt-ru.resx +++ b/locale/Messages.tt-ru.resx @@ -117,13 +117,13 @@ {0}, добро пожаловать на сервер {1} - + вииимо! - + вуууми! - + нгьес! diff --git a/src/Messages.Designer.cs b/src/Messages.Designer.cs index 5ad741e..4694254 100644 --- a/src/Messages.Designer.cs +++ b/src/Messages.Designer.cs @@ -66,21 +66,21 @@ namespace Octobot { } } - internal static string Sound1 { + internal static string Loaded1 { get { - return ResourceManager.GetString("Sound1", resourceCulture); + return ResourceManager.GetString("Loaded1", resourceCulture); } } - internal static string Sound2 { + internal static string Loaded2 { get { - return ResourceManager.GetString("Sound2", resourceCulture); + return ResourceManager.GetString("Loaded2", resourceCulture); } } - internal static string Sound3 { + internal static string Loaded3 { get { - return ResourceManager.GetString("Sound3", resourceCulture); + return ResourceManager.GetString("Loaded3", resourceCulture); } } diff --git a/src/Responders/GuildLoadedResponder.cs b/src/Responders/GuildLoadedResponder.cs index a1e7d16..fd289fc 100644 --- a/src/Responders/GuildLoadedResponder.cs +++ b/src/Responders/GuildLoadedResponder.cs @@ -88,7 +88,7 @@ public class GuildLoadedResponder : IResponder var i = Random.Shared.Next(1, 4); var embed = new EmbedBuilder().WithSmallTitle(bot.GetTag(), bot) - .WithTitle($"Sound{i}".Localized()) + .WithTitle($"Loaded{i}".Localized()) .WithDescription(Messages.Ready) .WithCurrentTimestamp() .WithColour(ColorsList.Blue)