Crowdin localization support (#2310)

* Switching to use resource files

* Update Crowdin configuration file

* Code cleanup
This commit is contained in:
BruceChen 2022-10-28 11:13:20 +08:00 committed by GitHub
parent a27491c1b6
commit 077e3a5e9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
193 changed files with 102089 additions and 3564 deletions

View file

@ -6,8 +6,8 @@ namespace MinecraftClient.Commands
class SetRnd : Command
{
public override string CmdName { get { return "setrnd"; } }
public override string CmdUsage { get { return Translations.Get("cmd.setrnd.format"); } }
public override string CmdDesc { get { return "cmd.setrnd.desc"; } }
public override string CmdUsage { get { return Translations.cmd_setrnd_format; } }
public override string CmdDesc { get { return Translations.cmd_setrnd_desc; } }
private static readonly Random rand = new();
public override string Run(McClient handler, string command, Dictionary<string, object>? localVars)
@ -32,7 +32,7 @@ namespace MinecraftClient.Commands
}
catch (Exception)
{
return Translations.Get("cmd.setrndnum.format");
return Translations.cmd_setrndnum_format;
}
// switch the values if they were entered in the wrong way
@ -44,7 +44,7 @@ namespace MinecraftClient.Commands
{
return string.Format("Set %{0}% to {1}.", args[0], Settings.Config.AppVar.GetVar(args[0])); //Success
}
else return Translations.Get("cmd.setrndnum.format");
else return Translations.cmd_setrndnum_format;
}
else
{
@ -59,7 +59,7 @@ namespace MinecraftClient.Commands
{
return string.Format("Set %{0}% to {1}.", args[0], Settings.Config.AppVar.GetVar(args[0])); //Success
}
else return Translations.Get("cmd.setrndstr.format");
else return Translations.cmd_setrndstr_format;
}
}
else return GetCmdDescTranslated();