Translations & Cleanup

This commit is contained in:
Konloch 2021-07-21 09:20:25 -07:00
parent 0898588be6
commit 296227360a

AI 샘플 코드 생성 중입니다

Loading...
5 changed files with 21 additions and 19 deletions

View File

@ -75,8 +75,6 @@ import static the.bytecode.club.bytecodeviewer.util.MiscUtils.guessLanguage;
* This is caused by the ctrlMouseWheelZoom code, a temporary patch is just removing it worst case
* + Versioning and updating need to be fixed
* + Fix classfile searcher
* + JHexEditor in dark mode is nearly unreadable -> Theme support
* + JHexEditor doesn't apply font size from settings
*
* TODO API BUGS:
* + All of the plugins that modify code need to include BytecodeViewer.updateAllClassNodeByteArrays();
@ -91,11 +89,11 @@ import static the.bytecode.club.bytecodeviewer.util.MiscUtils.guessLanguage;
* + Fix hook inject for EZ-Injection
*
* TODO FEATURES:
* + On refresh save position
* + System Consoles and Error Dialogs should create a new tab rather than a new window
* + On refresh save scroll position
* + Option to only compile currently viewed class (true by default)
* + CLI Headless needs to be supported
* + Add stackmapframes to bytecode decompiler
* + Add JEB decompiler optionally, requires them to add jeb library jar
* + Add https://github.com/exbin/bined as the replacement Hed Viewer/Editor
* + Make the decompilers launch in a separate process
* + Make it use that global last used file folder inside of export as jar
@ -108,6 +106,7 @@ import static the.bytecode.club.bytecodeviewer.util.MiscUtils.guessLanguage;
*
* TODO IDEAS:
* + App Bundle Support
* + Add JEB decompiler optionally, requires them to add jeb library jar
* + Add the setting to force all non-class resources to be opened with the Hex Viewer
* ^ Optionally a right-click menu open-as would work inside of the resource list
* + Allow class files to be opened without needing the .class extension
@ -177,6 +176,7 @@ public class BytecodeViewer
{
//precache settings file
SettingsSerializer.preloadSettingsFile();
//setup look and feel
Configuration.lafTheme.setLAF();
@ -244,6 +244,7 @@ public class BytecodeViewer
{
for (Process proc : createdProcesses)
proc.destroy();
SettingsSerializer.saveSettings();
cleanup();
}, "Shutdown Hook"));
@ -291,12 +292,9 @@ public class BytecodeViewer
resourceContainers.add(container);
SwingUtilities.invokeLater(() ->
{
try
{
try {
viewer.resourcePane.addResourceContainer(container);
}
catch (Exception e)
{
} catch (Exception e) {
e.printStackTrace();
}
});
@ -359,6 +357,7 @@ public class BytecodeViewer
for (ResourceContainer container : resourceContainers)
{
ClassNode node = container.getClassNode(name);
if (node != null)
return node;
}
@ -414,10 +413,10 @@ public class BytecodeViewer
/**
* Gets all of the loaded classes as an array list
* <p>
*
* TODO: remove this and replace it with:
* BytecodeViewer.getResourceContainers().forEach(container -> {
* execute(new ArrayList<>(container.resourceClasses.values()));
* execute(new ArrayList<>(container.resourceClasses.values()));
* });
*
* @return the loaded classes as an array list
@ -562,7 +561,7 @@ public class BytecodeViewer
*/
public static void showMessage(String message)
{
BetterJOptionPane.showMessageDialog(viewer, message);
ExtendedJOptionPane.showMessageDialog(viewer, message);
}
/**
@ -572,7 +571,7 @@ public class BytecodeViewer
*/
public static String showInput(String message)
{
return BetterJOptionPane.showInputDialog(viewer, message);
return ExtendedJOptionPane.showInputDialog(viewer, message);
}
/**
@ -681,9 +680,8 @@ public class BytecodeViewer
{
if (ask)
{
MultipleChoiceDialog dialog = new MultipleChoiceDialog("Bytecode Viewer - Reset Workspace",
"Are you sure you want to reset the workspace?" +
"\n\rIt will also reset your file navigator and search.",
MultipleChoiceDialog dialog = new MultipleChoiceDialog(TranslatedStrings.RESET_TITLE.toString(),
TranslatedStrings.RESET_CONFIRM.toString(),
new String[]{TranslatedStrings.YES.toString(), TranslatedStrings.NO.toString()});
if (dialog.promptChoice() != 0)

View File

@ -16,7 +16,7 @@ import static javax.swing.JOptionPane.*;
* @since 7/4/2021
*/
public class BetterJOptionPane
public class ExtendedJOptionPane
{
public static void showMessageDialog(Component parentComponent,
Object message) throws HeadlessException

View File

@ -77,7 +77,7 @@ public class SettingsDialog extends JScrollPane
public void showDialog()
{
BetterJOptionPane.showJPanelDialog(null, this, 460, dialogs::add);
ExtendedJOptionPane.showJPanelDialog(null, this, 460, dialogs::add);
}
private void buildPanel()

View File

@ -67,6 +67,8 @@ public enum TranslatedStrings
SELECT_EXTERNAL_PLUGIN_TITLE,
SELECT_EXTERNAL_PLUGIN_DESCRIPTION,
FOREIGN_LIBRARY_WARNING,
RESET_TITLE,
RESET_CONFIRM,
EXIT_TITLE,
EXIT_CONFIRM,
ABOUT_TITLE,

View File

@ -245,7 +245,9 @@
"SELECT_FILE_DESCRIPTION": "APKs, DEX, Class Files or Zip/Jar/War Archives",
"SELECT_EXTERNAL_PLUGIN_TITLE": "Select External Plugin",
"SELECT_EXTERNAL_PLUGIN_DESCRIPTION": "BCV External Plugin in js, java, python, ruby or groovy",
"FOREIGN_LIBRARY_WARNING": "WARNING: With this being toggled off outdated libraries will NOT be removed.\nIt's also a security issue.\nONLY TURN IT OFF IF YOU KNOW WHAT YOU'RE DOING.",
"FOREIGN_LIBRARY_WARNING": "WARNING: With this being toggled off outdated libraries will NOT be removed.\n\rIt's also a security issue.\n\rONLY TURN IT OFF IF YOU KNOW WHAT YOU'RE DOING.",
"RESET_TITLE": "{PRODUCT_NAME} - Reset Workspace",
"RESET_CONFIRM": "Are you sure you want to reset the workspace?\n\rIt will also reset your file navigator and search.",
"EXIT_TITLE": "{PRODUCT_NAME} - Exit",
"EXIT_CONFIRM": "Are you sure you want to exit?",
"ABOUT_TITLE": "{PRODUCT_NAME} - About - {WEBSITE} | {TBC}",