From 5f0b4905aef914944c82799aceb60fa5f87c0881 Mon Sep 17 00:00:00 2001 From: Esophose Date: Thu, 12 Dec 2019 20:48:13 -0700 Subject: [PATCH] Lang file comments --- .../CommentedFileConfigurationHelper.java | 6 +- .../playerparticles/locale/EnglishLocale.java | 78 +++++++++------ .../playerparticles/locale/FrenchLocale.java | 78 +++++++++------ .../playerparticles/locale/GermanLocale.java | 79 +++++++++------ .../playerparticles/locale/RussianLocale.java | 95 +++++++++++++------ .../locale/SimplifiedChineseLocale.java | 78 +++++++++------ .../locale/VietnameseLocale.java | 78 +++++++++------ .../manager/ConfigurationManager.java | 45 ++++----- .../manager/LocaleManager.java | 26 +++-- 9 files changed, 362 insertions(+), 201 deletions(-) diff --git a/src/main/java/dev/esophose/playerparticles/config/CommentedFileConfigurationHelper.java b/src/main/java/dev/esophose/playerparticles/config/CommentedFileConfigurationHelper.java index 2db5078..be18062 100644 --- a/src/main/java/dev/esophose/playerparticles/config/CommentedFileConfigurationHelper.java +++ b/src/main/java/dev/esophose/playerparticles/config/CommentedFileConfigurationHelper.java @@ -192,10 +192,12 @@ public class CommentedFileConfigurationHelper { forceCompact = true; } - if (!compactLines && !forceCompact && ((lastLineSpacing != -1 && lineSpacing != lastLineSpacing) + if (!compactLines && !forceCompact && ( + (lastLineSpacing != -1 && lineSpacing != lastLineSpacing) || (commentSpacing != -1 && commentSpacing < lastCommentSpacing) || (lastLineHadContent && lineHadContent) - || (lineWasComment && lastLineHadContent))) { + || (lineWasComment && lastLineHadContent)) + && !(lastLineHadContent && !lineWasComment)) { stringBuilder.append('\n'); } diff --git a/src/main/java/dev/esophose/playerparticles/locale/EnglishLocale.java b/src/main/java/dev/esophose/playerparticles/locale/EnglishLocale.java index 28cc673..979c652 100644 --- a/src/main/java/dev/esophose/playerparticles/locale/EnglishLocale.java +++ b/src/main/java/dev/esophose/playerparticles/locale/EnglishLocale.java @@ -18,14 +18,12 @@ public class EnglishLocale implements Locale { @Override public Map getDefaultLocaleStrings() { return new LinkedHashMap() {{ - // Plugin Prefix + this.put("#0", "Plugin Message Prefix"); this.put("prefix", "&7[&3PlayerParticles&7] "); - // Command Errors + this.put("#1", "Command Description Messages"); this.put("command-error-no-effects", "&cYou must have access to effects to use this command!"); this.put("command-error-unknown", "&cUnknown command, use &b/pp help &cfor a list of commands."); - - // Command Descriptions this.put("command-descriptions", "&eThe following commands are available:"); this.put("command-descriptions-usage", "&e/pp %cmd% %args%"); this.put("command-descriptions-help-1", "&7> &b/pp %cmd% &e- %desc%"); @@ -50,7 +48,7 @@ public class EnglishLocale implements Locale { this.put("command-description-version", "Display the plugin version and author"); this.put("command-description-worlds", "Find out what worlds particles are disabled in"); - // Sub-Command Usage + this.put("#2", "Fixed Particle Command Description Messages"); this.put("command-description-fixed-create", "&e/pp fixed create < |>