From dfbc1956c981c18b8331fbf52786982063657c97 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 12 Mar 2012 15:35:20 +0000 Subject: [PATCH] Fixing a few TL Keys --- Essentials/src/com/earth2me/essentials/UserData.java | 4 ++-- .../src/com/earth2me/essentials/commands/Commandbreak.java | 3 ++- .../src/com/earth2me/essentials/commands/Commandgive.java | 6 +++--- .../src/com/earth2me/essentials/commands/Commandsudo.java | 7 +++---- .../src/com/earth2me/essentials/commands/Commandtp.java | 3 +-- Essentials/src/messages.properties | 5 ++++- Essentials/src/messages_da.properties | 5 ++++- Essentials/src/messages_de.properties | 5 ++++- Essentials/src/messages_en.properties | 5 ++++- Essentials/src/messages_es.properties | 5 ++++- Essentials/src/messages_fr.properties | 5 ++++- Essentials/src/messages_nl.properties | 5 ++++- 12 files changed, 39 insertions(+), 19 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 1fdc98254..3b6516277 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -1,5 +1,6 @@ package com.earth2me.essentials; +import static com.earth2me.essentials.I18n._; import java.io.File; import java.util.*; import java.util.logging.Logger; @@ -176,8 +177,7 @@ public abstract class UserData extends PlayerExtension implements IConf } else { - //TODO: move this message to messages file - throw new Exception("Home " + name + " doesn't exist"); + throw new Exception(_("invalidHome", name)); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java b/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java index 2691ad4f2..a03c24264 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java @@ -1,5 +1,6 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import org.bukkit.Material; import org.bukkit.Server; @@ -29,7 +30,7 @@ public class Commandbreak extends EssentialsCommand } if (block.getType() == Material.BEDROCK && !user.isAuthorized("essentials.break.bedrock")) { - throw new Exception("You are not allowed to destroy bedrock."); //TODO: Translation + throw new Exception(_("noBreakBedrock")); } final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase()); server.getPluginManager().callEvent(event); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java index d6e3d8f98..9db7d4da3 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java @@ -1,5 +1,6 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import com.earth2me.essentials.User; import java.util.Locale; @@ -19,7 +20,6 @@ public class Commandgive extends EssentialsCommand super("give"); } - //TODO: move these messages to message file @Override public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { @@ -39,7 +39,7 @@ public class Commandgive extends EssentialsCommand : (!ess.getUser(sender).isAuthorized("essentials.itemspawn.exempt") && !ess.getUser(sender).canSpawnItem(stack.getTypeId())))) { - throw new Exception(ChatColor.RED + "You are not allowed to spawn the item " + itemname); + throw new Exception(_("cantSpawnItem", itemname)); } final User giveTo = getPlayer(server, args, 0); @@ -82,7 +82,7 @@ public class Commandgive extends EssentialsCommand if (stack.getType() == Material.AIR) { - throw new Exception(ChatColor.RED + "You can't give air."); + throw new Exception(_("cantSpawnItem", "Air")); } final String itemName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' '); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java index d43d486b9..23083fa3d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java @@ -1,5 +1,6 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; import org.bukkit.Server; @@ -30,14 +31,12 @@ public class Commandsudo extends EssentialsCommand System.arraycopy(args, 2, arguments, 0, args.length - 2); } - //TODO: Translate this. if (user.isAuthorized("essentials.sudo.exempt")) { - throw new Exception("You cannot sudo this user"); + throw new Exception(_("sudoExempt")); } - //TODO: Translate this. - sender.sendMessage("Forcing " + user.getDisplayName() + " to run: /" + command + " " + getFinalArg(arguments, 0)); + sender.sendMessage(_("sudoRun", user.getDisplayName(), command, getFinalArg(arguments, 0))); final PluginCommand execCommand = ess.getServer().getPluginCommand(command); if (execCommand != null) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java index 7ea3f0541..f65dc75f8 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java @@ -39,8 +39,7 @@ public class Commandtp extends EssentialsCommand default: if (!user.isAuthorized("essentials.tpohere")) { - //TODO: Translate this - throw new Exception("You need access to /tpohere to teleport other players."); + throw new Exception(_("needTpohere")); } user.sendMessage(_("teleporting")); final User target = getPlayer(server, args, 0); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index b41c3be0a..b6bbae274 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77You have been released heal=\u00a77You have been healed. healOther=\u00a77Healed {0}. helpConsole=To view help from the console, type ?. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: holeInFloor=Hole in floor @@ -130,6 +131,7 @@ invRestored=Your inventory has been restored. invSee=You see the inventory of {0}. invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. +invalidHome=Home {0} doesn't exist invalidMob=Invalid mob type. invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cYou do not have permission to change the nickname of nickSet=\u00a77Your nickname is now \u00a7c{0} noAccessCommand=\u00a7cYou do not have access to that command. noAccessPermission=\u00a7cYou do not have permission to access that {0}. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cYou do not have permission to destroy that {0}. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cNo matching commands. @@ -316,6 +319,7 @@ slimeMalformedSize=Malformed size. soloMob=That mob likes to be alone spawnSet=\u00a77Spawn location set for group {0}. spawned=spawned +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival @@ -410,4 +414,3 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 7973ce9f0..8f75f3a7b 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77Du er blevet l\u00f8sladt heal=\u00a77Du er blevet healed. healOther=\u00a77Healed {0}. helpConsole=For at se hj\u00e6lp fra konsolen, skriv ?. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f: holeInFloor=Hul i gulv @@ -130,6 +131,7 @@ invRestored=Din inventory er blevet genoprettet. invSee=Du ser {0}''s inventory. invSeeHelp=Brug /invsee for at genoprette din inventory. invalidCharge=\u00a7cUgyldig opladning (korrekt oversat?). +invalidHome=Home {0} doesn't exist invalidMob=Ugyldig mob type. invalidServer=Ugyldig server! invalidSignLine=Linje {0} p\u00e5 skilt er ugyldig. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cDu har ikke tilladelse til at \u00e6ndre en andens n nickSet=\u00a77Dit nickname er nu \u00a7c{0} noAccessCommand=\u00a7cDu har ikke adgang til denne kommando. noAccessPermission=\u00a7cDu har ikke tilladelse til at f\u00e5 adgang til {0}. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cDu har ikke tilladelse til at \u00f8del\u00e6gge {0}. noGodWorldWarning=\u00a7cAdvarsel! God mode er sl\u00c3\u00a5et fra i denne verden. noHelpFound=\u00a7cIngen matchende kommandoer. @@ -316,6 +319,7 @@ slimeMalformedSize=Forkert st\u00f8rrelse. (Korrekt oversat?) soloMob=Denne mob kan godt lide at v\u00e6re alene. Den hygger sig. spawnSet=\u00a77Spawnplacering fastsat for gruppe: {0}. spawned=spawnet +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Farvel grusomme verden... suicideSuccess= \u00a77{0} tog sit eget liv survival=survival @@ -410,4 +414,3 @@ year=\u00e5r years=\u00e5r youAreHealed=\u00a77Du er blevet healed. Halleluja! youHaveNewMail=\u00a7cDu har {0} flaskeposter!\u00a7f Type \u00a77/mail read for at se din flaskepost. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index ed3bc4285..b2e298442 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77Du wurdest frei gelassen. heal=\u00a77Du wurdest geheilt. healOther=\u00a77{0} geheilt. helpConsole=Um die Hilfe der Konsole zu sehen, schreibe ?. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[Hilfe]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Seite \u00a7c{0}\u00a7f von \u00a7c{1}\u00a7f: holeInFloor=Loch im Boden @@ -130,6 +131,7 @@ invRestored=Dein Inventar wurde wieder hergestellt. invSee=Du siehst das Inventar von {0}. invSeeHelp=Benutze /invsee um dein Inventar wiederherzustellen. invalidCharge=\u00a7cUng\u00fcltige Verf\u00fcgung. +invalidHome=Home {0} doesn't exist invalidMob=Ung\u00fcltiger Monstername. invalidServer=Ung\u00fcltiger Server! invalidSignLine=Die Zeile {0} auf dem Schild ist falsch. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cDu hast keine Rechte um den Nicknamen von anderen zu nickSet=\u00a77Dein Nickname ist nun \u00a7c{0} noAccessCommand=\u00a7cDu hast keinen Zugriff auf diesen Befehl. noAccessPermission=\u00a7cDu hast keine Rechte, den Block {0} zu \u00f6ffnen. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cDu hast keine Rechte, den Block {0} zu zerst\u00f6ren. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cKeine \u00fcbereinstimmenden Kommandos. @@ -316,6 +319,7 @@ slimeMalformedSize=Ung\u00fcltige Gr\u00f6sse. soloMob=Das Monster m\u00f6chte allein sein. spawnSet=\u00a77Spawn-Punkt gesetzt f\u00fcr Gruppe {0}. spawned=erzeugt +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Lebewohl grausame Welt... suicideSuccess= \u00a77{0} hat sich das Leben genommen. survival=survival @@ -410,4 +414,3 @@ year=Jahr years=Jahre youAreHealed=\u00a77Du wurdest geheilt. youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index e2582525f..2afb11651 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77You have been released heal=\u00a77You have been healed. healOther=\u00a77Healed {0}. helpConsole=To view help from the console, type ?. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: holeInFloor=Hole in floor @@ -130,6 +131,7 @@ invRestored=Your inventory has been restored. invSee=You see the inventory of {0}. invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. +invalidHome=Home {0} doesn't exist invalidMob=Invalid mob type. invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cYou do not have permission to change the nickname of nickSet=\u00a77Your nickname is now \u00a7c{0} noAccessCommand=\u00a7cYou do not have access to that command. noAccessPermission=\u00a7cYou do not have permission to access that {0}. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cYou do not have permission to destroy that {0}. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cNo matching commands. @@ -316,6 +319,7 @@ slimeMalformedSize=Malformed size. soloMob=That mob likes to be alone spawnSet=\u00a77Spawn location set for group {0}. spawned=spawned +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival @@ -410,4 +414,3 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index bbbd5e787..9d5954263 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77Has sido liberado heal=\u00a77Has sido curado. healOther=\u00a77Has curado a {0}. helpConsole=Para obtener ayuda de la consola, escribe ?. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f: holeInFloor=Agujero en el suelo @@ -130,6 +131,7 @@ invRestored=Tu inventario ha sido recuperado. invSee=Estas viendo el inventario de {0}. invSeeHelp=Usa /invsee para recuperar tu inventario. invalidCharge=\u00a7cCargo invalido. +invalidHome=Home {0} doesn't exist invalidMob=Mob invalido. invalidServer=Servidor invalido! invalidSignLine=Linea {0} en el signo es invalida. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cNo tienes permiso para cambiar el nombre de usuario nickSet=\u00a77Tu nombre es ahora \u00a7c{0} noAccessCommand=\u00a7cNo tienes acceso a ese comando. noAccessPermission=\u00a7cNo tienes permisos para hacer eso {0}. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cNo tienes permisos para destrozar eso {0}. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cNo hay comandos relacionados. @@ -316,6 +319,7 @@ slimeMalformedSize=Medidas malformadas. soloMob=A este mob le gusta estar solo spawnSet=\u00a77El lugar de nacimiento ha sido puesto para el grupo {0}. spawned=nacido +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Adios mundo cruel... suicideSuccess= \u00a77{0} se quito su propia vida survival=survival @@ -410,4 +414,3 @@ year=año years=años youAreHealed=\u00a77Has sido curado. youHaveNewMail=\u00a7cTienes {0} mensajes!\u00a7f Pon \u00a77/mail read\u00a7f para ver tus emails no leidos!. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index c012a6242..b1dd7bc0c 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77Vous avez \u00e9t\u00e9 lib\u00e9r\u00e9. heal=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9. healOther=\u00a77{0} a \u00e9t\u00e9 soign\u00e9. helpConsole=Pour voir l''aide tapez ? +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[Aide Admin]\u00a7f \u00a77{0} : \u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f sur \u00a7c{1}\u00a7f. holeInFloor=Trou dans le Sol. @@ -130,6 +131,7 @@ invRestored=Votre inventaire vous a \u00e9t\u00e9 rendu. invSee=Vous voyez l''inventaire de {0}. invSeeHelp=Utilisez /invsee pour revenir \u00e0 votre inventaire. invalidCharge=\u00a7cCharge invalide. +invalidHome=Home {0} doesn't exist invalidMob=Mauvias type de cr\u00e9ature. invalidServer=Serveur non valide. invalidSignLine=La ligne {0} du panneau est invalide. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cVous n'avez pas la permission de changer le surnom d nickSet=\u00a77Votre surnom est maintenant \u00a7c{0} noAccessCommand=\u00a7cVous n'avez pas acc\u00c3\u00a8s \u00e0 cette commande. noAccessPermission=\u00a7cVous n''avez pas la permissions d''acc\u00e9der \u00e0 cette {0} +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cVous n''avez pas la permission de d\u00e9truire ce {0}. noGodWorldWarning=\u00a7cWarning! Le mode Dieu est d\u00e9sactiv\u00e9 dans ce monde. noHelpFound=\u00a7cAucune commande correspondante. @@ -316,6 +319,7 @@ slimeMalformedSize=Taille mal form\u00e9e. soloMob=Ce cr\u00e9ature aime \u00eatre seul. spawnSet=\u00a77Le point de d\u00e9part a \u00e9t\u00e9 d\u00e9fini pour le groupe {0}. spawned=invoqu\u00e9(s) +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Au revoir monde cruel... suicideSuccess=\u00a77{0} s''est suicid\u00e9. survival=survie @@ -410,4 +414,3 @@ year=ann\u00e9e years=ann\u00e9es youAreHealed=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9. youHaveNewMail=\u00a7cVous avez {0} messages ! \u00a7fEntrez \u00a77/mail read\u00a7f pour voir votre courrier. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 66f9a74c0..9d4af2810 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77Je bent bevrijdt heal=\u00a77Je bent genezen. healOther=\u00a77Je geneezde {0}. helpConsole=type ? om de consolehelp weer te geven. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f: holeInFloor=Gat in de vloer @@ -130,6 +131,7 @@ invRestored=Je inventory is hersteld. invSee=Je kijkt naar de inventory van {0}. invSeeHelp=Type /invsee om je inventory te herstellen. invalidCharge=\u00a7cOngeldig te laden. +invalidHome=Home {0} doesn't exist invalidMob=Ongeldig mob type. invalidServer=Ongeldige server! invalidSignLine=Regel {0} op het bordje is ongeldig. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cJe hebt geen toestemming om de nickname van anderen nickSet=\u00a77Je nickname is nu \u00a7c{0} noAccessCommand=\u00a7cJe hebt geen toegang tot die opdracht. noAccessPermission=\u00a7cJe hebt hier geen toegang voor {0}. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cJe hebt geen toegang om dat te vernietigen {0}. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cNo matching commands. @@ -316,6 +319,7 @@ slimeMalformedSize=Misvoormde grootte. soloMob=Die mob is liever in zijn eentje spawnSet=\u00a77Spawn locatie voor de groep {0} ingesteld. spawned=gespawned +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Vaarwel vreedzame wereld... suicideSuccess= \u00a77{0} pleegde zelfmoord survival=survival @@ -410,4 +414,3 @@ year=jaar years=jaren youAreHealed=\u00a77Je bent genezen. youHaveNewMail=\u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken. -helpLine=\u00a76/{0}\u00a7f: {1}