- Added NadekoBot.Generators projects which will contain source generators

- Implemented initial version of the response strings source generator
  - Creates a class with property names equivalent to key names in responses.en-US.json
  - Each Property has struct type (with generic type parameters matching the number of string format placeholders) for type safe GetText implementation
  - Struct types are readonly refs as they should be ephermal, and only used to pass string keys to GetText
This commit is contained in:
Kwoth
2021-07-23 19:01:26 +02:00
parent e67f659a8a
commit 34d0f66466
10 changed files with 211 additions and 13 deletions

View File

@@ -249,7 +249,7 @@ namespace NadekoBot.Modules.Utility
.WithAuthor($"NadekoBot v{StatsService.BotVersion}",
"https://nadeko-pictures.nyc3.digitaloceanspaces.com/other/avatar.png",
"https://nadekobot.readthedocs.io/en/latest/")
.AddField(GetText("author"), _stats.Author, true)
.AddField(GetText(Strs.author), _stats.Author, true)
.AddField(GetText("botid"), _client.CurrentUser.Id.ToString(), true)
.AddField(GetText("shard"), $"#{_client.ShardId} / {_creds.TotalShards}", true)
.AddField(GetText("commands_ran"), _stats.CommandsRan.ToString(), true)