feat: make jadx-script-kotlin plugin external

This commit is contained in:
Skylot
2026-02-10 20:39:29 +00:00
parent 9710ebe09a
commit c7a0f7a092
101 changed files with 1717 additions and 1489 deletions
@@ -4,6 +4,7 @@ import java.io.IOException;
import java.io.Reader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
@@ -116,12 +117,25 @@ public class TestI18n {
fail("I18n file: " + path.getFileName() + " and " + DEFAULT_LANG_FILE + " differ in line " + line);
}
/**
* Temporary solution to allow use I18N strings in plugins until proper API implemented
*/
private static final List<String> EXCLUDED_KEYS = Arrays.asList(
// keys from `jadx-script-kotlin`
"tree.input_scripts",
"popup.new_script",
"popup.add_scripts",
"script.log",
"script.format",
"script.check");
@Test
public void keyIsUsed() throws IOException {
Properties properties = new Properties();
try (Reader reader = Files.newBufferedReader(i18nPath.resolve(DEFAULT_LANG_FILE))) {
properties.load(reader);
}
EXCLUDED_KEYS.forEach(properties.keySet()::remove);
Set<String> keys = new HashSet<>();
for (Object key : properties.keySet()) {
keys.add("\"" + key + '"');