[trunk] translations = T's

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1424 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
ementalo 2011-05-11 22:42:48 +00:00
parent f315bbe43c
commit 92b34ec15f
20 changed files with 105 additions and 53 deletions

View File

@ -35,7 +35,7 @@ public class Commandgod extends EssentialsCommand
return;
}
user.sendMessage(Util.format("godMode", (user.toggleGodModeEnabled()? Util.i18n("godEnabled") : Util.i18n("godDisabled"))));
user.sendMessage(Util.format("godMode", (user.toggleGodModeEnabled()? Util.i18n("enabled") : Util.i18n("disabled"))));
}
private void godOtherPlayers(Server server, CommandSender sender, String name)
@ -44,7 +44,7 @@ public class Commandgod extends EssentialsCommand
{
User u = ess.getUser(p);
boolean enabled = u.toggleGodModeEnabled();
u.sendMessage(Util.format("godMode", (enabled ? Util.i18n("godEnabled") : Util.i18n("godDisabled"))));
u.sendMessage(Util.format("godMode", (enabled ? Util.i18n("enabled") : Util.i18n("disabled"))));
sender.sendMessage(Util.format("godMode",Util.format(enabled ? Util.i18n("godEnabledFor"): Util.i18n("godDisabledFor"), p.getDisplayName())));
}
}

View File

@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commandping extends EssentialsCommand
@ -14,6 +15,6 @@ public class Commandping extends EssentialsCommand
@Override
public void run(Server server, User player, String commandLabel, String[] args) throws Exception
{
player.sendMessage("Pong!");
player.sendMessage(Util.i18n("pong"));
}
}

View File

@ -1,6 +1,7 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
@ -20,16 +21,16 @@ public class Commandpowertool extends EssentialsCommand
ItemStack is = user.getItemInHand();
if (is == null || is.getType() == Material.AIR)
{
user.sendMessage("Command can't be attached to air.");
user.sendMessage(Util.i18n("powerToolAir"));
}
String command = getFinalArg(args, 0);
if (command != null && !command.isEmpty())
{
user.sendMessage("Command assigned to " + is.getType().toString().toLowerCase().replaceAll("_", " "));
user.sendMessage(Util.format("powerToolAttach",is.getType().toString().toLowerCase().replaceAll("_", " ")));
}
else
{
user.sendMessage("Command removed from " + is.getType().toString().toLowerCase().replaceAll("_", " "));
user.sendMessage(Util.format("powerToolRemove", is.getType().toString().toLowerCase().replaceAll("_", " ")));
}
charge(user);
user.setPowertool(is, command);

View File

@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
import com.earth2me.essentials.IReplyTo;
import com.earth2me.essentials.Util;
import org.bukkit.*;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -30,12 +31,12 @@ public class Commandr extends EssentialsCommand
if (target == null)
{
sender.sendMessage("§cYou have nobody to whom you can reply.");
sender.sendMessage(Util.i18n("foreverAlone"));
}
charge(sender);
sender.sendMessage("[Me -> " + targetName + "] " + message);
target.sendMessage("[" + senderName + " -> Me] " + message);
sender.sendMessage("[" + Util.i18n("me")+ " -> " + targetName + "] " + message);
target.sendMessage("[" + senderName + " -> " + Util.i18n("me") +"] " + message);
replyTo.setReplyTo(target);
if (target != sender)
{

View File

@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
import org.bukkit.Server;
import com.earth2me.essentials.Essentials;
import org.bukkit.entity.Player;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commandrealname extends EssentialsCommand
@ -32,7 +32,7 @@ public class Commandrealname extends EssentialsCommand
{
continue;
}
user.sendMessage(u.getDisplayName() + " is " + u.getName());
user.sendMessage(u.getDisplayName() + " " + Util.i18n("is") + " " + u.getName());
}
}
}

View File

@ -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 Commandreloadall extends EssentialsCommand
{
charge(sender);
server.reload();
sender.sendMessage("§7Reloaded all plugins.");
sender.sendMessage(Util.i18n("reloadAllPlugins"));
}
}

View File

@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Util;
import com.earth2me.essentials.commands.EssentialsCommand;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@ -16,7 +17,7 @@ public class Commandrules extends EssentialsCommand
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
charge(sender);
for (String m : ess.getLines(sender, "rules", "§cThere are no rules specified yet."))
for (String m : ess.getLines(sender, "rules", Util.i18n("noRules")))
{
sender.sendMessage(m);
}

View File

@ -23,7 +23,7 @@ public class Commandseen extends EssentialsCommand
try
{
User u = getPlayer(server, args, 0);
sender.sendMessage("Player " + u.getDisplayName() + " is online since" + Util.formatDateDiff(u.getLastLogin()));
sender.sendMessage(Util.format("seenOnline",u.getDisplayName(), Util.formatDateDiff(u.getLastLogin())));
}
catch (NoSuchFieldException e)
{
@ -32,7 +32,7 @@ public class Commandseen extends EssentialsCommand
{
return;
}
sender.sendMessage("Player " + u.getDisplayName() + " is offline since" + Util.formatDateDiff(u.getLastLogout()));
sender.sendMessage(Util.format("seenOffline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogout())));
}
}
}

View File

@ -59,7 +59,7 @@ public class Commandsell extends EssentialsCommand
{
if (is == null || is.getType() == Material.AIR)
{
throw new Exception("You really tried to sell Air? Put an item in your hand.");
throw new Exception(Util.i18n("itemSellAir"));
}
int id = is.getTypeId();
int amount = 0;
@ -77,11 +77,11 @@ public class Commandsell extends EssentialsCommand
if (Double.isNaN(worth))
{
throw new Exception("That item cannot be sold to the server.");
throw new Exception(Util.i18n("itemCannotBeSold"));
}
if (requireStack && !stack)
{
throw new Exception("Item must be traded in stacks. A quantity of 2s would be two stacks, etc.");
throw new Exception(Util.i18n("itemMustBeStacked"));
}
@ -126,9 +126,9 @@ public class Commandsell extends EssentialsCommand
if (amount > max || amount < 1)
{
user.sendMessage("§cYou do not have enough of that item to sell.");
user.sendMessage("§7If you meant to sell all of your items of that type, use /sell itemname");
user.sendMessage("§7/sell itemname -1 will sell all but one item, etc.");
user.sendMessage(Util.i18n("itemNotEnough1"));
user.sendMessage(Util.i18n("itemNotEnough2"));
user.sendMessage(Util.i18n("itemNotEnough3"));
return;
}
@ -136,8 +136,8 @@ public class Commandsell extends EssentialsCommand
InventoryWorkaround.removeItem(user.getInventory(), true, new ItemStack(is.getType(), amount, is.getDurability()));
user.updateInventory();
user.giveMoney(worth * amount);
user.sendMessage("§7Sold for §c" + Util.formatCurrency(worth * amount) + "§7 (" + amount + " items at " + Util.formatCurrency(worth) + " each)");
logger.log(Level.INFO, user.getDisplayName() + " sold "+is.getType().toString().toLowerCase() + " for §c" + Util.formatCurrency(worth * amount) + "§7 (" + amount + " items at " + Util.formatCurrency(worth) + " each)");
user.sendMessage(Util.format("itemSold", Util.formatCurrency(worth * amount), amount, Util.formatCurrency(worth)));
logger.log(Level.INFO, Util.format("itemSoldConsole",user.getDisplayName(),is.getType().toString().toLowerCase(), Util.formatCurrency(worth * amount), amount, Util.formatCurrency(worth)));
}
}

View File

@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commandsethome extends EssentialsCommand
@ -16,6 +17,6 @@ public class Commandsethome extends EssentialsCommand
{
user.setHome(args.length > 0 && args[0].equalsIgnoreCase("default"));
charge(user);
user.sendMessage("§7Home set.");
user.sendMessage(Util.i18n("homeSet"));
}
}

View File

@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
import org.bukkit.Server;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commandsetjail extends EssentialsCommand
@ -21,7 +22,7 @@ public class Commandsetjail extends EssentialsCommand
}
charge(user);
Essentials.getJail().setJail(user.getLocation(), args[0]);
user.sendMessage("§7Jail " + args[0] + " has been set");
user.sendMessage(Util.format("jailSet",args[0]));
}
}

View File

@ -4,6 +4,7 @@ import org.bukkit.Location;
import org.bukkit.Server;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commandsetwarp extends EssentialsCommand
@ -24,6 +25,6 @@ public class Commandsetwarp extends EssentialsCommand
charge(user);
Location loc = user.getLocation();
Essentials.getWarps().setWarp(args[0], loc);
user.sendMessage("§7Warp set.");
user.sendMessage(Util.format("warpSet", args[0]));
}
}

View File

@ -4,6 +4,7 @@ import org.bukkit.Server;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.ItemDb;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.inventory.ItemStack;
@ -25,6 +26,6 @@ public class Commandsetworth extends EssentialsCommand
ItemStack stack = ItemDb.get(args[0]);
charge(user);
Essentials.getWorth().setPrice(stack, Double.parseDouble(args[1]));
user.sendMessage("§7Worth value set");
user.sendMessage(Util.i18n("worthSet"));
}
}

View File

@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
@ -16,7 +17,7 @@ public class Commandsocialspy extends EssentialsCommand
{
charge(user);
user.sendMessage("§7SocialSpy " + (user.toggleSocialSpy() ? "enabled." : "disabled."));
user.sendMessage("§7SocialSpy " + (user.toggleSocialSpy() ? Util.i18n("enabled") : Util.i18n("disabled")));
}
}

View File

@ -1,6 +1,7 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;
@ -26,7 +27,7 @@ public class Commandspawner extends EssentialsCommand
Block target = user.getTarget().getTargetBlock();
if (target.getType() != Material.MOB_SPAWNER)
{
throw new Exception("Target block must be a mob spawner.");
throw new Exception(Util.i18n("mobSpawnTarget"));
}
charge(user);
@ -36,7 +37,7 @@ public class Commandspawner extends EssentialsCommand
}
catch (Throwable ex)
{
throw new Exception("Error while changing mob spawner.");
throw new Exception(Util.i18n("mobSpawnError"));
}
}
}

View File

@ -9,6 +9,7 @@ import com.earth2me.essentials.User;
import com.earth2me.essentials.Mob;
import com.earth2me.essentials.Mob.MobException;
import com.earth2me.essentials.TargetBlock;
import com.earth2me.essentials.Util;
import net.minecraft.server.EntityWolf;
import net.minecraft.server.PathEntity;
import org.bukkit.DyeColor;
@ -69,7 +70,7 @@ public class Commandspawnmob extends EssentialsCommand
mob = Mob.fromName(mobType);
if (mob == null)
{
user.sendMessage("Invalid mob type.");
user.sendMessage(Util.i18n("invalidMob"));
return;
}
charge(user);
@ -80,7 +81,7 @@ public class Commandspawnmob extends EssentialsCommand
}
catch (MobException e)
{
user.sendMessage("Unable to spawn mob.");
user.sendMessage(Util.i18n("unableToSpawnMob"));
return;
}
int[] ignore =
@ -103,7 +104,7 @@ public class Commandspawnmob extends EssentialsCommand
mobMount = Mob.fromName(mountType);
if (mobMount == null)
{
user.sendMessage("Invalid mob type.");
user.sendMessage(Util.i18n("invalidMob"));
return;
}
try
@ -112,7 +113,7 @@ public class Commandspawnmob extends EssentialsCommand
}
catch (MobException e)
{
user.sendMessage("Unable to spawn mob.");
user.sendMessage(Util.i18n("unableToSpawnMob"));
return;
}
spawnedMount.teleportTo(spawnedMob);
@ -134,7 +135,7 @@ public class Commandspawnmob extends EssentialsCommand
if (mobCount > serverLimit)
{
mobCount = serverLimit;
user.sendMessage("Mob quantity limited to server limit");
user.sendMessage(Util.i18n("mobSpawnLimit"));
}
try
@ -152,7 +153,7 @@ public class Commandspawnmob extends EssentialsCommand
}
catch (MobException e)
{
user.sendMessage("Unable to spawn mob.");
user.sendMessage(Util.i18n("unableToSpawnMob"));
return;
}
spawnedMount.teleportTo(spawnedMob);
@ -168,24 +169,24 @@ public class Commandspawnmob extends EssentialsCommand
changeMobData(mobMount.name, spawnedMount, mountData, user);
}
}
user.sendMessage(args[1] + " " + mob.name.toLowerCase() + mob.s + " spawned.");
user.sendMessage(args[1] + " " + mob.name.toLowerCase() + mob.s + Util.i18n("spawned"));
}
catch (MobException e1)
{
throw new Exception("Unable to spawn mobs. Insert bad excuse here.");
throw new Exception(Util.i18n("unableToSpawnMob"));
}
catch (NumberFormatException e2)
{
throw new Exception("A number goes there, silly.");
throw new Exception(Util.i18n("numberRequired"));
}
catch (NullPointerException np)
{
throw new Exception("That mob likes to be alone");
throw new Exception(Util.i18n("soloMob"));
}
}
else
{
user.sendMessage(mob.name + " spawned.");
user.sendMessage(mob.name + " " + Util.i18n("spawned"));
}
}
@ -204,7 +205,7 @@ public class Commandspawnmob extends EssentialsCommand
}
catch (Exception e)
{
throw new Exception("Malformed size.");
throw new Exception(Util.i18n("slimeMalformedSize"));
}
}
if ("Sheep".equalsIgnoreCase(type))
@ -215,7 +216,7 @@ public class Commandspawnmob extends EssentialsCommand
}
catch (Exception e)
{
throw new Exception("Malformed color.");
throw new Exception(Util.i18n("sheepMalformedColor"));
}
}
if ("Wolf".equalsIgnoreCase(type) && data.equalsIgnoreCase("tamed"))

View File

@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commandsuicide extends EssentialsCommand
@ -16,7 +17,7 @@ public class Commandsuicide extends EssentialsCommand
{
charge(user);
user.setHealth(0);
user.sendMessage("§cGoodbye Cruel World...");
server.broadcastMessage("§7" + user.getDisplayName() + " took their own life");
user.sendMessage(Util.i18n("suicideMessage"));
server.broadcastMessage(Util.format("suicideSuccess",user.getDisplayName()));
}
}

View File

@ -34,19 +34,19 @@ public class Commandtempban extends EssentialsCommand
}
if (p == null)
{
sender.sendMessage("§cPlayer " + args[0] + " not found");
sender.sendMessage(Util.format("playerNotFound"));
}
String time = getFinalArg(args, 1);
long banTimestamp = Util.parseDateDiff(time, true);
p = ess.getUser(server.matchPlayer(args[0]).get(0));
String banReason = "Temporarily banned from server for " + Util.formatDateDiff(banTimestamp);
String banReason = Util.format("tempBanned", Util.formatDateDiff(banTimestamp));
p.setBanReason(banReason);
p.setBanTimeout(banTimestamp);
p.kickPlayer(banReason);
((CraftServer)server).getHandle().a(p.getName());
sender.sendMessage("§cPlayer " + p.getName() + " banned");
sender.sendMessage(Util.format("playerBanned", p.getName()));
Essentials.getStatic().loadBanList();
}
}

View File

@ -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.World;
@ -29,12 +30,13 @@ public class Commandthunder extends EssentialsCommand
world.setThundering(setThunder ? true : false);
world.setThunderDuration(Integer.parseInt(args[1]) * 20);
user.sendMessage("§7You " + (setThunder ? "enabled" : "disabled") + " thunder in your world for " + args[1] + " seconds");
user.sendMessage(Util.format("thunderDuration", (setThunder ? Util.i18n("enabled") : Util.i18n("disabled")), Util.i18n("for"), Util.i18n("seconds")));
}
else
{
world.setThundering(setThunder ? true : false);
user.sendMessage("§7You " + (setThunder ? "enabled" : "disabled") + " thunder in your world");
user.sendMessage(Util.format("thunder", setThunder ? Util.i18n("enabled") : Util.i18n("disabled")));
}
}

View File

@ -153,8 +153,8 @@ gcmin = Minimum memory: {0} MB
gcchunks = chunks,
gcentities = entities
godMode = \u00a77God mode {0}.
godEnabled = enabled
godDisabled = disabled
enabled = enabled
disabled = disabled
godEnabledFor = enabled for {0}
godDisabledFor = disabled for {0}
heal = \u00a77You have been healed.
@ -206,4 +206,41 @@ nickNoMore = \u00a7You no longer have a nickname.
nickNamesAlpha = \u00a7cNicknames must be alphanumeric.
nickInUse = \u00a7cThat name is already in use.
nickSet = \u00a77Your nickname is now \u00a7c{0}
nickChanged = Nickname changed.
nickChanged = Nickname changed.
pong = Pong!
powerToolAir = Command can't be attached to air.
powerToolAttach = Command assigned to {0}
powerToolRemove = Command removed from {0}
foreverAlone = \u00a7cYou have nobody to whom you can reply.
is = is
reloadAllPlugins = \u00a77Reloaded all plugins.
noRules = \u00a7cThere are no rules specified yet.
seenOnline = Player {0} is online since {1}
seenOffline = Player {0} is offline since {1}
itemCannotBeSold = That item cannot be sold to the server.
itemMustBeStacked = Item must be traded in stacks. A quantity of 2s would be two stacks, etc.
itemNotEnough1 = \u00a7cYou do not have enough of that item to sell.
itemNotEnough2 = \u00a77If you meant to sell all of your items of that type, use /sell itemname
itemNotEnough3 = \u00a77/sell itemname -1 will sell all but one item, etc.
itemSold = \u00a77Sold for \u00a7c {0} \u00a77 ({1} items at {2} each)
itemSoldConsole = {0} sold {1} for \u00a77 {2} \u00a77 ({3} items at {4} each)
itemSellAir = You really tried to sell Air? Put an item in your hand.
homeSet = \u00a77Home set.
jailSet = \u00a77Jail {0} has been set
warpSet = \u00a77Warp {0} set.
worthSet = Worth value set
mobSpawnTarget = Target block must be a mob spawner.
mobSpawnError = Error while changing mob spawner.
invalidMob = Invalid mob type.
unableToSpawnMob = Unable to spawn mob.
mobSpawnLimit = Mob quantity limited to server limit
soloMob = That mob likes to be alone
numberRequired = A number goes there, silly.
spawned = spawned
slimeMalformedSize = Malformed size.
sheepMalformedColor = Malformed color.
suicideMessage = \u00a77Goodbye Cruel World...
suicideSuccess = \u00a77{0} took their own life
tempBanned = Temporarily banned from server for {0}
thunderDuration = You {0} thunder in your world {1}
thunder = You {0} thunder in your world