Skip to content

Commit

Permalink
Version 1.3.0
Browse files Browse the repository at this point in the history
FixTool, IdFetcherTool, and NormalizeTool now have proper translatable messages
  • Loading branch information
OpticFusion1 committed Sep 6, 2022
1 parent 43e45f2 commit edcd575
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 23 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>optic_fusion1</groupId>
<artifactId>Kitsune</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>

<build>
<resources>
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/optic_fusion1/kitsune/tool/impl/FixTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@
public class FixTool extends Tool {

public FixTool() {
super("fix", "Attempts to fix .class or .jar files to make them decompilable");
super("fix", tl("ft_desc"));
}

@Override
public void run(List<String> args) {
if (args.isEmpty()) {
LOGGER.info(tl("not_enough_args") + " " + tl("ft_usage"));
return;
}
File input = new File(args.get(0));
if (!checkFileExists(input)) {
LOGGER.info(tl("file_does_not_exist", input.toPath()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class IdFetcherTool extends Tool {
private boolean logInnerFiles;

public IdFetcherTool() {
super("idfetcher", "Returns the SHA1 of a file name & any inner classes (.zip, .rar, .jar)");
super("idfetcher", tl("ift_desc"));
VALID_FILE_EXTENSIONS.add("jar");
VALID_FILE_EXTENSIONS.add("zip");
VALID_FILE_EXTENSIONS.add("rar");
Expand All @@ -30,7 +30,7 @@ public IdFetcherTool() {
@Override
public void run(List<String> args) {
if (args.isEmpty()) {
LOGGER.info(tl("not_enough_args") + " " + tl("idfetcher_usage"));
LOGGER.info(tl("not_enough_args") + " " + tl("ift_usage"));
return;
}
if (args.contains("--logInnerFiles")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class NormalizeTool extends Tool {
private boolean showSha1Hash;

public NormalizeTool() {
super("String", "Allows you to normalize strings");
super("String", tl("nt_desc"));
}

@Override
Expand Down
22 changes: 13 additions & 9 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ st_usage=Usage: strings <all <directory_path>|file_path> [--normalize] [--remove
st_class_no_methods={0} has no methods. Skipping
st_class_no_fields={0} has no fields. Skipping

# FixTool
ft_desc=Attempts to fix .class or .jar files to make them decompilable
ftusage=fix <file>
invalid_extension={0} has an invalid extension. Fixing

# NormalizeTool
nt_desc=Allows you to normalize strings
nt_usage=normalize <string> [--showSHA1Hash]

# IdFetcherTool
ift_desc=Returns the SHA1 of a file name & any inner classes (.zip, .rar, .jar)
ift_usage=idfetcher <<file_name>|all <directory>>

# AnalyzeTool
at_desc=Analyzes a jar or class file and provides a detailed report
at_usage=Usage: analyze <file|all <directory>>
Expand Down Expand Up @@ -114,15 +127,6 @@ awtca_screen_cap_taken=Screen Capture Taken
awtca_get_default_toolkit=Gets the default Toolkit
awtca_get_screen_size=Gets the screen size

# FixTool
invalid_extension={0} has an invalid extension. Fixing

# NormalizeTool
nt_usage=normalize <string> [--showSHA1Hash]

# IdFetcherTool
idfetcher_usage=idfetcher <<file_name>|all <directory>>

# Unsorted
processing=Processing {0}:
writing_to_jar_file=Writing {0} to jar
Expand Down
22 changes: 13 additions & 9 deletions src/main/resources/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ st_usage=Usage: strings <all <directory_path>|file_path> [--normalize] [--remove
st_class_no_methods={0} has no methods. Skipping
st_class_no_fields={0} has no fields. Skipping

# FixTool
ft_desc=Attempts to fix .class or .jar files to make them decompilable
ftusage=fix <file>
invalid_extension={0} has an invalid extension. Fixing

# NormalizeTool
nt_desc=Allows you to normalize strings
nt_usage=normalize <string> [--showSHA1Hash]

# IdFetcherTool
ift_desc=Returns the SHA1 of a file name & any inner classes (.zip, .rar, .jar)
ift_usage=idfetcher <<file_name>|all <directory>>

# AnalyzeTool
at_desc=Analyzes a jar or class file and provides a detailed report
at_usage=Usage: analyze <file|all <directory>>
Expand Down Expand Up @@ -114,15 +127,6 @@ awtca_screen_cap_taken=Screen Capture Taken
awtca_get_default_toolkit=Gets the default Toolkit
awtca_get_screen_size=Gets the screen size

# FixTool
invalid_extension={0} has an invalid extension. Fixing

# NormalizeTool
nt_usage=normalize <string> [--showSHA1Hash]

# IdFetcherTool
idfetcher_usage=idfetcher <<file_name>|all <directory>>

# Unsorted
processing=Processing {0}:
writing_to_jar_file=Writing {0} to jar
Expand Down

0 comments on commit edcd575

Please sign in to comment.