From fd1c7f4fccad0367e14e591fe13e674da241cc90 Mon Sep 17 00:00:00 2001 From: snowleo Date: Sat, 6 Apr 2013 04:02:15 +0200 Subject: Moving all default messages back to the code, where they should be Also tweaking I18n class and YamlStorageWriter a bit --- .../src/com/earth2me/essentials/EssentialsConf.java | 16 ++++++++-------- .../src/com/earth2me/essentials/ISettings.java | 2 +- .../src/com/earth2me/essentials/Settings.java | 8 ++++---- .../src/com/earth2me/essentials/UserData.java | 2 +- Essentials2Compat/src/com/earth2me/essentials/Util.java | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'Essentials2Compat/src') diff --git a/Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java b/Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java index a76ebbe6c..936c790ae 100644 --- a/Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java @@ -47,7 +47,7 @@ public class EssentialsConf extends YamlConfiguration { if (!configFile.getParentFile().mkdirs()) { - LOGGER.log(Level.SEVERE, _("failedToCreateConfig", configFile.toString())); + LOGGER.log(Level.SEVERE, _("Failed to create config {0}", configFile.toString())); } } // This will delete files where the first character is 0. In most cases they are broken. @@ -90,22 +90,22 @@ public class EssentialsConf extends YamlConfiguration { if (templateName != null) { - LOGGER.log(Level.INFO, _("creatingConfigFromTemplate", configFile.toString())); + LOGGER.log(Level.INFO, _("Creating config from template: {0}", configFile.toString())); createFromTemplate(); } else { try { - LOGGER.log(Level.INFO, _("creatingEmptyConfig", configFile.toString())); + LOGGER.log(Level.INFO, _("Creating empty config: {0}", configFile.toString())); if (!configFile.createNewFile()) { - LOGGER.log(Level.SEVERE, _("failedToCreateConfig", configFile.toString())); + LOGGER.log(Level.SEVERE, _("Failed to create config {0}", configFile.toString())); } } catch (IOException ex) { - LOGGER.log(Level.SEVERE, _("failedToCreateConfig", configFile.toString()), ex); + LOGGER.log(Level.SEVERE, _("Failed to create config {0}", configFile.toString()), ex); } } } @@ -175,7 +175,7 @@ public class EssentialsConf extends YamlConfiguration istr = resourceClass.getResourceAsStream(templateName); if (istr == null) { - LOGGER.log(Level.SEVERE, _("couldNotFindTemplate", templateName)); + LOGGER.log(Level.SEVERE, _("Could not find template {0}", templateName)); return; } ostr = new FileOutputStream(configFile); @@ -190,7 +190,7 @@ public class EssentialsConf extends YamlConfiguration } catch (IOException ex) { - LOGGER.log(Level.SEVERE, _("failedToWriteConfig", configFile.toString()), ex); + LOGGER.log(Level.SEVERE, _("Failed to write config {0}", configFile.toString()), ex); } finally { @@ -214,7 +214,7 @@ public class EssentialsConf extends YamlConfiguration } catch (IOException ex) { - LOGGER.log(Level.SEVERE, _("failedToCloseConfig", configFile.toString()), ex); + LOGGER.log(Level.SEVERE, _("Failed to close config {0}", configFile.toString()), ex); } } } diff --git a/Essentials2Compat/src/com/earth2me/essentials/ISettings.java b/Essentials2Compat/src/com/earth2me/essentials/ISettings.java index 93fbd20b3..61cfcaad6 100644 --- a/Essentials2Compat/src/com/earth2me/essentials/ISettings.java +++ b/Essentials2Compat/src/com/earth2me/essentials/ISettings.java @@ -174,4 +174,4 @@ public interface ISettings public int getMailsPerMinute(); public void setEssentialsChatActive(boolean b); -} \ No newline at end of file +} diff --git a/Essentials2Compat/src/com/earth2me/essentials/Settings.java b/Essentials2Compat/src/com/earth2me/essentials/Settings.java index bec8c3356..f8062e886 100644 --- a/Essentials2Compat/src/com/earth2me/essentials/Settings.java +++ b/Essentials2Compat/src/com/earth2me/essentials/Settings.java @@ -446,7 +446,7 @@ public final class Settings implements ISettings } catch (Exception ex) { - logger.log(Level.SEVERE, _("unknownItemInList", itemName, "item-spawn-blacklist")); + logger.log(Level.SEVERE, _("Unknown item {0} in {1} list.", itemName, "item-spawn-blacklist")); } } return epItemSpwn; @@ -483,7 +483,7 @@ public final class Settings implements ISettings } catch (Exception ex) { - logger.log(Level.SEVERE, _("unknownItemInList", signName, "enabledSigns")); + logger.log(Level.SEVERE, _("Unknown item {0} in {1} list.", signName, "enabledSigns")); continue; } signsEnabled = true; @@ -579,7 +579,7 @@ public final class Settings implements ISettings } catch (Exception ex) { - logger.log(Level.SEVERE, _("unknownItemInList", itemName, configName)); + logger.log(Level.SEVERE, _("Unknown item {0} in {1} list.", itemName, configName)); } } return list; @@ -950,4 +950,4 @@ public final class Settings implements ISettings { return mailsPerMinute; } -} \ No newline at end of file +} diff --git a/Essentials2Compat/src/com/earth2me/essentials/UserData.java b/Essentials2Compat/src/com/earth2me/essentials/UserData.java index 9bb23345a..7acf309df 100644 --- a/Essentials2Compat/src/com/earth2me/essentials/UserData.java +++ b/Essentials2Compat/src/com/earth2me/essentials/UserData.java @@ -794,4 +794,4 @@ public class UserData { config.save(); } -} \ No newline at end of file +} diff --git a/Essentials2Compat/src/com/earth2me/essentials/Util.java b/Essentials2Compat/src/com/earth2me/essentials/Util.java index 0500df536..21ff4e8b4 100644 --- a/Essentials2Compat/src/com/earth2me/essentials/Util.java +++ b/Essentials2Compat/src/com/earth2me/essentials/Util.java @@ -108,4 +108,4 @@ public class Util } return input.substring(pos, pos + 2); } -} \ No newline at end of file +} -- cgit v1.2.3