Localize /mmoedit, /mmoupdate, and /mcpurge

This commit is contained in:
GJ 2013-01-16 23:31:28 -05:00
parent 89da8b832f
commit ea7fee2a53
6 changed files with 31 additions and 11 deletions

View File

@ -1,6 +1,5 @@
package com.gmail.nossr50.commands.general;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@ -22,7 +21,7 @@ public class MmoeditCommand implements CommandExecutor {
int newValue;
SkillType skill;
String skillName;
String usage = ChatColor.RED + "Proper usage is /mmoedit [player] <skill> <level>"; //TODO: Needs more locale.
String usage = LocaleLoader.getString("Commands.Usage.3", new Object[] {"mmoedit", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.Level") + ">" });
if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mmoedit")) {
return true;
@ -50,7 +49,7 @@ public class MmoeditCommand implements CommandExecutor {
}
profile.modifySkill(skill, newValue);
sender.sendMessage(ChatColor.GREEN + "Your level in " + skillName + " was set to " + newValue + "!"); //TODO: Needs more locale.
sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", new Object[] {skillName, newValue}));
}
else {
sender.sendMessage(usage);
@ -94,8 +93,8 @@ public class MmoeditCommand implements CommandExecutor {
}
profile.modifySkill(skill, newValue);
mcmmoPlayer.getPlayer().sendMessage(ChatColor.GREEN + "Your level in " + skillName + " was set to " + newValue + "!"); //TODO: Needs more locale.
sender.sendMessage(ChatColor.RED + skillName + " has been modified for " + args[0] + "."); //TODO: Use locale
mcmmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", new Object[] {skillName, newValue}));
sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.2", new Object[] {skillName, args[0]}));
}
else {
profile = new PlayerProfile(args[0], false); //Temporary Profile

View File

@ -1,6 +1,5 @@
package com.gmail.nossr50.commands.general;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@ -9,6 +8,7 @@ import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.commands.CommandHelper;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.runnables.SQLConversionTask;
import com.gmail.nossr50.util.Users;
@ -25,7 +25,7 @@ public class MmoupdateCommand implements CommandExecutor {
return true;
}
sender.sendMessage(ChatColor.GRAY + "Starting conversion..."); //TODO: Needs more locale.
sender.sendMessage(LocaleLoader.getString("Commands.mmoupdate.Start"));
Users.clearAll();
convertToMySQL();
@ -33,7 +33,7 @@ public class MmoupdateCommand implements CommandExecutor {
Users.addUser(x);
}
sender.sendMessage(ChatColor.GREEN + "Conversion finished!"); //TODO: Needs more locale.
sender.sendMessage(LocaleLoader.getString("Commands.mmoupdate.Finish"));
return true;
}

View File

@ -1,12 +1,13 @@
package com.gmail.nossr50.commands.mc;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.commands.CommandHelper;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Database;
public class McpurgeCommand implements CommandExecutor{
@ -29,7 +30,7 @@ public class McpurgeCommand implements CommandExecutor{
//TODO: Make this work for Flatfile data.
}
sender.sendMessage(ChatColor.GREEN + "The database was successfully purged!"); //TODO: Locale)
sender.sendMessage(LocaleLoader.getString("Commands.mcpurge.Success"));
return true;
}
}

View File

@ -340,6 +340,7 @@ Commands.AdminChat.Off=Admin Sgwrs unig [[RED]] Oddi ar
Commands.AdminChat.On=Admin Chat only [[GREEN]]On
Commands.AdminChat.Prefix=[[AQUA]]{[[WHITE]]{0}[[AQUA]]}
Commands.AdminToggle=[[RED]] - sgwrs gweinyddol Toggle
Commands.Chat.Console=*Console*
Commands.Disabled=[[RED]] Mae\'r gorchymyn yn anabl.
Commands.DoesNotExist=[[RED]] nid Chwaraewr yn bodoli yn y gronfa ddata!
Commands.GodMode.Disabled=[[YELLOW]]mcMMO Godmode Disabled
@ -357,6 +358,8 @@ Commands.mcrank.Player=[[RED]]TARGET: [[WHITE]]{0}
Commands.mcrank.Skill=[[YELLOW]]{0}[[GREEN]] - [[GOLD]]Rank [[WHITE]]#[[GREEN]]{1}
Commands.mcrank.Unranked=[[WHITE]]Unranked
Commands.mmoedit=[chwaraewr] <skill> <newvalue> [[RED]] - Targed addasu
Commands.mmoupdate.Start=[[GRAY]]Starting conversion...
Commands.mmoupdate.Finish=[[GREEN]]Conversion finished!
Commands.ModDescription=[[RED]]- Read brief mod description
Commands.NoConsole=This command does not support console usage.
Commands.Other=[[GREEN]]--OTHER COMMANDS--
@ -387,6 +390,9 @@ Commands.Stats.Self=YOUR STATS
Commands.Stats=[[RED]]- View your mcMMO stats
Commands.ToggleAbility=[[RED]]- Toggle ability activation with right click
Commands.Usage.1=[[RED]]Proper usage is /{0} {1}
Commands.Usage.2=[[RED]]Proper usage is /{0} {1} {2}
Commands.Usage.Message=message
Commands.Usage.PartyName=party-name
Commands.Usage.Player=player
mcMMO.NoInvites=[[RED]]You have no invites at this time
mcMMO.NoPermission=[[DARK_RED]]Insufficient permissions.

View File

@ -383,6 +383,7 @@ Commands.AdminChat.Off=Admin Chat only [[RED]]deaktiviert
Commands.AdminChat.On=Admin Chat only [[GREEN]]aktiviert
Commands.AdminChat.Prefix=[[AQUA]]{[[WHITE]]{0}[[AQUA]]}
Commands.AdminToggle=[[RED]]- Admin Chat umschalten
Commands.Chat.Console=*Console*
Commands.Disabled=[[RED]]Dieser Command ist deaktiviert.
Commands.DoesNotExist= [[RED]]Spieler in Datenbank nicht gefunden!
Commands.GodMode.Disabled=[[YELLOW]]mcMMO Godmode deaktivivert
@ -400,6 +401,8 @@ Commands.mcrank.Player=[[RED]]TARGET: [[WHITE]]{0}
Commands.mcrank.Skill=[[YELLOW]]{0}[[GREEN]] - [[GOLD]]Rank [[WHITE]]#[[GREEN]]{1}
Commands.mcrank.Unranked=[[WHITE]]Unranked
Commands.mmoedit=[Spieler] <skill> <newvalue> [[RED]] - Ziel modifizieren
Commands.mmoupdate.Start=[[GRAY]]Starting conversion...
Commands.mmoupdate.Finish=[[GREEN]]Conversion finished!
Commands.ModDescription=[[RED]]- Mod-Informationen Lesen.
Commands.NoConsole=Dieser Command wird nicht per Console unterst\u00FCtzt.
Commands.Other=[[GREEN]]--ANDERE COMMANDS--
@ -433,6 +436,9 @@ Commands.Stats.Self=DEINE WERTE
Commands.Stats=[[RED]]- Zeigt deine mcMMO Werte
Commands.ToggleAbility=[[RED]]- F\u00E4higkeiten-Aktivierung per Rechtsklick umschalten
Commands.Usage.1=[[RED]]Proper usage is /{0} {1}
Commands.Usage.2=[[RED]]Proper usage is /{0} {1} {2}
Commands.Usage.Message=message
Commands.Usage.PartyName=party-name
Commands.Usage.Player=player
mcMMO.NoInvites=[[RED]]Du hast derzeit keine Einladungen
mcMMO.NoPermission=[[DARK_RED]]Unzureichende Rechte.

View File

@ -404,12 +404,17 @@ Commands.Invite.Success=[[GREEN]]Invite sent successfully.
Commands.Leaderboards=<skill> <page> [[RED]]- Leaderboards
Commands.mcgod=[[RED]]- Toggle GodMode
Commands.mchud.Invalid=[[RED]]That is not a valid HUD type.
Commands.mcpurge.Success=[[GREEN]]The database was successfully purged!
Commands.mcrank.Heading=[[GOLD]]-=PERSONAL RANKINGS=-
Commands.mcrank.Overall=[[YELLOW]]Overall[[GREEN]] - [[GOLD]]Rank [[WHITE]]#[[GREEN]]{0}
Commands.mcrank.Player=[[RED]]TARGET: [[WHITE]]{0}
Commands.mcrank.Skill=[[YELLOW]]{0}[[GREEN]] - [[GOLD]]Rank [[WHITE]]#[[GREEN]]{1}
Commands.mcrank.Unranked=[[WHITE]]Unranked
Commands.mmoedit=[player] <skill> <newvalue> [[RED]] - Modify target
Commands.mmoedit.Modified.1=[[GREEN]]Your level in {0} was set to {1}!
Commands.mmoedit.Modified.2=[[RED]]{0} has been modified for {1}.
Commands.mmoupdate.Start=[[GRAY]]Starting conversion...
Commands.mmoupdate.Finish=[[GREEN]]Conversion finished!
Commands.ModDescription=[[RED]]- Read brief mod description
Commands.NoConsole=This command does not support console usage.
Commands.Other=[[GREEN]]--OTHER COMMANDS--
@ -419,7 +424,7 @@ Commands.Party.Chat.On=Party Chat only [[GREEN]]On
Commands.Party.Chat.Prefix=[[GREEN]]([[WHITE]]{0}[[GREEN]])
Commands.Party.Commands=[[GREEN]]--PARTY COMMANDS--
Commands.Party.Invite.0=[[RED]]ALERT: [[GREEN]]You have received a party invite for {0} from {1}
Commands.Party.Invite.1=[[YELLOW]]Type [[GREEN]]/accept[[YELLOW]] to accept the invite
Commands.Party.Invite.1=[[YELLOW]]Type [[GREEN]]/accept[[YELLOW]] to accept the invite
Commands.Party.Invite=<player> [[RED]]- Send party invite
Commands.Party.Join=Joined Party: {0}
Commands.Party.Kick=[[RED]]You were kicked from party {0}!
@ -444,9 +449,12 @@ Commands.Stats=[[RED]]- View your mcMMO stats
Commands.ToggleAbility=[[RED]]- Toggle ability activation with right click
Commands.Usage.1=[[RED]]Proper usage is /{0} {1}
Commands.Usage.2=[[RED]]Proper usage is /{0} {1} {2}
Commands.Usage.3=[[RED]]Proper usage is /{0} {1} {2} {3}
Commands.Usage.Level=level
Commands.Usage.Message=message
Commands.Usage.PartyName=party-name
Commands.Usage.Player=player
Commands.Usage.Skill=skill
mcMMO.NoInvites=[[RED]]You have no invites at this time
mcMMO.NoPermission=[[DARK_RED]]Insufficient permissions.
mcMMO.NoSkillNote=[[DARK_GRAY]]If you don't have access to a skill it will not be shown here.