More Translations
This commit is contained in:
parent
87ff4bd291
commit
0898588be6
5 changed files with 51 additions and 19 deletions
|
@ -2,6 +2,7 @@ package the.bytecode.club.bytecodeviewer.api;
|
||||||
|
|
||||||
import the.bytecode.club.bytecodeviewer.gui.components.SystemConsole;
|
import the.bytecode.club.bytecodeviewer.gui.components.SystemConsole;
|
||||||
import the.bytecode.club.bytecodeviewer.plugin.PluginManager;
|
import the.bytecode.club.bytecodeviewer.plugin.PluginManager;
|
||||||
|
import the.bytecode.club.bytecodeviewer.translation.TranslatedStrings;
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
|
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
|
||||||
|
@ -29,11 +30,12 @@ import the.bytecode.club.bytecodeviewer.plugin.PluginManager;
|
||||||
|
|
||||||
public class PluginConsole extends SystemConsole
|
public class PluginConsole extends SystemConsole
|
||||||
{
|
{
|
||||||
|
//window showing is disabled to allow this frame to be added as a tab
|
||||||
private boolean showWindow;
|
private boolean showWindow;
|
||||||
|
|
||||||
public PluginConsole(String pluginName)
|
public PluginConsole(String pluginName)
|
||||||
{
|
{
|
||||||
super("Bytecode Viewer - Plugin Console - " + pluginName);
|
super(TranslatedStrings.PLUGIN_CONSOLE_TITLE + " - " + pluginName);
|
||||||
|
|
||||||
PluginManager.addConsole(this);
|
PluginManager.addConsole(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -809,7 +809,8 @@ public class MainViewerGUI extends JFrame
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void updateBusyStatus(final boolean busy) {
|
public synchronized void updateBusyStatus(final boolean busy)
|
||||||
|
{
|
||||||
SwingUtilities.invokeLater(() ->
|
SwingUtilities.invokeLater(() ->
|
||||||
{
|
{
|
||||||
if (busy)
|
if (busy)
|
||||||
|
@ -853,8 +854,8 @@ public class MainViewerGUI extends JFrame
|
||||||
|
|
||||||
public void reloadResources()
|
public void reloadResources()
|
||||||
{
|
{
|
||||||
MultipleChoiceDialog dialog = new MultipleChoiceDialog("Bytecode Viewer - Reload Resources",
|
MultipleChoiceDialog dialog = new MultipleChoiceDialog(TranslatedStrings.RELOAD_RESOURCES_TITLE.toString(),
|
||||||
"Are you sure you wish to reload the resources?",
|
TranslatedStrings.RELOAD_RESOURCES_CONFIRM.toString(),
|
||||||
new String[]{TranslatedStrings.YES.toString(), TranslatedStrings.NO.toString()});
|
new String[]{TranslatedStrings.YES.toString(), TranslatedStrings.NO.toString()});
|
||||||
|
|
||||||
if (dialog.promptChoice() == 0)
|
if (dialog.promptChoice() == 0)
|
||||||
|
@ -862,7 +863,8 @@ public class MainViewerGUI extends JFrame
|
||||||
LazyNameUtil.reset();
|
LazyNameUtil.reset();
|
||||||
ArrayList<File> reopen = new ArrayList<>();
|
ArrayList<File> reopen = new ArrayList<>();
|
||||||
|
|
||||||
for (ResourceContainer container : BytecodeViewer.resourceContainers) {
|
for (ResourceContainer container : BytecodeViewer.resourceContainers)
|
||||||
|
{
|
||||||
File newFile = new File(container.file.getParent() + fs + container.name);
|
File newFile = new File(container.file.getParent() + fs + container.name);
|
||||||
if (!container.file.getAbsolutePath().equals(newFile.getAbsolutePath()) &&
|
if (!container.file.getAbsolutePath().equals(newFile.getAbsolutePath()) &&
|
||||||
(container.file.getAbsolutePath().endsWith(".apk") || container.file.getAbsolutePath().endsWith(".dex"))) //APKs & dex get renamed
|
(container.file.getAbsolutePath().endsWith(".apk") || container.file.getAbsolutePath().endsWith(".dex"))) //APKs & dex get renamed
|
||||||
|
@ -875,7 +877,8 @@ public class MainViewerGUI extends JFrame
|
||||||
|
|
||||||
BytecodeViewer.resourceContainers.clear();
|
BytecodeViewer.resourceContainers.clear();
|
||||||
|
|
||||||
for (File f : reopen) {
|
for (File f : reopen)
|
||||||
|
{
|
||||||
BytecodeViewer.openFiles(new File[]{f}, false);
|
BytecodeViewer.openFiles(new File[]{f}, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,8 +888,8 @@ public class MainViewerGUI extends JFrame
|
||||||
|
|
||||||
public void selectFile()
|
public void selectFile()
|
||||||
{
|
{
|
||||||
final File file = DialogUtils.fileChooser("Select File or Folder to open in BCV",
|
final File file = DialogUtils.fileChooser(TranslatedStrings.SELECT_FILE_TITLE.toString(),
|
||||||
"APKs, DEX, Class Files or Zip/Jar/War Archives",
|
TranslatedStrings.SELECT_FILE_DESCRIPTION.toString(),
|
||||||
Constants.SUPPORTED_FILE_EXTENSIONS);
|
Constants.SUPPORTED_FILE_EXTENSIONS);
|
||||||
|
|
||||||
if(file == null)
|
if(file == null)
|
||||||
|
@ -899,8 +902,8 @@ public class MainViewerGUI extends JFrame
|
||||||
|
|
||||||
public void openExternalPlugin()
|
public void openExternalPlugin()
|
||||||
{
|
{
|
||||||
final File file = DialogUtils.fileChooser("Select External Plugin",
|
final File file = DialogUtils.fileChooser(TranslatedStrings.SELECT_EXTERNAL_PLUGIN_TITLE.toString(),
|
||||||
"External Plugin",
|
TranslatedStrings.SELECT_EXTERNAL_PLUGIN_DESCRIPTION.toString(),
|
||||||
Configuration.getLastPluginDirectory(),
|
Configuration.getLastPluginDirectory(),
|
||||||
PluginManager.fileFilter(),
|
PluginManager.fileFilter(),
|
||||||
Configuration::setLastPluginDirectory,
|
Configuration::setLastPluginDirectory,
|
||||||
|
@ -917,8 +920,8 @@ public class MainViewerGUI extends JFrame
|
||||||
|
|
||||||
public void askBeforeExiting()
|
public void askBeforeExiting()
|
||||||
{
|
{
|
||||||
MultipleChoiceDialog dialog = new MultipleChoiceDialog("Bytecode Viewer - Exit",
|
MultipleChoiceDialog dialog = new MultipleChoiceDialog(TranslatedStrings.EXIT_TITLE.toString(),
|
||||||
"Are you sure you want to exit?",
|
TranslatedStrings.EXIT_CONFIRM.toString(),
|
||||||
new String[]{TranslatedStrings.YES.toString(), TranslatedStrings.NO.toString()});
|
new String[]{TranslatedStrings.YES.toString(), TranslatedStrings.NO.toString()});
|
||||||
|
|
||||||
if (dialog.promptChoice() == 0)
|
if (dialog.promptChoice() == 0)
|
||||||
|
@ -931,10 +934,7 @@ public class MainViewerGUI extends JFrame
|
||||||
public void showForeignLibraryWarning()
|
public void showForeignLibraryWarning()
|
||||||
{
|
{
|
||||||
if (!deleteForeignOutdatedLibs.isSelected())
|
if (!deleteForeignOutdatedLibs.isSelected())
|
||||||
{
|
BytecodeViewer.showMessage(TranslatedStrings.FOREIGN_LIBRARY_WARNING.toString());
|
||||||
BytecodeViewer.showMessage("WARNING: With this being toggled off outdated libraries will NOT be "
|
|
||||||
+ "removed. It's also a security issue. ONLY TURN IT OFF IF YOU KNOW WHAT YOU'RE DOING.");
|
|
||||||
}
|
|
||||||
|
|
||||||
Configuration.deleteForeignLibraries = deleteForeignOutdatedLibs.isSelected();
|
Configuration.deleteForeignLibraries = deleteForeignOutdatedLibs.isSelected();
|
||||||
}
|
}
|
||||||
|
@ -957,6 +957,7 @@ public class MainViewerGUI extends JFrame
|
||||||
Configuration.rstaTheme.apply(viewerClass.bytecodeViewPanel2.textArea);
|
Configuration.rstaTheme.apply(viewerClass.bytecodeViewPanel2.textArea);
|
||||||
Configuration.rstaTheme.apply(viewerClass.bytecodeViewPanel3.textArea);
|
Configuration.rstaTheme.apply(viewerClass.bytecodeViewPanel3.textArea);
|
||||||
}
|
}
|
||||||
|
|
||||||
SwingUtilities.updateComponentTreeUI(BytecodeViewer.viewer);
|
SwingUtilities.updateComponentTreeUI(BytecodeViewer.viewer);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -7,6 +7,7 @@ import javax.swing.JScrollPane;
|
||||||
|
|
||||||
import the.bytecode.club.bytecodeviewer.bootloader.InitialBootScreen;
|
import the.bytecode.club.bytecodeviewer.bootloader.InitialBootScreen;
|
||||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||||
|
import the.bytecode.club.bytecodeviewer.translation.TranslatedStrings;
|
||||||
|
|
||||||
import static the.bytecode.club.bytecodeviewer.Configuration.*;
|
import static the.bytecode.club.bytecodeviewer.Configuration.*;
|
||||||
|
|
||||||
|
@ -29,7 +30,7 @@ import static the.bytecode.club.bytecodeviewer.Configuration.*;
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The about frame
|
* The about window - used to explain what BCV is, how to use it, etc.
|
||||||
*
|
*
|
||||||
* @author Konloch
|
* @author Konloch
|
||||||
*/
|
*/
|
||||||
|
@ -40,7 +41,7 @@ public class AboutWindow extends JFrame
|
||||||
{
|
{
|
||||||
this.setIconImages(IconResources.iconList);
|
this.setIconImages(IconResources.iconList);
|
||||||
setSize(InitialBootScreen.getSafeSize());
|
setSize(InitialBootScreen.getSafeSize());
|
||||||
setTitle("Bytecode Viewer - About - https://bytecodeviewer.com | https://the.bytecode.club");
|
setTitle(TranslatedStrings.ABOUT_TITLE.toString());
|
||||||
getContentPane().setLayout(new CardLayout(0, 0));
|
getContentPane().setLayout(new CardLayout(0, 0));
|
||||||
|
|
||||||
JScrollPane scrollPane = new JScrollPane();
|
JScrollPane scrollPane = new JScrollPane();
|
||||||
|
|
|
@ -59,6 +59,20 @@ public enum TranslatedStrings
|
||||||
RESULTS,
|
RESULTS,
|
||||||
SEARCH,
|
SEARCH,
|
||||||
|
|
||||||
|
|
||||||
|
RELOAD_RESOURCES_TITLE,
|
||||||
|
RELOAD_RESOURCES_CONFIRM,
|
||||||
|
SELECT_FILE_TITLE,
|
||||||
|
SELECT_FILE_DESCRIPTION,
|
||||||
|
SELECT_EXTERNAL_PLUGIN_TITLE,
|
||||||
|
SELECT_EXTERNAL_PLUGIN_DESCRIPTION,
|
||||||
|
FOREIGN_LIBRARY_WARNING,
|
||||||
|
EXIT_TITLE,
|
||||||
|
EXIT_CONFIRM,
|
||||||
|
ABOUT_TITLE,
|
||||||
|
PLUGIN_CONSOLE_TITLE,
|
||||||
|
|
||||||
|
|
||||||
YES,
|
YES,
|
||||||
NO,
|
NO,
|
||||||
ERROR2,
|
ERROR2,
|
||||||
|
@ -137,7 +151,7 @@ public enum TranslatedStrings
|
||||||
.replace("{PRODUCT_NAME}", PRODUCT_NAME.toString())
|
.replace("{PRODUCT_NAME}", PRODUCT_NAME.toString())
|
||||||
.replace("{PRODUCT-NAME}", PRODUCT_H_NAME.toString())
|
.replace("{PRODUCT-NAME}", PRODUCT_H_NAME.toString())
|
||||||
.replace("{PRODUCT}", PRODUCT.toString())
|
.replace("{PRODUCT}", PRODUCT.toString())
|
||||||
.replace("{TBV}", TBC.toString())
|
.replace("{TBC}", TBC.toString())
|
||||||
.replace("{WEBSITE}", WEBSITE.toString())
|
.replace("{WEBSITE}", WEBSITE.toString())
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -238,6 +238,20 @@
|
||||||
"RETAIN_REDUNDANT_CASTS": "Retain Redundant Casts",
|
"RETAIN_REDUNDANT_CASTS": "Retain Redundant Casts",
|
||||||
"UNICODE_OUTPUT_ENABLED": "Unicode Output Enabled",
|
"UNICODE_OUTPUT_ENABLED": "Unicode Output Enabled",
|
||||||
|
|
||||||
|
|
||||||
|
"RELOAD_RESOURCES_TITLE": "{PRODUCT_NAME} - Reload Resources",
|
||||||
|
"RELOAD_RESOURCES_CONFIRM": "Are you sure you wish to reload the resources?",
|
||||||
|
"SELECT_FILE_TITLE": "Select File or Folder to open in {BCV}",
|
||||||
|
"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.",
|
||||||
|
"EXIT_TITLE": "{PRODUCT_NAME} - Exit",
|
||||||
|
"EXIT_CONFIRM": "Are you sure you want to exit?",
|
||||||
|
"ABOUT_TITLE": "{PRODUCT_NAME} - About - {WEBSITE} | {TBC}",
|
||||||
|
"PLUGIN_CONSOLE_TITLE": "{PRODUCT_NAME} - Plugin Console",
|
||||||
|
|
||||||
|
|
||||||
"FILES": "Files",
|
"FILES": "Files",
|
||||||
"QUICK_FILE_SEARCH_NO_FILE_EXTENSION": "Quick file search (no file extension)",
|
"QUICK_FILE_SEARCH_NO_FILE_EXTENSION": "Quick file search (no file extension)",
|
||||||
"WORK_SPACE": "Work Space",
|
"WORK_SPACE": "Work Space",
|
||||||
|
|
Loading…
Reference in a new issue