Skip to content

Commit 077074c

Browse files
stuntguy3000khobbits
authored andcommitted
Add missing language pointers
1 parent c59a204 commit 077074c

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,9 @@ else if (args.length > 1 && args[1].trim().length() > 2 && user.isAuthorized("es
7979

8080
private void gamemodeOtherPlayers(final Server server, final CommandSource sender, final GameMode gameMode, final String name) throws NotEnoughArgumentsException, PlayerNotFoundException
8181
{
82-
//TODO: TL this
8382
if (name.trim().length() < 2 || gameMode == null)
8483
{
85-
throw new NotEnoughArgumentsException("You need to specify a valid player/mode.");
84+
throw new NotEnoughArgumentsException(_("gameModeInvalid"));
8685
}
8786

8887
boolean skipHidden = sender.isPlayer() && !ess.getUser(sender.getPlayer()).isAuthorized("essentials.vanish.interact");

Essentials/src/com/earth2me/essentials/commands/Commandmail.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
package com.earth2me.essentials.commands;
22

33
import com.earth2me.essentials.CommandSource;
4-
import static com.earth2me.essentials.I18n._;
54
import com.earth2me.essentials.User;
65
import com.earth2me.essentials.utils.FormatUtil;
76
import com.earth2me.essentials.utils.StringUtil;
8-
import java.util.List;
97
import org.bukkit.Server;
108

9+
import java.util.List;
10+
11+
import static com.earth2me.essentials.I18n._;
12+
1113

1214
public class Commandmail extends EssentialsCommand
1315
{
@@ -60,7 +62,7 @@ public void run(final Server server, final User user, final String commandLabel,
6062
final String mail = user.getName() + ": " + StringUtil.sanitizeString(FormatUtil.stripFormat(getFinalArg(args, 2)));
6163
if (mail.length() > 1000)
6264
{
63-
throw new Exception("Mail message too long. Try to keep it below 1000");
65+
throw new Exception(_("mailTooLong"));
6466
}
6567
if (Math.abs(System.currentTimeMillis() - timestamp) > 60000)
6668
{
@@ -70,7 +72,7 @@ public void run(final Server server, final User user, final String commandLabel,
7072
mailsPerMinute++;
7173
if (mailsPerMinute > ess.getSettings().getMailsPerMinute())
7274
{
73-
throw new Exception("Too many mails have been send within the last minute. Maximum: " + ess.getSettings().getMailsPerMinute());
75+
throw new Exception(_("mailDelay", ess.getSettings().getMailsPerMinute()));
7476
}
7577
u.addMail(mail);
7678
}

Essentials/src/com/earth2me/essentials/commands/Commandtp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void run(final Server server, final User user, final String commandLabel,
5151
final double z = args[3].startsWith("~") ? target2.getLocation().getZ() + Integer.parseInt(args[3].substring(1)) : Integer.parseInt(args[3]);
5252
if (x > 30000000 || y > 30000000 || z > 30000000 || x < -30000000 || y < -30000000 || z < -30000000)
5353
{
54-
throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //TODO: I18n
54+
throw new NotEnoughArgumentsException(_("teleportInvalidLocation"));
5555
}
5656
final Location loc = new Location(target2.getWorld(), x, y, z, target2.getLocation().getYaw(), target2.getLocation().getPitch());
5757
if (!target2.isTeleportEnabled())
@@ -111,7 +111,7 @@ else if (args.length > 3)
111111
final double z = args[3].startsWith("~") ? target.getLocation().getZ() + Integer.parseInt(args[3].substring(1)) : Integer.parseInt(args[3]);
112112
if (x > 30000000 || y > 30000000 || z > 30000000 || x < -30000000 || y < -30000000 || z < -30000000)
113113
{
114-
throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //TODO: I18n
114+
throw new NotEnoughArgumentsException(_("teleportInvalidLocation"));
115115
}
116116
final Location loc = new Location(target.getWorld(), x, y, z, target.getLocation().getYaw(), target.getLocation().getPitch());
117117
target.getTeleport().now(loc, false, TeleportCause.COMMAND);

Essentials/src/com/earth2me/essentials/commands/Commandtppos.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void run(final Server server, final User user, final String commandLabel,
3838
}
3939
if (x > 30000000 || y > 30000000 || z > 30000000 || x < -30000000 || y < -30000000 || z < -30000000)
4040
{
41-
throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //TODO: I18n
41+
throw new NotEnoughArgumentsException(_("teleportInvalidLocation"));
4242
}
4343
final Trade charge = new Trade(this.getName(), ess);
4444
charge.isAffordableFor(user);
@@ -70,7 +70,7 @@ public void run(final Server server, final CommandSource sender, final String co
7070
}
7171
if (x > 30000000 || y > 30000000 || z > 30000000 || x < -30000000 || y < -30000000 || z < -30000000)
7272
{
73-
throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //TODO: I18n
73+
throw new NotEnoughArgumentsException(_("teleportInvalidLocation"));
7474
}
7575
sender.sendMessage(_("teleporting", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
7676
user.sendMessage(_("teleporting", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));

Essentials/src/com/earth2me/essentials/commands/Commandweather.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ else if (commandLabel.equalsIgnoreCase("storm") || commandLabel.equalsIgnoreCase
5858
}
5959
}
6060

61-
//TODO: Translate these
6261
@Override
6362
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
6463
{
@@ -71,7 +70,7 @@ protected void run(final Server server, final CommandSource sender, final String
7170
final World world = server.getWorld(args[0]);
7271
if (world == null)
7372
{
74-
throw new Exception("World named " + args[0] + " not found!");
73+
throw new Exception(_("weatherInvalidWorldWorld", args[0]));
7574
}
7675
if (args.length > 2)
7776
{

Essentials/src/messages.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,4 +539,9 @@ skullChanged=\u00a76Skull changed to \u00a7c{0}.\u00a76.
539539
alphaNames=\u00a74Player names can only contain letters, numbers and underscores.
540540
givenSkull=\u00a76You have been given the Skull of \u00a7c{0}\u00a76.
541541
noPermissionSkull=\u00a74You do not have permission to modify that Skull.
542-
invalidSkull=\u00a74Please hold a player Skull.
542+
teleportInvalidLocation=Value of coordinates cannot be over 30000000
543+
invalidSkull=\u00a74Please hold a player Skull.
544+
weatherInvalidWorld=World named {0} not found!
545+
gameModeInvalid=\u00a74You need to specify a valid player/mode.
546+
mailTooLong=\u00a74Mail message too long. Try to keep it below 1000
547+
mailDelay=Too many mails have been sent within the last minute. Maximum\: {0}

0 commit comments

Comments
 (0)