Fix #1493 Extract handling of message file paths to a separate class with constants

This commit is contained in:
ljacqu
2019-06-22 22:37:32 +02:00
parent ff2f43bdc5
commit 4be130b71b
18 changed files with 210 additions and 75 deletions
@@ -8,6 +8,7 @@ import fr.xephi.authme.command.help.HelpMessage;
import fr.xephi.authme.command.help.HelpMessagesService;
import fr.xephi.authme.command.help.HelpSection;
import fr.xephi.authme.initialization.DataFolder;
import fr.xephi.authme.message.MessagePathHelper;
import fr.xephi.authme.permission.DefaultPermission;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.PluginSettings;
@@ -49,7 +50,7 @@ public class HelpTranslationGenerator {
*/
public File updateHelpFile() throws IOException {
String languageCode = settings.getProperty(PluginSettings.MESSAGES_LANGUAGE);
File helpFile = new File(dataFolder, "messages/help_" + languageCode + ".yml");
File helpFile = new File(dataFolder, MessagePathHelper.createHelpMessageFilePath(languageCode));
Map<String, Object> helpEntries = generateHelpMessageEntries();
String helpEntriesYaml = exportToYaml(helpEntries);