Skip to content

Commit 253be13

Browse files
committed
Load plugin translation files
1 parent 68096ac commit 253be13

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/me/coley/recaf/plugin/PluginFolderSource.java

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import me.coley.recaf.Recaf;
44
import me.coley.recaf.plugin.api.BasePlugin;
55
import me.coley.recaf.util.IOUtil;
6+
import me.coley.recaf.util.LangUtil;
67
import me.coley.recaf.util.VMUtil;
78
import org.objectweb.asm.ClassReader;
89
import org.plugface.core.PluginSource;
@@ -75,6 +76,10 @@ else if(entry.getName().endsWith("icon.png")) {
7576
BufferedImage image = ImageIO.read(jar.getInputStream(entry));
7677
pluginIcons.put(pluginPath, image);
7778
}
79+
// Check for translation files
80+
else if(entry.getName().endsWith(LangUtil.DEFAULT_LANGUAGE + ".json")){
81+
LangUtil.load(jar.getInputStream(entry));
82+
}
7883
}
7984
} catch(IOException ex) {
8085
throw new PluginLoadException(path, ex, "Failed to load jar file");

0 commit comments

Comments
 (0)