summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-09 02:42:20 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-09 02:42:20 +0000
commit0c334bc1e719ba0157905c44324eb2c3cd3bab9b (patch)
treeead93cdecf9f597dd6aa7873843411772e1707cd
parent3195470b1b9656f1e06fd7fec0fcfb236551b80b (diff)
downloadEssentials-0c334bc1e719ba0157905c44324eb2c3cd3bab9b.tar
Essentials-0c334bc1e719ba0157905c44324eb2c3cd3bab9b.tar.gz
Essentials-0c334bc1e719ba0157905c44324eb2c3cd3bab9b.tar.lz
Essentials-0c334bc1e719ba0157905c44324eb2c3cd3bab9b.tar.xz
Essentials-0c334bc1e719ba0157905c44324eb2c3cd3bab9b.zip
[trunk] Translation of Essentials to other languages. This is just a start, many strings needs to be added.
Console doesn't show umlauts, but in game chat does. New config property: locale git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1386 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/Settings.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandafk.java9
-rw-r--r--Essentials/src/messages.properties5
-rw-r--r--Essentials/src/messages_de.properties5
5 files changed, 22 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index 1a21f5b7b..725233cdf 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -23,7 +23,7 @@ import org.bukkit.plugin.java.*;
public class Essentials extends JavaPlugin
{
- public static final String AUTHORS = "Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology.";
+ public static final String AUTHORS = "Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology";
public static final int minBukkitBuildVersion = 740;
private static final Logger logger = Logger.getLogger("Minecraft");
private Settings settings;
@@ -94,6 +94,7 @@ public class Essentials extends JavaPlugin
confList = new ArrayList<IConf>();
settings = new Settings(this.getDataFolder());
confList.add(settings);
+ Util.updateLocale(settings.getLocale(), this.getDataFolder());
spawn = new Spawn(getServer(), this.getDataFolder());
confList.add(spawn);
warps = new Warps(getServer(), this.getDataFolder());
@@ -171,7 +172,7 @@ public class Essentials extends JavaPlugin
timer = new EssentialsTimer(this);
getScheduler().scheduleSyncRepeatingTask(this, timer, 1, 50);
- logger.info("Loaded " + this.getDescription().getName() + " build " + this.getDescription().getVersion() + " maintained by " + AUTHORS);
+ logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), AUTHORS));
}
public void onDisable()
diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java
index a394bcbdb..58dfbcee5 100644
--- a/Essentials/src/com/earth2me/essentials/Settings.java
+++ b/Essentials/src/com/earth2me/essentials/Settings.java
@@ -494,4 +494,8 @@ public class Settings implements IConf
return config.getBoolean("permission-based-item-spawn", false);
}
+ public String getLocale()
+ {
+ return config.getString("locale", "en_US");
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
index 7affce5d6..a222f9c0b 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandafk.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 Commandafk extends EssentialsCommand
@@ -18,11 +19,11 @@ public class Commandafk extends EssentialsCommand
if (!user.toggleAfk())
{
- user.sendMessage("§7You are no longer marked as away.");
- server.broadcastMessage("§7" + user.getDisplayName() + " is no longer AFK");
+ user.sendMessage(Util.i18n("markedAsNotAway"));
+ server.broadcastMessage(Util.format("userIsNotAway", user.getDisplayName()));
} else {
- user.sendMessage("§7You are now marked as away.");
- server.broadcastMessage("§7" + user.getDisplayName() + " is now AFK");
+ user.sendMessage(Util.i18n("markedAsAway"));
+ server.broadcastMessage(Util.format("userIsAway", user.getDisplayName()));
}
}
}
diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties
new file mode 100644
index 000000000..b54dfa64c
--- /dev/null
+++ b/Essentials/src/messages.properties
@@ -0,0 +1,5 @@
+loadinfo = Loaded {0} build {1} maintained by {2}
+markedAsNotAway = \u00a77You are no longer marked as away.
+markedAsAway = \u00a77You are now marked as away.
+userIsNotAway = {0} is no longer AFK
+userIsAway = {0} is now AFK \ No newline at end of file
diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties
new file mode 100644
index 000000000..675ec1e0d
--- /dev/null
+++ b/Essentials/src/messages_de.properties
@@ -0,0 +1,5 @@
+loadinfo = Plugin {0} Version {1} geladen, erstellt von {2}, \u00fcbersetzt von snowleo\n
+markedAsNotAway = \u00a77Du wirst nicht mehr als abwesend angezeigt.
+markedAsAway = \u00a77Du wirst als abwesend angezeigt.
+userIsNotAway = {0} ist wieder da.
+userIsAway = {0} ist abwesend. \ No newline at end of file