Load plugin translation files
@@ -3,6 +3,7 @@ package me.coley.recaf.plugin;
import me.coley.recaf.Recaf;
import me.coley.recaf.plugin.api.BasePlugin;
import me.coley.recaf.util.IOUtil;
+import me.coley.recaf.util.LangUtil;
import me.coley.recaf.util.VMUtil;
import org.objectweb.asm.ClassReader;
import org.plugface.core.PluginSource;
@@ -75,6 +76,10 @@ public class PluginFolderSource implements PluginSource {
BufferedImage image = ImageIO.read(jar.getInputStream(entry));
pluginIcons.put(pluginPath, image);
}
+ // Check for translation files
+ else if(entry.getName().endsWith(LangUtil.DEFAULT_LANGUAGE + ".json")){
+ LangUtil.load(jar.getInputStream(entry));
+ }
}
} catch(IOException ex) {
throw new PluginLoadException(path, ex, "Failed to load jar file");
