mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Crowdin localization support (#2310)
* Switching to use resource files * Update Crowdin configuration file * Code cleanup
This commit is contained in:
parent
a27491c1b6
commit
077e3a5e9f
193 changed files with 102089 additions and 3564 deletions
|
|
@ -8,7 +8,7 @@ namespace MinecraftClient.Commands
|
|||
{
|
||||
public override string CmdName { get { return "bots"; } }
|
||||
public override string CmdUsage { get { return "bots [list|unload <bot name|all>]"; } }
|
||||
public override string CmdDesc { get { return "cmd.bots.desc"; } }
|
||||
public override string CmdDesc { get { return Translations.cmd_bots_desc; } }
|
||||
|
||||
public override string Run(McClient handler, string command, Dictionary<string, object>? localVars)
|
||||
{
|
||||
|
|
@ -25,7 +25,7 @@ namespace MinecraftClient.Commands
|
|||
int length = handler.GetLoadedChatBots().Count;
|
||||
|
||||
if (length == 0)
|
||||
return Translations.TryGet("cmd.bots.noloaded");
|
||||
return Translations.cmd_bots_noloaded;
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
|
|
@ -36,7 +36,7 @@ namespace MinecraftClient.Commands
|
|||
|
||||
}
|
||||
|
||||
return Translations.Get("cmd.bots.list") + ": " + sb.ToString();
|
||||
return Translations.cmd_bots_list + ": " + sb.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -49,20 +49,20 @@ namespace MinecraftClient.Commands
|
|||
if (botName.ToLower().Equals("all", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (handler.GetLoadedChatBots().Count == 0)
|
||||
return Translations.TryGet("cmd.bots.noloaded");
|
||||
return Translations.cmd_bots_noloaded;
|
||||
|
||||
handler.UnloadAllBots();
|
||||
return Translations.TryGet("cmd.bots.unloaded_all");
|
||||
return Translations.cmd_bots_unloaded_all;
|
||||
}
|
||||
else
|
||||
{
|
||||
ChatBot? bot = handler.GetLoadedChatBots().Find(bot => bot.GetType().Name.ToLower() == botName.ToLower());
|
||||
|
||||
if (bot == null)
|
||||
return Translations.TryGet("cmd.bots.notfound", botName);
|
||||
return string.Format(Translations.cmd_bots_notfound, botName);
|
||||
|
||||
handler.BotUnLoad(bot);
|
||||
return Translations.TryGet("cmd.bots.unloaded", botName);
|
||||
return string.Format(Translations.cmd_bots_unloaded, botName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue