From 42ae063e41e6d69e05bb3972044522bb63bb2ed2 Mon Sep 17 00:00:00 2001 From: sekwah Date: Mon, 22 Jan 2018 21:50:22 +0000 Subject: [PATCH] Updated language translator --- Resources/lang/en_GB.lang | 12 ++++++------ src/com/sekwah/advancedportals/core/util/Lang.java | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Resources/lang/en_GB.lang b/Resources/lang/en_GB.lang index 52a7ee7b..3f1d90b7 100644 --- a/Resources/lang/en_GB.lang +++ b/Resources/lang/en_GB.lang @@ -12,16 +12,16 @@ # Also note that some debug messages may not be listed here for translation. # -messageprefix.positive=\u00Aa[\u00AeAdvancedPortals\u00Aa] -messageprefix.negative=\u00Ac[\u00A7AdvancedPortals\u00Ac] +messageprefix.positive=\u00A7a[\u00A7eAdvancedPortals\u00A7a] +messageprefix.negative=\u00A7c[\u00A77AdvancedPortals\u00A7c] logger.pluginenable=Advanced portals have been successfully enabled! logger.plugindisable=Advanced portals are being disabled! logger.plugincrafterror=This version of craftbukkit is not yet supported or something went wrong, please post this message with the version number and the above stacktrace in an issue on GitHub v:%1$s -command.noargs=Sorry but you need to specify a sub command, please use \u00Ae/%1$s help \u00Acif you would like a list of possible sub commands. +command.noargs=Sorry but you need to specify a sub command, please use \u00A7e/%1$s help \u00A7cif you would like a list of possible sub commands. -command.help.header=\u00Ae--------- \u00Aa%1$s Help - Page %2$s of %3$s\u00Ae --------------- -command.help.invalidnum=Sorry but \u00Ae%1$s\u00Ac is not a valid page number. +command.help.header=\u00A7e--------- \u00A7a%1$s Help - Page %2$s of %3$s\u00A7e --------------- +command.help.invalidnum=Sorry but \u00A7e%1$s\u00A7c is not a valid page number. -command.subcommand.nopermission=Sorry but you don't have permission for that, please use \u00Ae/%1$s help \u00Acif you would like a list of possible sub commands. +command.subcommand.nopermission=Sorry but you don't have permission for that, please use \u00A7e/%1$s help \u00A7cif you would like a list of possible sub commands. diff --git a/src/com/sekwah/advancedportals/core/util/Lang.java b/src/com/sekwah/advancedportals/core/util/Lang.java index 03a03ad2..78092451 100644 --- a/src/com/sekwah/advancedportals/core/util/Lang.java +++ b/src/com/sekwah/advancedportals/core/util/Lang.java @@ -42,6 +42,7 @@ public class Lang { public static String translateInsertVariables(String s, Object... args) { String translation = instance.translate(s); for (int i = 1; i <= args.length; i++) { + System.out.printf("Replace %s with %s%n", "%" + i + "$s", args[i-1].toString());; translation = translation.replaceAll("%" + i + "$s", args[i-1].toString()); } return translation; @@ -50,6 +51,7 @@ public class Lang { public static String translateInsertVariablesColor(String s, Object... args) { String translation = instance.translateColor(s); for (int i = 1; i <= args.length; i++) { + System.out.printf("Replace %s with %s%n", "%" + i + "$s", args[i-1].toString());; translation = translation.replaceAll("%" + i + "$s", args[i-1].toString()); } return translation;