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 <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-03-18 21:27:35 +03:00 committed by GitHub
parent 1894b063ae
commit 771750c922
Signed by: GitHub
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 16 deletions

View file

@ -117,13 +117,13 @@
<data name="DefaultWelcomeMessage" xml:space="preserve"> <data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, welcome to {1}</value> <value>{0}, welcome to {1}</value>
</data> </data>
<data name="Sound1" xml:space="preserve"> <data name="Loaded1" xml:space="preserve">
<value>Veemo!</value> <value>Veemo!</value>
</data> </data>
<data name="Sound2" xml:space="preserve"> <data name="Loaded2" xml:space="preserve">
<value>Woomy!</value> <value>Woomy!</value>
</data> </data>
<data name="Sound3" xml:space="preserve"> <data name="Loaded3" xml:space="preserve">
<value>Ngyes!</value> <value>Ngyes!</value>
</data> </data>
<data name="YouWereBanned" xml:space="preserve"> <data name="YouWereBanned" xml:space="preserve">

View file

@ -117,13 +117,13 @@
<data name="DefaultWelcomeMessage" xml:space="preserve"> <data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, добро пожаловать на сервер {1}</value> <value>{0}, добро пожаловать на сервер {1}</value>
</data> </data>
<data name="Sound1" xml:space="preserve"> <data name="Loaded1" xml:space="preserve">
<value>Виимо!</value> <value>Виимо!</value>
</data> </data>
<data name="Sound2" xml:space="preserve"> <data name="Loaded2" xml:space="preserve">
<value>Вууми!</value> <value>Вууми!</value>
</data> </data>
<data name="Sound3" xml:space="preserve"> <data name="Loaded3" xml:space="preserve">
<value>Нгьес!</value> <value>Нгьес!</value>
</data> </data>
<data name="PunishmentExpired" xml:space="preserve"> <data name="PunishmentExpired" xml:space="preserve">

View file

@ -117,13 +117,13 @@
<data name="DefaultWelcomeMessage" xml:space="preserve"> <data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, добро пожаловать на сервер {1}</value> <value>{0}, добро пожаловать на сервер {1}</value>
</data> </data>
<data name="Sound1" xml:space="preserve"> <data name="Loaded1" xml:space="preserve">
<value>вииимо!</value> <value>вииимо!</value>
</data> </data>
<data name="Sound2" xml:space="preserve"> <data name="Loaded2" xml:space="preserve">
<value>вуууми!</value> <value>вуууми!</value>
</data> </data>
<data name="Sound3" xml:space="preserve"> <data name="Loaded3" xml:space="preserve">
<value>нгьес!</value> <value>нгьес!</value>
</data> </data>
<data name="YouWereBanned" xml:space="preserve"> <data name="YouWereBanned" xml:space="preserve">

View file

@ -66,21 +66,21 @@ namespace Octobot {
} }
} }
internal static string Sound1 { internal static string Loaded1 {
get { get {
return ResourceManager.GetString("Sound1", resourceCulture); return ResourceManager.GetString("Loaded1", resourceCulture);
} }
} }
internal static string Sound2 { internal static string Loaded2 {
get { get {
return ResourceManager.GetString("Sound2", resourceCulture); return ResourceManager.GetString("Loaded2", resourceCulture);
} }
} }
internal static string Sound3 { internal static string Loaded3 {
get { get {
return ResourceManager.GetString("Sound3", resourceCulture); return ResourceManager.GetString("Loaded3", resourceCulture);
} }
} }

View file

@ -88,7 +88,7 @@ public class GuildLoadedResponder : IResponder<IGuildCreate>
var i = Random.Shared.Next(1, 4); var i = Random.Shared.Next(1, 4);
var embed = new EmbedBuilder().WithSmallTitle(bot.GetTag(), bot) var embed = new EmbedBuilder().WithSmallTitle(bot.GetTag(), bot)
.WithTitle($"Sound{i}".Localized()) .WithTitle($"Loaded{i}".Localized())
.WithDescription(Messages.Ready) .WithDescription(Messages.Ready)
.WithCurrentTimestamp() .WithCurrentTimestamp()
.WithColour(ColorsList.Blue) .WithColour(ColorsList.Blue)