Skip to content

Commit

Permalink
Rename locale Sound to Loaded for clarity (#270)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mctaylors authored Mar 18, 2024
1 parent 1894b06 commit 771750c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions locale/Messages.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@
<data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, welcome to {1}</value>
</data>
<data name="Sound1" xml:space="preserve">
<data name="Loaded1" xml:space="preserve">
<value>Veemo!</value>
</data>
<data name="Sound2" xml:space="preserve">
<data name="Loaded2" xml:space="preserve">
<value>Woomy!</value>
</data>
<data name="Sound3" xml:space="preserve">
<data name="Loaded3" xml:space="preserve">
<value>Ngyes!</value>
</data>
<data name="YouWereBanned" xml:space="preserve">
Expand Down
6 changes: 3 additions & 3 deletions locale/Messages.ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@
<data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, добро пожаловать на сервер {1}</value>
</data>
<data name="Sound1" xml:space="preserve">
<data name="Loaded1" xml:space="preserve">
<value>Виимо!</value>
</data>
<data name="Sound2" xml:space="preserve">
<data name="Loaded2" xml:space="preserve">
<value>Вууми!</value>
</data>
<data name="Sound3" xml:space="preserve">
<data name="Loaded3" xml:space="preserve">
<value>Нгьес!</value>
</data>
<data name="PunishmentExpired" xml:space="preserve">
Expand Down
6 changes: 3 additions & 3 deletions locale/Messages.tt-ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@
<data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, добро пожаловать на сервер {1}</value>
</data>
<data name="Sound1" xml:space="preserve">
<data name="Loaded1" xml:space="preserve">
<value>вииимо!</value>
</data>
<data name="Sound2" xml:space="preserve">
<data name="Loaded2" xml:space="preserve">
<value>вуууми!</value>
</data>
<data name="Sound3" xml:space="preserve">
<data name="Loaded3" xml:space="preserve">
<value>нгьес!</value>
</data>
<data name="YouWereBanned" xml:space="preserve">
Expand Down
12 changes: 6 additions & 6 deletions src/Messages.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Responders/GuildLoadedResponder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public async Task<Result> RespondAsync(IGuildCreate gatewayEvent, CancellationTo
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)
Expand Down

0 comments on commit 771750c

Please sign in to comment.