Add system property to disable language loading from the (outdated) website when developing

This commit is contained in:
johni0702
2015-10-12 22:15:50 +02:00
parent 593a518fab
commit 4acfcdf720

View File

@@ -39,6 +39,9 @@ public class LocalizedResourcePack implements IResourcePack {
if(availableLanguages.containsKey(langcode)) return true; if(availableLanguages.containsKey(langcode)) return true;
if(!websiteAvailable) return false; if(!websiteAvailable) return false;
try { try {
if (Boolean.parseBoolean(System.getProperty("replaymod.offline", "false"))) {
return false;
}
String lang = ReplayMod.apiClient.getTranslation(langcode); String lang = ReplayMod.apiClient.getTranslation(langcode);
String prop = StringEscapeUtils.unescapeHtml4(lang); String prop = StringEscapeUtils.unescapeHtml4(lang);
availableLanguages.put(langcode, prop); availableLanguages.put(langcode, prop);