mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add support of language files (#1273)
* Basic support of language file Only mapped main part of MCC. * Translations function imporve * Change translation file naming * Fix default translation file naming * Complete translation file mapping for main part Command and ChatBot not done yet * Complete translation mapping for commands Except Entitycmd * Complete translation mapping for ChatBots * Add new method for replacing translation key Just for Entitycmd. Be proud of yourself. We have a convenient method now. * Complete all translation mapping * Add default config and translation file to resource * Remove untranslatable messages from default translation file
This commit is contained in:
parent
0c88c18ea0
commit
2017d5d652
54 changed files with 1658 additions and 660 deletions
|
|
@ -7,8 +7,9 @@ namespace MinecraftClient.Commands
|
|||
{
|
||||
public class Set : Command
|
||||
{
|
||||
public override string CMDName { get { return "set"; } }
|
||||
public override string CMDDesc { get { return "set varname=value: set a custom %variable%."; } }
|
||||
public override string CmdName { get { return "set"; } }
|
||||
public override string CmdUsage { get { return "set varname=value"; } }
|
||||
public override string CmdDesc { get { return "cmd.set.desc"; } }
|
||||
|
||||
public override string Run(McClient handler, string command, Dictionary<string, object> localVars)
|
||||
{
|
||||
|
|
@ -21,11 +22,11 @@ namespace MinecraftClient.Commands
|
|||
{
|
||||
return ""; //Success
|
||||
}
|
||||
else return "variable name must be A-Za-z0-9.";
|
||||
else return Translations.Get("cmd.set.format");
|
||||
}
|
||||
else return CMDDesc;
|
||||
else return GetCmdDescTranslated();
|
||||
}
|
||||
else return CMDDesc;
|
||||
else return GetCmdDescTranslated();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue