summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-10 21:52:07 +0000
committerementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-10 21:52:07 +0000
commit07e49c3fbb533438769336e3f8dc9753055e4d38 (patch)
tree4c1b4ef4cf4ca2644559a8f376ad160824830f33
parent04044282ad939e389433b997f244384e8aa85d2b (diff)
downloadEssentials-07e49c3fbb533438769336e3f8dc9753055e4d38.tar
Essentials-07e49c3fbb533438769336e3f8dc9753055e4d38.tar.gz
Essentials-07e49c3fbb533438769336e3f8dc9753055e4d38.tar.lz
Essentials-07e49c3fbb533438769336e3f8dc9753055e4d38.tar.xz
Essentials-07e49c3fbb533438769336e3f8dc9753055e4d38.zip
[trunk] translations - halfway there
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1416 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandessentials.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgc.java9
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgod.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandheal.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhelp.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandinfo.java12
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java9
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commanditem.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandjump.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkick.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkickall.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkill.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkit.java16
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandlightning.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandlist.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmail.java15
-rw-r--r--Essentials/src/messages.properties47
19 files changed, 113 insertions, 52 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
index 9f5a5f6b6..1fd974691 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
@@ -31,7 +31,7 @@ public class Commandclearinventory extends EssentialsCommand
for (Player p : online)
{
p.getInventory().clear();
- user.sendMessage("§7Inventory of §c" + p.getDisplayName() + "§7 cleared.");
+ user.sendMessage(Util.format("inventoryClearedOthers", p.getDisplayName()));
}
return;
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
index 23b42f1be..84daceba0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
+import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -16,6 +17,6 @@ public class Commandessentials extends EssentialsCommand
{
ess.reload();
charge(sender);
- sender.sendMessage("§7Essentials Reloaded " + ess.getDescription().getVersion());
+ sender.sendMessage(Util.format("essentialsReload", ess.getDescription().getVersion()));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgc.java b/Essentials/src/com/earth2me/essentials/commands/Commandgc.java
index 6b16cf29b..9ee92d033 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandgc.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgc.java
@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
+import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
@@ -16,14 +17,14 @@ public class Commandgc extends EssentialsCommand
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
charge(sender);
- sender.sendMessage("Maximum memory: " + (Runtime.getRuntime().maxMemory() / 1024 / 1024) + " MB");
- sender.sendMessage("Free memory: " + (Runtime.getRuntime().freeMemory() / 1024 / 1024) + " MB");
+ sender.sendMessage(Util.format("gcmax", (Runtime.getRuntime().maxMemory() / 1024 / 1024)));
+ sender.sendMessage(Util.format("gcmin", (Runtime.getRuntime().freeMemory() / 1024 / 1024)));
for (World w : server.getWorlds())
{
sender.sendMessage(
(w.getEnvironment() == World.Environment.NETHER ? "Nether" : "World") + " \"" + w.getName() + "\": "
- + w.getLoadedChunks().length + " chunks, "
- + w.getEntities().size() + " entities");
+ + w.getLoadedChunks().length + Util.i18n("gcchunks")
+ + w.getEntities().size() + Util.i18n("entities"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgod.java b/Essentials/src/com/earth2me/essentials/commands/Commandgod.java
index a46425d45..3a62f3671 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandgod.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgod.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -34,7 +35,7 @@ public class Commandgod extends EssentialsCommand
return;
}
- user.sendMessage("§7God mode " + (user.toggleGodModeEnabled() ? "enabled." : "disabled."));
+ user.sendMessage(Util.format("godMode", (user.toggleGodModeEnabled()? Util.i18n("godEnabled") : Util.i18n("godDisabled"))));
}
private void godOtherPlayers(Server server, CommandSender sender, String name)
@@ -43,8 +44,8 @@ public class Commandgod extends EssentialsCommand
{
User u = ess.getUser(p);
boolean enabled = u.toggleGodModeEnabled();
- u.sendMessage("§7God mode " + (enabled ? "enabled." : "disabled."));
- sender.sendMessage("§7God mode " + (enabled ? "enabled for " : "disabled for ") + p.getDisplayName() + ".");
+ u.sendMessage(Util.format("godMode", (enabled ? Util.i18n("godEnabled") : Util.i18n("godDisabled"))));
+ sender.sendMessage(Util.format("godMode",Util.format(enabled ? Util.i18n("godEnabledFor"): Util.i18n("godDisabledFor"), p.getDisplayName())));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
index e6b37903c..a68a357d7 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
@@ -4,6 +4,7 @@ import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import java.util.List;
@@ -35,7 +36,7 @@ public class Commandheal extends EssentialsCommand
}
charge(user);
user.setHealth(20);
- user.sendMessage("§7You have been healed.");
+ user.sendMessage(Util.i18n("heal"));
}
@Override
@@ -54,13 +55,13 @@ public class Commandheal extends EssentialsCommand
List<Player> players = server.matchPlayer(name);
if(players.isEmpty())
{
- sender.sendMessage("§cPlayer matching " + name + " not found");
+ sender.sendMessage(Util.i18n("playerNotFound"));
return;
}
for (Player p : players)
{
p.setHealth(20);
- sender.sendMessage("§7Healed " + p.getDisplayName() + ".");
+ sender.sendMessage(Util.format("healOther", p.getDisplayName()));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java b/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
index c992eda19..dcc8a15ec 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
@@ -42,7 +42,7 @@ public class Commandhelp extends EssentialsCommand
int start = (page - 1) * 9;
int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
- user.sendMessage("Page §c" + page + "§f of §c" + pages + "§f:");
+ user.sendMessage(Util.format("helpPages", page, pages));
for (int i = start; i < lines.size() && i < start + 9; i++)
{
user.sendMessage(lines.get(i));
@@ -52,7 +52,7 @@ public class Commandhelp extends EssentialsCommand
@Override
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
- sender.sendMessage("To view help from the console, type \"?\".");
+ sender.sendMessage(Util.i18n("helpConsole"));
}
@SuppressWarnings("CallToThreadDumpStack")
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java b/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java
index 61afe152c..51d6c0a6a 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java
@@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
public class Commandhelpop extends EssentialsCommand
@@ -28,7 +29,7 @@ public class Commandhelpop extends EssentialsCommand
{
continue;
}
- u.sendMessage("§c[HelpOp]§f §7" + user.getDisplayName() + ":§f " + getFinalArg(args, 0));
+ u.sendMessage(Util.format("helpOp", user.getDisplayName(), getFinalArg(args, 0)));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java b/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java
index 31749b2d6..e1563c4e6 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java
@@ -59,7 +59,7 @@ public class Commandinfo extends EssentialsCommand
}
else
{
- sender.sendMessage("File info.txt does not exists.");
+ sender.sendMessage(Util.i18n("infoFileDoesNotExist"));
return;
}
@@ -79,7 +79,7 @@ public class Commandinfo extends EssentialsCommand
int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
charge(sender);
- sender.sendMessage("Page §c" + page + "§f of §c" + pages + "§f:");
+ sender.sendMessage(Util.format("infoPages", page, pages ));
for (int i = start; i < lines.size() && i < start + 9; i++)
{
sender.sendMessage(lines.get(i));
@@ -91,7 +91,7 @@ public class Commandinfo extends EssentialsCommand
{
if (lines.get(0).startsWith("#"))
{
- sender.sendMessage("Select chapter:");
+ sender.sendMessage(Util.i18n("infoChapter"));
StringBuilder sb = new StringBuilder();
boolean first = true;
for (String string : chapters)
@@ -131,7 +131,7 @@ public class Commandinfo extends EssentialsCommand
int pages = end / 9 + (end % 9 > 0 ? 1 : 0);
charge(sender);
- sender.sendMessage("Page §c" + page + "§f of §c" + pages + "§f:");
+ sender.sendMessage(Util.format("infoPages", page, pages ));
for (int i = start; i < end && i < start + 9; i++)
{
sender.sendMessage(lines.get(i));
@@ -155,7 +155,7 @@ public class Commandinfo extends EssentialsCommand
if (!bookmarks.containsKey(pageStr.toLowerCase()))
{
- sender.sendMessage("Unknown chapter.");
+ sender.sendMessage(Util.i18n("infoUnknownChapter"));
return;
}
int chapterstart = bookmarks.get(pageStr.toLowerCase()) + 1;
@@ -173,7 +173,7 @@ public class Commandinfo extends EssentialsCommand
int pages = (chapterend - chapterstart) / 9 + ((chapterend - chapterstart) % 9 > 0 ? 1 : 0);
charge(sender);
- sender.sendMessage("Chapter " + pageStr + ", page §c" + page + "§f of §c" + pages + "§f:");
+ sender.sendMessage(Util.format("infoChapterPages", pageStr, page , pages));
for (int i = start; i < chapterend && i < start + 9; i++)
{
sender.sendMessage(lines.get(i));
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java
index c9569feff..e5877fe40 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import java.util.Arrays;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
@@ -30,7 +31,7 @@ public class Commandinvsee extends EssentialsCommand
{
invUser.getInventory().setContents(user.getSavedInventory());
user.setSavedInventory(null);
- user.sendMessage("Your inventory has been restored.");
+ user.sendMessage(Util.i18n("invRestored"));
return;
}
@@ -45,10 +46,10 @@ public class Commandinvsee extends EssentialsCommand
invUserStack = Arrays.copyOf(invUserStack, userStackLength);
}
if (invUserStack.length > userStackLength) {
- throw new Exception("The other users inventory is bigger than yours.");
+ throw new Exception(Util.i18n("invBigger"));
}
user.getInventory().setContents(invUserStack);
- user.sendMessage("You see the inventory of " + invUser.getDisplayName() + ".");
- user.sendMessage("Use /invsee to restore your inventory.");
+ user.sendMessage(Util.format("invSee", invUser.getDisplayName()));
+ user.sendMessage(Util.i18n("invSeeHelp"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanditem.java b/Essentials/src/com/earth2me/essentials/commands/Commanditem.java
index 87776368d..0bcf25ac3 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commanditem.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commanditem.java
@@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
import org.bukkit.Server;
import com.earth2me.essentials.ItemDb;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
@@ -32,7 +33,7 @@ public class Commanditem extends EssentialsCommand
: (!user.isAuthorized("essentials.itemspawn.exempt")
&& !user.canSpawnItem(stack.getTypeId())))
{
- user.sendMessage(ChatColor.RED + "You are not allowed to spawn the item " + itemname);
+ user.sendMessage(Util.format("cantSpawnItem", itemname));
return;
}
@@ -43,13 +44,13 @@ public class Commanditem extends EssentialsCommand
if (stack.getType() == Material.AIR)
{
- user.sendMessage(ChatColor.RED + "You can't get air.");
+ user.sendMessage(Util.format("cantSpawnItem", "Air"));
return;
}
String itemName = stack.getType().name().toLowerCase().replace('_', ' ');
charge(user);
- user.sendMessage("§7Giving " + stack.getAmount() + " of " + itemName + " to " + user.getDisplayName() + ".");
+ user.sendMessage(Util.format("itemSpawn", stack.getAmount(), itemName));
user.getInventory().addItem(stack);
user.updateInventory();
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
index 65a1085e1..cd1953ece 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
@@ -4,6 +4,7 @@ import org.bukkit.Location;
import org.bukkit.Server;
import com.earth2me.essentials.TargetBlock;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
public class Commandjump extends EssentialsCommand
@@ -31,7 +32,7 @@ public class Commandjump extends EssentialsCommand
}
catch (NullPointerException ex)
{
- throw new Exception("That would hurt your computer's brain.", ex);
+ throw new Exception(Util.i18n("jumpError"), ex);
}
user.canAfford(this);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkick.java b/Essentials/src/com/earth2me/essentials/commands/Commandkick.java
index d9dbac29f..ba9c2153a 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkick.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkick.java
@@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import org.bukkit.ChatColor;
@@ -28,11 +29,11 @@ public class Commandkick extends EssentialsCommand
}
catch (Throwable ex)
{
- sender.sendMessage(ChatColor.RED + "That player does not exist!");
+ sender.sendMessage(Util.i18n("playerNotFound"));
return;
}
charge(sender);
- u.kickPlayer(args.length > 1 ? getFinalArg(args, 1) : "Kicked from server");
+ u.kickPlayer(args.length > 1 ? getFinalArg(args, 1) : Util.i18n("kickDefault"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java b/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java
index 8f0a985e9..e78c77e44 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java
@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
+import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -25,7 +26,7 @@ public class Commandkickall extends EssentialsCommand
}
else
{
- p.kickPlayer(args.length < 1 ? getFinalArg(args, 0) : "Kicked from server");
+ p.kickPlayer(args.length < 1 ? getFinalArg(args, 0) : Util.i18n("kickDefault"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java
index 7aa947829..c849463b7 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java
@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
+import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -24,7 +25,7 @@ public class Commandkill extends EssentialsCommand
for (Player p : server.matchPlayer(args[0]))
{
p.setHealth(0);
- sender.sendMessage("§cKilled " + p.getDisplayName() + ".");
+ sender.sendMessage(Util.format("kill", p.getDisplayName()));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
index e50aaf4fe..4b71374ff 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
@@ -44,12 +44,12 @@ public class Commandkit extends EssentialsCommand
}
else
{
- user.sendMessage("§7There are no kits available yet");
+ user.sendMessage(Util.i18n("noKits"));
}
}
catch (Exception ex)
{
- user.sendMessage("§cThere are no valid kits.");
+ user.sendMessage(Util.i18n("kitError"));
}
}
else
@@ -62,7 +62,7 @@ public class Commandkit extends EssentialsCommand
if (!user.isAuthorized("essentials.kit." + kitName))
{
- user.sendMessage("§cYou need the §fessentials.kit." + kitName + "§c permission to use that kit.");
+ user.sendMessage(Util.format("noKitPermission", "essentials.kit." + kitName));
return;
}
@@ -100,7 +100,7 @@ public class Commandkit extends EssentialsCommand
}
else
{
- user.sendMessage("§cYou can't use that kit again for another " + Util.formatDateDiff(kitTimes.get(kitName)) + ".");
+ user.sendMessage(Util.format("kitTimed", Util.formatDateDiff(kitTimes.get(kitName))));
return;
}
}
@@ -136,7 +136,7 @@ public class Commandkit extends EssentialsCommand
}
if (spew)
{
- user.sendMessage("§7Your inventory was full, placing kit on the floor");
+ user.sendMessage(Util.i18n("kitInvFull"));
}
try
{
@@ -147,12 +147,12 @@ public class Commandkit extends EssentialsCommand
{
user.sendMessage(ex.getMessage());
}
- user.sendMessage("§7Giving kit " + args[0].toLowerCase() + ".");
+ user.sendMessage(Util.format("kitGive", args[0].toLowerCase()));
}
catch (Exception ex)
{
- user.sendMessage("§cThat kit does not exist or is improperly defined.");
- user.sendMessage("§cPerhaps an item is missing a quantity in the configuration?");
+ user.sendMessage(Util.i18n("kitError2"));
+ user.sendMessage(Util.i18n("kitErrorHelp"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java
index f1af7e30d..35d8ee755 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java
@@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
@@ -33,18 +34,18 @@ public class Commandlightning extends EssentialsCommand
if (server.matchPlayer(args[0]).isEmpty())
{
- sender.sendMessage("§cPlayer not found");
+ sender.sendMessage(Util.i18n("playerNotFound"));
return;
}
for (Player p : server.matchPlayer(args[0]))
{
- sender.sendMessage("§7Smiting " + p.getDisplayName());
+ sender.sendMessage(Util.format("lightningUse", p.getDisplayName()));
p.getWorld().strikeLightning(p.getLocation());
p.setHealth(p.getHealth() < 5 ? 0 : p.getHealth() - 5);
if (ess.getSettings().warnOnSmite())
{
- p.sendMessage("§7You have just been smited");
+ p.sendMessage(Util.i18n("lightningSmited"));
}
}
if (user != null)
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java
index 4a824f523..39b0723fc 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java
@@ -5,6 +5,7 @@ import org.bukkit.command.CommandSender;
import com.earth2me.essentials.Essentials;
import org.bukkit.entity.Player;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -84,7 +85,7 @@ public class Commandlist extends EssentialsCommand
Collections.sort(users);
StringBuilder onlineUsers = new StringBuilder();
- onlineUsers.append("Connected players: ");
+ onlineUsers.append(Util.i18n("connectedPlayers"));
boolean first = true;
for (User user : users)
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java
index 3e9c385d8..ad96ee832 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java
@@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
import java.util.List;
import org.bukkit.Server;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
@@ -22,21 +23,21 @@ public class Commandmail extends EssentialsCommand
List<String> mail = user.getMails();
if (mail.isEmpty())
{
- user.sendMessage("§cYou do not have any mail!");
+ user.sendMessage(Util.i18n("noMail"));
return;
}
for (String s : mail)
{
user.sendMessage(s);
}
- user.sendMessage("§cTo mark your mail as read, type §c/mail clear");
+ user.sendMessage(Util.i18n("mailClear"));
return;
}
if (args.length >= 3 && "send".equalsIgnoreCase(args[0]))
{
if (!user.isAuthorized("essentials.mail.send"))
{
- user.sendMessage("§cYou do not have the §fessentials.mail.send§c permission.");
+ user.sendMessage(Util.i18n("noMailSendPerm"));
return;
}
@@ -52,20 +53,20 @@ public class Commandmail extends EssentialsCommand
}
if (u == null)
{
- user.sendMessage("§cPlayer " + args[1] + " never was on this server.");
+ user.sendMessage(Util.format("playerNeverOnServer", args[1]));
return;
}
charge(user);
u.addMail(ChatColor.stripColor(user.getDisplayName()) + ": " + getFinalArg(args, 2));
- user.sendMessage("§7Mail sent!");
+ user.sendMessage(Util.i18n("mailSent"));
return;
}
if (args.length >= 1 && "clear".equalsIgnoreCase(args[0]))
{
user.setMails(null);
- user.sendMessage("§7Mail cleared!");
+ user.sendMessage(Util.i18n("mailCleared"));
return;
}
- user.sendMessage("§7Usage: /mail [read|clear|send [to] [message]]");
+ user.sendMessage(Util.format("usage", "/mail [read|clear|send [to] [message]]"));
}
}
diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties
index aa0004ddb..29484ac09 100644
--- a/Essentials/src/messages.properties
+++ b/Essentials/src/messages.properties
@@ -147,3 +147,50 @@ buildAlert = \u00a7cYou are not permitted to build
protectionOwner = \u00a76[EssentialsProtect] Protection owner: {0}
spawnSet = \u00a77Spawn location set for group {0}.
teleportNewPlayerError = Failed to teleport new player
+essentialsReload = \u00a77Essentials Reloaded {0}
+gcmax = Maximum memory: {0} MB
+gcmin = Minimum memory: {0} MB
+gcchunks = chunks,
+gcentities = entities
+godMode = \u00a77God mode {0}.
+godEnabled = enabled
+godDisabled = disabled
+godEnabledFor = enabled for {0}
+godDisabledFor = disabled for {0}
+heal = \u00a77You have been healed.
+healOther = \u00a77Healed {0}.
+helpPages = Page \u00a7c {0} \u00a7f of \u00a7c {1} \u00a7f:
+helpConsole = To view help from the console, type ?.
+helpOp = \u00a7c[HelpOp]\u00a7f \u00a77 {0} :\u00a7f {1}
+infoFileDoesNotExist = File info.txt does not exist.
+infoPages = Page \u00a7c {0} \u00a7f of \u00a7c {1} \u00a7f:
+infoChapter = Select chapter:
+infoUnknownChapter = Unknown chapter:
+infoChapterPages = Chapter {0} , page \u00a7c {1} \u00a7f of \u00a7c {2} \u00a7f:
+invBigger = The other users inventory is bigger than yours.
+invRestored = Your inventory has been restored.
+invSee = You see the inventory of {0}.
+invSeeHelp = Use /invsee to restore your inventory.
+cantSpawnItem = \u00a7cYou are not allowed to spawn the item {0}
+itemSpawn = \u00a77Giving {0} of {1}
+jumpError = That would hurt your computer's brain.
+kickDefault = Kicked from server
+kill = \u00a77Killed {0}.
+noKits = \u00a77There are no kits available yet
+kitError = \u00a7cThere are no valid kits.
+kitError2 = \u00a7cThat kit does not exist or is improperly defined.
+kitErrorHelp = \u00a7cPerhaps an item is missing a quantity in the configuration?
+noKitPermission = \u00a7cYou need the \u00a7{0} \u00a7cc permission to use that kit.
+kitTimed = \u00a7cYou can't use that kit again for another {0}
+kitInvFull = \u00a7cYour inventory was full, placing kit on the floor
+kitGive = \u00a77Giving kit {0}.
+lightningUse = \u00a77Smiting {0}
+lightningSmited = \u00a77You have just been smited
+connectedPlayers = Connected players:
+noMail = You do not have any mail
+mailClear = \u00a7cTo mark your mail as read, type /mail clear
+noMailSendPerm = \u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
+playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
+mailSent = \u00a77Mail sent!
+mailCleared = \u00a77Mail Cleared!
+usage = \u00a7cUsage : \ No newline at end of file