summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-11 21:53:01 +0000
committerementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-11 21:53:01 +0000
commit299be08d132a0593d4466d76f406a83de97a989d (patch)
treeb56042d19c137e2748a209a33f23bc1cd431ac54
parentbcd6e272ad204bf4bd7566bbd8878d50bd90cdac (diff)
downloadEssentials-299be08d132a0593d4466d76f406a83de97a989d.tar
Essentials-299be08d132a0593d4466d76f406a83de97a989d.tar.gz
Essentials-299be08d132a0593d4466d76f406a83de97a989d.tar.lz
Essentials-299be08d132a0593d4466d76f406a83de97a989d.tar.xz
Essentials-299be08d132a0593d4466d76f406a83de97a989d.zip
[trunk] translations
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1422 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandme.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmotd.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmsg.java12
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmute.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandnick.java17
-rw-r--r--Essentials/src/messages.properties15
6 files changed, 37 insertions, 17 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandme.java b/Essentials/src/com/earth2me/essentials/commands/Commandme.java
index 123e7e31e..d338a102a 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandme.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandme.java
@@ -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 Commandme extends EssentialsCommand
@@ -16,7 +17,7 @@ public class Commandme extends EssentialsCommand
{
if (user.isMuted())
{
- user.sendMessage("§7Your voice has been silenced");
+ user.sendMessage(Util.i18n("voiceSilenced"));
return;
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java b/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
index d40befbf8..4712c331b 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
+import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -15,7 +16,7 @@ public class Commandmotd extends EssentialsCommand
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
charge(sender);
- for (String m : ess.getMotd(sender, "§cThere is no message of the day."))
+ for (String m : ess.getMotd(sender, Util.i18n("noMotd")))
{
sender.sendMessage(m);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
index 53e6ec3b7..8585dcef9 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
@@ -5,6 +5,7 @@ import org.bukkit.Server;
import org.bukkit.entity.Player;
import com.earth2me.essentials.Console;
import com.earth2me.essentials.IReplyTo;
+import com.earth2me.essentials.Util;
import org.bukkit.command.CommandSender;
@@ -24,15 +25,16 @@ public class Commandmsg extends EssentialsCommand
}
String message = getFinalArg(args, 1);
+ String translatedMe = Util.i18n("me");
IReplyTo replyTo = sender instanceof Player ? ess.getUser((Player)sender) : Console.getConsoleReplyTo();
String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
if (args[0].equalsIgnoreCase(Console.NAME))
{
- sender.sendMessage("[Me -> " + Console.NAME + "§f] " + message);
+ sender.sendMessage("[" + translatedMe + " -> " + Console.NAME + "§f] " + message);
CommandSender cs = Console.getCommandSender(server);
- cs.sendMessage("[" + senderName + " -> Me§f] " + message);
+ cs.sendMessage("[" + senderName + " -> " + translatedMe + "§f] " + message);
replyTo.setReplyTo(cs);
Console.getConsoleReplyTo().setReplyTo(sender);
return;
@@ -42,15 +44,15 @@ public class Commandmsg extends EssentialsCommand
if (matches.isEmpty())
{
- sender.sendMessage("§cThere are no players matching that name.");
+ sender.sendMessage(Util.i18n("playerNotFound"));
return;
}
charge(sender);
for (Player p : matches)
{
- sender.sendMessage("[Me -> " + p.getDisplayName() + "§f] " + message);
- p.sendMessage("[" + senderName + " -> Me§f] " + message);
+ sender.sendMessage("[" + translatedMe + " -> " + p.getDisplayName() + "§f] " + message);
+ p.sendMessage("[" + senderName + " -> " + translatedMe + "§f] " + message);
replyTo.setReplyTo(ess.getUser(p));
ess.getUser(p).setReplyTo(sender);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmute.java b/Essentials/src/com/earth2me/essentials/commands/Commandmute.java
index 422806400..24316d93f 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmute.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmute.java
@@ -29,6 +29,8 @@ public class Commandmute extends EssentialsCommand
}
p.setMuteTimeout(muteTimestamp);
charge(sender);
- sender.sendMessage("Player " + p.getDisplayName() + " " + (p.toggleMuted() ? "muted" : "unmuted") + (muteTimestamp > 0 ? " for " + Util.formatDateDiff(muteTimestamp) : "") + ".");
+
+
+ sender.sendMessage(Util.format("mutedPlayer", p.getDisplayName(), (p.toggleMuted() ? Util.i18n("muted") : Util.i18n("unmuted")), (muteTimestamp > 0 ? Util.i18n("for") + Util.formatDateDiff(muteTimestamp) : "")));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnick.java b/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
index 9256ff41a..e959157ec 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandnick.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;
public class Commandnick extends EssentialsCommand
@@ -26,7 +27,7 @@ public class Commandnick extends EssentialsCommand
{
if (!user.isAuthorized("essentials.nick.others"))
{
- user.sendMessage("§cYou do not have permission to change the nickname of others");
+ user.sendMessage(Util.i18n("nickOthersPermission"));
return;
}
@@ -40,13 +41,13 @@ public class Commandnick extends EssentialsCommand
{
user.setDisplayName(user.getName());
user.setNickname(null);
- user.sendMessage("§7You no longer have a nickname.");
+ user.sendMessage(Util.i18n("nickNoMore"));
return;
}
if (nick.matches("[^a-zA-Z_0-9]"))
{
- user.sendMessage("§cNicknames must be alphanumeric.");
+ user.sendMessage(Util.i18n("nickNamesAlpha"));
return;
}
@@ -61,7 +62,7 @@ public class Commandnick extends EssentialsCommand
String nk = nick.toLowerCase();
if (nk.equals(dn) || nk.equals(n))
{
- user.sendMessage("§cThat name is already in use.");
+ user.sendMessage(Util.i18n("nickInUse"));
return;
}
}
@@ -69,7 +70,7 @@ public class Commandnick extends EssentialsCommand
user.charge(this);
user.setDisplayName(ess.getConfiguration().getString("nickname-prefix", "~") + nick);
user.setNickname(nick);
- user.sendMessage("§7Your nickname is now §c" + user.getDisplayName() + "§7.");
+ user.sendMessage(Util.format("nickSet", user.getDisplayName() + "§7."));
}
@Override
@@ -92,14 +93,14 @@ public class Commandnick extends EssentialsCommand
{
target.setDisplayName(target.getName());
target.setNickname(null);
- target.sendMessage("§7You no longer have a nickname.");
+ target.sendMessage(Util.i18n("nickNoMore"));
}
else
{
target.setDisplayName(ess.getSettings().getNicknamePrefix() + nick);
target.setNickname(nick);
- target.sendMessage("§7Your nickname is now §c" + target.getDisplayName() + "§7.");
+ target.sendMessage(Util.format("nickSet", target.getDisplayName() + "§7."));
}
- sender.sendMessage("Nickname changed.");
+ sender.sendMessage(Util.i18n("nickChanged"));
}
}
diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties
index 241e181ab..b614f3dd2 100644
--- a/Essentials/src/messages.properties
+++ b/Essentials/src/messages.properties
@@ -193,4 +193,17 @@ noMailSendPerm = \u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c p
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
mailSent = \u00a77Mail sent!
mailCleared = \u00a77Mail Cleared!
-usage = \u00a7cUsage : \ No newline at end of file
+usage = \u00a7cUsage :
+voiceSilenced = \u00a77Your voice has been silenced
+noMotd = \u00a7cThere is no message of the day."
+me = me
+mutedPlayer = Player {0} {1} {2} {3}.
+muted = muted
+unMuted = unmuted
+for = for
+nickOthersPermission = \u00a7cYou do not have permission to change the nickname of others
+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. \ No newline at end of file