mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-11-05 09:09:40 +01:00
Warning message if they've translated stuff but didn't enable translations
This commit is contained in:
parent
d0bb5021bf
commit
f254a99d89
@ -90,6 +90,7 @@ public enum TranslateType {
|
|||||||
try {
|
try {
|
||||||
config.load(getFile());
|
config.load(getFile());
|
||||||
int dupes = 0;
|
int dupes = 0;
|
||||||
|
int diff = 0;
|
||||||
|
|
||||||
for (String key : config.getKeys(false)) {
|
for (String key : config.getKeys(false)) {
|
||||||
String value = config.getString(key);
|
String value = config.getString(key);
|
||||||
@ -118,9 +119,18 @@ public enum TranslateType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
translated.put(newKey, ChatColor.translateAlternateColorCodes('&', value));
|
translated.put(newKey, ChatColor.translateAlternateColorCodes('&', value));
|
||||||
|
|
||||||
|
if (!newKey.equals(translated.get(newKey))) {
|
||||||
|
diff++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (diff > 0 && !DisguiseConfig.isUseTranslations()) {
|
||||||
|
DisguiseUtilities.getLogger().info(diff +
|
||||||
|
" translated strings, but translations has been disabled in config. Is this intended?");
|
||||||
|
}
|
||||||
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user