Skip to content

Commit 4fd026f

Browse files
committed
Add mailFormat TL key.
1 parent d9fbd68 commit 4fd026f

25 files changed

+29
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void run(final Server server, final User user, final String commandLabel,
5959
throw new Exception(tl("playerNeverOnServer", args[1]));
6060
}
6161

62-
final String mail = user.getName() + ": " + StringUtil.sanitizeString(FormatUtil.stripFormat(getFinalArg(args, 2)));
62+
final String mail = tl("mailFormat", user.getName(), StringUtil.sanitizeString(FormatUtil.stripFormat(getFinalArg(args, 2))));
6363
if (mail.length() > 1000)
6464
{
6565
throw new Exception(tl("mailTooLong"));
@@ -90,7 +90,7 @@ public void run(final Server server, final User user, final String commandLabel,
9090
{
9191
throw new Exception(tl("noPerm", "essentials.mail.sendall"));
9292
}
93-
ess.runTaskAsynchronously(new SendAll(user.getName() + ": " + FormatUtil.stripFormat(getFinalArg(args, 1))));
93+
ess.runTaskAsynchronously(new SendAll(tl("mailFormat", user.getName(), FormatUtil.stripFormat(getFinalArg(args, 1)))));
9494
user.sendMessage(tl("mailSent"));
9595
return;
9696
}
@@ -121,13 +121,13 @@ else if (args.length >= 3 && "send".equalsIgnoreCase(args[0]))
121121
{
122122
throw new Exception(tl("playerNeverOnServer", args[1]));
123123
}
124-
u.addMail("Server: " + getFinalArg(args, 2));
124+
u.addMail(tl("mailFormat", "Server", getFinalArg(args, 2)));
125125
sender.sendMessage(tl("mailSent"));
126126
return;
127127
}
128128
else if (args.length >= 2 && "sendall".equalsIgnoreCase(args[0]))
129129
{
130-
ess.runTaskAsynchronously(new SendAll("Server: " + getFinalArg(args, 1)));
130+
ess.runTaskAsynchronously(new SendAll(tl("mailFormat", "Server", getFinalArg(args, 1))));
131131
sender.sendMessage(tl("mailSent"));
132132
return;
133133
}
@@ -139,7 +139,7 @@ else if (args.length >= 2)
139139
{
140140
throw new Exception(tl("playerNeverOnServer", args[0]));
141141
}
142-
u.addMail("Server: " + getFinalArg(args, 1));
142+
u.addMail(tl("mailFormat", "Server", getFinalArg(args, 1)));
143143
sender.sendMessage(tl("mailSent"));
144144
return;
145145
}

Essentials/src/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,3 +554,4 @@ mailSentTo=\u00a7c{0}\u00a76 has been sent the following mail\:
554554
mailMessage={0}
555555
whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
556556
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
557+
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}

Essentials/src/messages_cs.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,3 +555,4 @@ mailMessage={0}
555555

556556
whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
557557
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
558+
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}

Essentials/src/messages_da.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,3 +555,4 @@ mailMessage={0}
555555

556556
whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
557557
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
558+
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}

Essentials/src/messages_de.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,3 +555,4 @@ mailMessage={0}
555555

556556
whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
557557
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
558+
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}

Essentials/src/messages_en.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,3 +554,4 @@ mailSentTo=\u00a7c{0}\u00a76 has been sent the following mail\:
554554
mailMessage={0}
555555
whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
556556
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
557+
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}

Essentials/src/messages_es.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,3 +555,4 @@ mailMessage={0}
555555

556556
whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
557557
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
558+
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}

Essentials/src/messages_et.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,3 +555,4 @@ mailMessage={0}
555555

556556
whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
557557
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
558+
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}

Essentials/src/messages_fi.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,3 +555,4 @@ mailMessage={0}
555555

556556
whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
557557
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
558+
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}

Essentials/src/messages_fr.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,3 +555,4 @@ mailMessage={0}
555555

556556
whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
557557
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
558+
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}

0 commit comments

Comments
 (0)