diff --git a/trunk/src/com/jpexs/decompiler/flash/TagNode.java b/trunk/src/com/jpexs/decompiler/flash/TagNode.java index ce1ca1e47..bb095c930 100644 --- a/trunk/src/com/jpexs/decompiler/flash/TagNode.java +++ b/trunk/src/com/jpexs/decompiler/flash/TagNode.java @@ -56,6 +56,7 @@ public class TagNode { public List subItems; public Object tag; public boolean export = false; + public String mark; public List getAllSubs() { List ret = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/DialogMissingSymbolHandler.java b/trunk/src/com/jpexs/decompiler/flash/abc/gui/DialogMissingSymbolHandler.java deleted file mode 100644 index 1eb4375c9..000000000 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/DialogMissingSymbolHandler.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2010-2013 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.gui; - -import com.jpexs.decompiler.flash.abc.avm2.parser.MissingSymbolHandler; -import javax.swing.JOptionPane; - -public class DialogMissingSymbolHandler implements MissingSymbolHandler { - - @Override - public boolean missingString(String value) { - return JOptionPane.showConfirmDialog(null, "String \"" + value + "\" is not present in constants table. Do you want to add it?", "Add String", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION; - } - - @Override - public boolean missingInt(long value) { - return JOptionPane.showConfirmDialog(null, "Integer value \"" + value + "\" is not present in constants table. Do you want to add it?", "Add Integer", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION; - } - - @Override - public boolean missingUInt(long value) { - return JOptionPane.showConfirmDialog(null, "Unsigned integer value \"" + value + "\" is not present in constants table. Do you want to add it?", "Add Unsigned integer", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION; - } - - @Override - public boolean missingDouble(double value) { - return JOptionPane.showConfirmDialog(null, "Double value \"" + value + "\" is not present in constants table. Do you want to add it?", "Add Double", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION; - } -} diff --git a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java index 25fc9cf4a..8a5947469 100644 --- a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java +++ b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java @@ -1358,7 +1358,7 @@ public class Graph { if (debugMode) { - System.err.println("PART " + part+" nextsize:"+part.nextParts.size()); + System.err.println("PART " + part + " nextsize:" + part.nextParts.size()); } /*while (((part != null) && (part.getHeight() == 1)) && (code.size() > part.start) && (code.get(part.start).isJump())) { //Parts with only jump in it gets ignored diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/AboutDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/AboutDialog.java index abf1e5b9c..034a418b4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/AboutDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/AboutDialog.java @@ -28,12 +28,12 @@ import javax.swing.SwingConstants; * * @author JPEXS */ -public class AboutDialog extends JDialog { +public class AboutDialog extends AppDialog { public AboutDialog() { setDefaultCloseOperation(HIDE_ON_CLOSE); setSize(new Dimension(300, 270)); - setTitle("About"); + setTitle(translate("dialog.title")); Container cp = getContentPane(); @@ -56,14 +56,14 @@ public class AboutDialog extends JDialog { decLabel.setHorizontalAlignment(SwingConstants.CENTER); cp.add(decLabel); - JLabel verLabel = new JLabel("version " + Main.version); + JLabel verLabel = new JLabel(translate("version") + " " + Main.version); verLabel.setPreferredSize(new Dimension(300, 15)); verLabel.setFont(new Font("Tahoma", Font.BOLD, 15)); verLabel.setHorizontalAlignment(SwingConstants.CENTER); cp.add(verLabel); - JLabel byLabel = new JLabel("by"); + JLabel byLabel = new JLabel(translate("by")); byLabel.setPreferredSize(new Dimension(300, 15)); byLabel.setHorizontalAlignment(SwingConstants.CENTER); cp.add(byLabel); @@ -86,7 +86,7 @@ public class AboutDialog extends JDialog { wwwLabel.setHorizontalAlignment(SwingConstants.CENTER); cp.add(wwwLabel); - JButton okButton = new JButton("OK"); + JButton okButton = new JButton(translate("button.ok")); cp.add(okButton); okButton.addActionListener(new ActionListener() { @Override @@ -98,5 +98,6 @@ public class AboutDialog extends JDialog { setModal(true); View.centerScreen(this); View.setWindowIcon(this); + setResizable(false); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/AppDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/AppDialog.java new file mode 100644 index 000000000..54de9e8cd --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/AppDialog.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2013 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.jpexs.decompiler.flash.gui; + +import com.jpexs.decompiler.flash.Configuration; +import java.util.Locale; +import java.util.ResourceBundle; +import javax.swing.JDialog; + +/** + * + * @author JPEXS + */ +public abstract class AppDialog extends JDialog { + + private ResourceBundle resourceBundle = ResourceBundle.getBundle(AppStrings.getResourcePath(getClass()), Configuration.containsConfig("locale") ? Locale.forLanguageTag((String) Configuration.getConfig("locale", "en")) : Locale.getDefault()); + + public AppDialog() { + View.installEscapeCloseOperation(this); + } + + public String translate(String key) { + return resourceBundle.getString(key); + } +} diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/AppFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/AppFrame.java new file mode 100644 index 000000000..cad70ab8d --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/AppFrame.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2013 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.jpexs.decompiler.flash.gui; + +import com.jpexs.decompiler.flash.Configuration; +import java.util.Locale; +import java.util.ResourceBundle; +import javax.swing.JFrame; + +/** + * + * @author JPEXS + */ +public abstract class AppFrame extends JFrame { + + private ResourceBundle resourceBundle = ResourceBundle.getBundle(AppStrings.getResourcePath(getClass()), Configuration.containsConfig("locale") ? Locale.forLanguageTag((String) Configuration.getConfig("locale", "en")) : Locale.getDefault()); + + public String translate(String key) { + return resourceBundle.getString(key); + } +} diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/AppStrings.java b/trunk/src/com/jpexs/decompiler/flash/gui/AppStrings.java new file mode 100644 index 000000000..4cc5082e4 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/AppStrings.java @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2013 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.jpexs.decompiler.flash.gui; + +import com.jpexs.decompiler.flash.Configuration; +import java.util.Locale; +import java.util.ResourceBundle; + +/** + * + * @author JPEXS + */ +public class AppStrings { + + private static ResourceBundle resourceBundle = ResourceBundle.getBundle(getResourcePath(MainFrame.class), Configuration.containsConfig("locale") ? Locale.forLanguageTag((String) Configuration.getConfig("locale", "en")) : Locale.getDefault()); + + public static String getResourcePath(Class cls) { + String name = cls.getName(); + if (name.startsWith("com.jpexs.decompiler.flash.gui.")) { + name = name.substring("com.jpexs.decompiler.flash.gui.".length()); + name = "com.jpexs.decompiler.flash.gui.resources." + name; + } + return name; + } + + public static String translate(String key) { + return resourceBundle.getString(key); + } + + public static String translate(String bundle, String key) { + ResourceBundle b = ResourceBundle.getBundle(bundle, Configuration.containsConfig("locale") ? Locale.forLanguageTag((String) Configuration.getConfig("locale", "en")) : Locale.getDefault()); + return b.getString(key); + } +} diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java index d2cf640ec..dbdd00c6c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java @@ -14,24 +14,24 @@ import javax.swing.JLabel; * * @author JPEXS */ -public class ExportDialog extends JDialog { +public class ExportDialog extends AppDialog { boolean cancelled = false; String options[][] = { - {"SVG"}, - {"Plain Text", "Formatted text"}, - {"PNG/JPEG"}, - {"FLV (No audio)"}, - {"MP3/WAV/FLV", "FLV (Audio only)"}, - {"AS", "PCODE"} + {translate("shapes.svg")}, + {translate("texts.plain"), translate("texts.formatted")}, + {translate("images.pngjpeg")}, + {translate("movies.flv")}, + {translate("sounds.mp3wavflv"), translate("sounds.flv")}, + {translate("actionscript.as"), translate("actionscript.pcode")} }; String optionNames[] = { - "Shapes", - "Texts", - "Images", - "Movies", - "Sounds", - "ActionScript" + translate("shapes"), + translate("texts"), + translate("images"), + translate("movies"), + translate("sounds"), + translate("actionscript") }; public static final int OPTION_SHAPES = 0; public static final int OPTION_TEXTS = 1; @@ -46,7 +46,7 @@ public class ExportDialog extends JDialog { } public ExportDialog() { - setTitle("Export..."); + setTitle(translate("dialog.title")); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { @@ -71,7 +71,7 @@ public class ExportDialog extends JDialog { top += 10; - JButton okButton = new JButton("OK"); + JButton okButton = new JButton(translate("button.ok")); okButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -80,7 +80,7 @@ public class ExportDialog extends JDialog { }); okButton.setBounds(43, top, 75, 25); - JButton cancelButton = new JButton("Cancel"); + JButton cancelButton = new JButton(translate("button.cancel")); cancelButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java index fe18b06b8..a1a988d2e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java @@ -37,7 +37,7 @@ import javax.swing.JScrollPane; * * @author JPEXS */ -public class GraphFrame extends JFrame { +public class GraphFrame extends AppFrame { private class GraphPanel extends JPanel { @@ -246,7 +246,7 @@ public class GraphFrame extends JFrame { Container cnt = getContentPane(); cnt.setLayout(new BorderLayout()); gp = new GraphPanel(graph); - setTitle("Graph " + name); + setTitle(translate("graph") + " " + name); cnt.add(new JScrollPane(gp)); View.setWindowIcon(this); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/GraphTreeFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/GraphTreeFrame.java index dfab26417..350ad2394 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/GraphTreeFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/GraphTreeFrame.java @@ -30,7 +30,7 @@ import javax.swing.tree.TreePath; * * @author JPEXS */ -public class GraphTreeFrame extends JFrame { +public class GraphTreeFrame extends AppFrame { public JTree graphTree; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Language.java b/trunk/src/com/jpexs/decompiler/flash/gui/Language.java new file mode 100644 index 000000000..5da6639e6 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Language.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2013 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.jpexs.decompiler.flash.gui; + +/** + * + * @author JPEXS + */ +public class Language { + + public String code; + public String name; + + public Language(String code, String name) { + this.code = code; + this.name = name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/LoadingDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/LoadingDialog.java index 9728122ce..1bf02c1e4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/LoadingDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/LoadingDialog.java @@ -21,7 +21,6 @@ import java.awt.Dimension; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.image.ImageObserver; -import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JProgressBar; @@ -32,7 +31,7 @@ import javax.swing.SwingConstants; * * @author JPEXS */ -public class LoadingDialog extends JFrame implements ImageObserver { +public class LoadingDialog extends AppDialog implements ImageObserver { private JLabel detailLabel = new JLabel("", JLabel.CENTER); private LoadingPanel loadingPanel; @@ -60,7 +59,7 @@ public class LoadingDialog extends JFrame implements ImageObserver { public LoadingDialog() { setResizable(false); setTitle(Main.shortApplicationVerName); - setSize(250, 150); + setSize(275, 150); setLayout(new BorderLayout()); loadingPanel = new LoadingPanel(50, 50); @@ -69,10 +68,10 @@ public class LoadingDialog extends JFrame implements ImageObserver { JPanel pan = new JPanel(); pan.setLayout(null); pan.setPreferredSize(new Dimension(120, 150)); - JLabel loadingLabel = new JLabel("Loading, please wait..."); - loadingLabel.setBounds(0, 30, 125, 20); + JLabel loadingLabel = new JLabel(translate("loadingpleasewait")); + loadingLabel.setBounds(0, 30, 150, 20); loadingLabel.setHorizontalAlignment(SwingConstants.CENTER); - detailLabel.setBounds(0, 45, 125, 20); + detailLabel.setBounds(0, 45, 150, 20); progressBar.setBounds(0, 70, 125, 25); pan.add(loadingLabel); pan.add(detailLabel); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java index 415eef07d..4007db51a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java @@ -59,6 +59,7 @@ import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.SwingWorker; import javax.swing.filechooser.FileFilter; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; /** * Main executable class @@ -193,13 +194,13 @@ public class Main { startWork((String) data); } if (event.equals("getVariables")) { - startWork("Getting variables..." + (String) data); + startWork(translate("work.gettingvariables") + "..." + (String) data); } if (event.equals("deobfuscate")) { - startWork("Deobfuscating..." + (String) data); + startWork(translate("work.deobfuscating") + "..." + (String) data); } if (event.equals("rename")) { - startWork("Renaming..." + (String) data); + startWork(translate("work.renaming") + "..." + (String) data); } } }); @@ -217,17 +218,18 @@ public class Main { @Override protected Object doInBackground() throws Exception { try { - Main.startWork("Reading SWF..."); + Main.startWork(translate("work.reading.swf") + "..."); swf = parseSWF(Main.file); } catch (Exception ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); JOptionPane.showMessageDialog(null, "Cannot load SWF file."); loadingDialog.setVisible(false); + exit(); return false; } try { - Main.startWork("Creating window..."); + Main.startWork(translate("work.creatingwindow") + "..."); mainFrame = new MainFrame(swf); loadingDialog.setVisible(false); mainFrame.setVisible(true); @@ -255,6 +257,18 @@ public class Main { public static boolean saveFileDialog() { JFileChooser fc = new JFileChooser(); fc.setCurrentDirectory(new File((String) Configuration.getConfig("lastSaveDir", "."))); + fc.setFileFilter(new FileFilter() { + @Override + public boolean accept(File f) { + return (f.getName().endsWith(".swf")) || (f.isDirectory()); + } + + @Override + public String getDescription() { + return translate("filter.swf"); + } + }); + fc.setAcceptAllFileFilterUsed(false); JFrame f = new JFrame(); View.setWindowIcon(f); int returnVal = fc.showSaveDialog(f); @@ -266,7 +280,7 @@ public class Main { maskURL = null; return true; } catch (IOException ex) { - JOptionPane.showMessageDialog(null, "Cannot write to the file"); + JOptionPane.showMessageDialog(null, translate("error.file.write")); } } return false; @@ -284,7 +298,7 @@ public class Main { @Override public String getDescription() { - return "SWF files (*.swf)"; + return translate("filter.swf"); } }); JFrame f = new JFrame(); @@ -680,9 +694,9 @@ public class Main { proxyFrame.switchState(); if (stopMenuItem != null) { if (proxyFrame.isRunning()) { - stopMenuItem.setLabel("Stop proxy"); + stopMenuItem.setLabel(translate("proxy.stop")); } else { - stopMenuItem.setLabel("Start proxy"); + stopMenuItem.setLabel(translate("proxy.start")); } } } @@ -693,7 +707,7 @@ public class Main { } if (SystemTray.isSupported()) { SystemTray tray = SystemTray.getSystemTray(); - trayIcon = new TrayIcon(View.loadImage("proxy16"), vendor + " " + shortApplicationName + " Proxy"); + trayIcon = new TrayIcon(View.loadImage("proxy16"), vendor + " " + shortApplicationName + " " + translate("proxy")); trayIcon.setImageAutoSize(true); PopupMenu trayPopup = new PopupMenu(); @@ -717,16 +731,16 @@ public class Main { }; - MenuItem showMenuItem = new MenuItem("Show proxy"); + MenuItem showMenuItem = new MenuItem(translate("proxy.show")); showMenuItem.setActionCommand("SHOW"); showMenuItem.addActionListener(trayListener); trayPopup.add(showMenuItem); - stopMenuItem = new MenuItem("Start proxy"); + stopMenuItem = new MenuItem(translate("proxy.start")); stopMenuItem.setActionCommand("SWITCH"); stopMenuItem.addActionListener(trayListener); trayPopup.add(stopMenuItem); trayPopup.addSeparator(); - MenuItem exitMenuItem = new MenuItem("Exit"); + MenuItem exitMenuItem = new MenuItem(translate("exit")); exitMenuItem.setActionCommand("EXIT"); exitMenuItem.addActionListener(trayListener); trayPopup.add(exitMenuItem); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java index 569a369f8..f7a58bf3a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java @@ -25,14 +25,14 @@ import com.jpexs.decompiler.flash.TagNode; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.RenameType; import com.jpexs.decompiler.flash.abc.ScriptPack; -import com.jpexs.decompiler.flash.abc.gui.ABCPanel; -import com.jpexs.decompiler.flash.abc.gui.ClassesListTreeModel; -import com.jpexs.decompiler.flash.abc.gui.DeobfuscationDialog; -import com.jpexs.decompiler.flash.abc.gui.LineMarkedEditorPane; -import com.jpexs.decompiler.flash.abc.gui.TreeElement; +import com.jpexs.decompiler.flash.gui.abc.ABCPanel; +import com.jpexs.decompiler.flash.gui.abc.ClassesListTreeModel; +import com.jpexs.decompiler.flash.gui.abc.DeobfuscationDialog; +import com.jpexs.decompiler.flash.gui.abc.LineMarkedEditorPane; +import com.jpexs.decompiler.flash.gui.abc.TreeElement; import com.jpexs.decompiler.flash.abc.types.traits.Trait; import com.jpexs.decompiler.flash.abc.types.traits.TraitClass; -import com.jpexs.decompiler.flash.action.gui.ActionPanel; +import com.jpexs.decompiler.flash.gui.action.ActionPanel; import static com.jpexs.decompiler.flash.gui.Main.isAssociated; import com.jpexs.decompiler.flash.gui.player.FlashPlayerPanel; import com.jpexs.decompiler.flash.helpers.Helper; @@ -174,12 +174,11 @@ import javax.swing.tree.TreeSelectionModel; * * @author Jindra */ -public class MainFrame extends JFrame implements ActionListener, TreeSelectionListener { +public class MainFrame extends AppFrame implements ActionListener, TreeSelectionListener { private SWF swf; public ABCPanel abcPanel; public ActionPanel actionPanel; - private JTabbedPane tabPane; public LoadingPanel loadingPanel = new LoadingPanel(20, 20); public JLabel statusLabel = new JLabel(""); public JPanel statusPanel = new JPanel(); @@ -277,7 +276,6 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi h = dim.height; } setSize(w, h); - tabPane = new JTabbedPane(); View.setWindowIcon(this); addComponentListener(new ComponentAdapter() { @Override @@ -306,29 +304,29 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } catch (FlashUnsupportedException fue) { } - JMenu menuFile = new JMenu("File"); - JMenuItem miOpen = new JMenuItem("Open..."); + JMenu menuFile = new JMenu(translate("menu.file")); + JMenuItem miOpen = new JMenuItem(translate("menu.file.open")); miOpen.setIcon(View.getIcon("open16")); miOpen.setActionCommand("OPEN"); miOpen.addActionListener(this); - JMenuItem miSave = new JMenuItem("Save"); + JMenuItem miSave = new JMenuItem(translate("menu.file.save")); miSave.setIcon(View.getIcon("save16")); miSave.setActionCommand("SAVE"); miSave.addActionListener(this); - JMenuItem miSaveAs = new JMenuItem("Save as..."); + JMenuItem miSaveAs = new JMenuItem(translate("menu.file.saveas")); miSaveAs.setIcon(View.getIcon("saveas16")); miSaveAs.setActionCommand("SAVEAS"); miSaveAs.addActionListener(this); - JMenuItem menuExportFla = new JMenuItem("Export to FLA"); + JMenuItem menuExportFla = new JMenuItem(translate("menu.file.export.fla")); menuExportFla.setActionCommand("EXPORTFLA"); menuExportFla.addActionListener(this); menuExportFla.setIcon(View.getIcon("flash16")); - JMenuItem menuExportAll = new JMenuItem("Export all parts"); + JMenuItem menuExportAll = new JMenuItem(translate("menu.file.export.all")); menuExportAll.setActionCommand("EXPORT"); menuExportAll.addActionListener(this); - JMenuItem menuExportSel = new JMenuItem("Export selection"); + JMenuItem menuExportSel = new JMenuItem(translate("menu.file.export.selection")); menuExportSel.setActionCommand("EXPORTSEL"); menuExportSel.addActionListener(this); menuExportAll.setIcon(View.getIcon("export16")); @@ -343,60 +341,60 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi menuFile.add(menuExportAll); menuFile.add(menuExportSel); menuFile.addSeparator(); - JMenuItem miClose = new JMenuItem("Exit"); + JMenuItem miClose = new JMenuItem(translate("menu.file.exit")); miClose.setIcon(View.getIcon("exit16")); miClose.setActionCommand("EXIT"); miClose.addActionListener(this); menuFile.add(miClose); menuBar.add(menuFile); - JMenu menuDeobfuscation = new JMenu("Deobfuscation"); + JMenu menuDeobfuscation = new JMenu(translate("menu.tools.deobfuscation")); menuDeobfuscation.setIcon(View.getIcon("deobfuscate16")); - JMenuItem miDeobfuscation = new JMenuItem("PCode deobfuscation..."); + JMenuItem miDeobfuscation = new JMenuItem(translate("menu.tools.deobfuscation.pcode")); miDeobfuscation.setActionCommand("DEOBFUSCATE"); miDeobfuscation.addActionListener(this); - autoDeobfuscateMenuItem = new JCheckBoxMenuItem("Automatic deobfuscation"); + autoDeobfuscateMenuItem = new JCheckBoxMenuItem(translate("menu.settings.autodeobfuscation")); autoDeobfuscateMenuItem.setState((Boolean) Configuration.getConfig("autoDeobfuscate", true)); autoDeobfuscateMenuItem.addActionListener(this); autoDeobfuscateMenuItem.setActionCommand("AUTODEOBFUSCATE"); - JCheckBoxMenuItem miSubLimiter = new JCheckBoxMenuItem("Enable sub limiter"); - miSubLimiter.setActionCommand("SUBLIMITER"); - miSubLimiter.addActionListener(this); - - JMenuItem miRenameOneIdentifier = new JMenuItem("Globally rename identifier"); + /* JCheckBoxMenuItem miSubLimiter = new JCheckBoxMenuItem("Enable sub limiter"); + miSubLimiter.setActionCommand("SUBLIMITER"); + miSubLimiter.addActionListener(this); + */ + JMenuItem miRenameOneIdentifier = new JMenuItem(translate("menu.tools.deobfuscation.globalrename")); miRenameOneIdentifier.setActionCommand("RENAMEONEIDENTIFIER"); miRenameOneIdentifier.addActionListener(this); - JMenuItem miRenameIdentifiers = new JMenuItem("Rename invalid identifiers"); + JMenuItem miRenameIdentifiers = new JMenuItem(translate("menu.tools.deobfuscation.renameinvalid")); miRenameIdentifiers.setActionCommand("RENAMEIDENTIFIERS"); miRenameIdentifiers.addActionListener(this); - JMenuItem miRemoveDeadCode = new JMenuItem("Remove dead code"); - miRemoveDeadCode.setActionCommand("REMOVEDEADCODE"); - miRemoveDeadCode.addActionListener(this); + /*JMenuItem miRemoveDeadCode = new JMenuItem("Remove dead code"); + miRemoveDeadCode.setActionCommand("REMOVEDEADCODE"); + miRemoveDeadCode.addActionListener(this); - JMenuItem miRemoveDeadCodeAll = new JMenuItem("Remove all dead code"); - miRemoveDeadCodeAll.setActionCommand("REMOVEDEADCODEALL"); - miRemoveDeadCodeAll.addActionListener(this); + JMenuItem miRemoveDeadCodeAll = new JMenuItem("Remove all dead code"); + miRemoveDeadCodeAll.setActionCommand("REMOVEDEADCODEALL"); + miRemoveDeadCodeAll.addActionListener(this); - JMenuItem miTraps = new JMenuItem("Remove traps"); - miTraps.setActionCommand("REMOVETRAPS"); - miTraps.addActionListener(this); + JMenuItem miTraps = new JMenuItem("Remove traps"); + miTraps.setActionCommand("REMOVETRAPS"); + miTraps.addActionListener(this); - JMenuItem miTrapsAll = new JMenuItem("Remove all traps"); - miTrapsAll.setActionCommand("REMOVETRAPSALL"); - miTrapsAll.addActionListener(this); + JMenuItem miTrapsAll = new JMenuItem("Remove all traps"); + miTrapsAll.setActionCommand("REMOVETRAPSALL"); + miTrapsAll.addActionListener(this); - JMenuItem miControlFlow = new JMenuItem("Restore control flow"); - miControlFlow.setActionCommand("RESTORECONTROLFLOW"); - miControlFlow.addActionListener(this); + JMenuItem miControlFlow = new JMenuItem("Restore control flow"); + miControlFlow.setActionCommand("RESTORECONTROLFLOW"); + miControlFlow.addActionListener(this); - JMenuItem miControlFlowAll = new JMenuItem("Restore all control flow"); - miControlFlowAll.setActionCommand("RESTORECONTROLFLOWALL"); - miControlFlowAll.addActionListener(this); + JMenuItem miControlFlowAll = new JMenuItem("Restore all control flow"); + miControlFlowAll.setActionCommand("RESTORECONTROLFLOWALL"); + miControlFlowAll.addActionListener(this);*/ menuDeobfuscation.add(miRenameOneIdentifier); menuDeobfuscation.add(miRenameIdentifiers); @@ -411,20 +409,20 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi menuDeobfuscation.add(miControlFlow); menuDeobfuscation.add(miControlFlowAll); */ - JMenu menuTools = new JMenu("Tools"); - JMenuItem miProxy = new JMenuItem("Proxy"); + JMenu menuTools = new JMenu(translate("menu.tools")); + JMenuItem miProxy = new JMenuItem(translate("menu.tools.proxy")); miProxy.setActionCommand("SHOWPROXY"); miProxy.setIcon(View.getIcon("proxy16")); miProxy.addActionListener(this); - JMenuItem miSearchScript = new JMenuItem("Search All ActionScript..."); + JMenuItem miSearchScript = new JMenuItem(translate("menu.tools.searchas")); miSearchScript.addActionListener(this); miSearchScript.setActionCommand("SEARCHAS"); miSearchScript.setIcon(View.getIcon("search16")); menuTools.add(miSearchScript); - miInternalViewer = new JCheckBoxMenuItem("Use own Flash viewer"); + miInternalViewer = new JCheckBoxMenuItem(translate("menu.settings.internalflashviewer")); miInternalViewer.setSelected((Boolean) Configuration.getConfig("internalFlashViewer", (Boolean) (flashPanel == null))); if (flashPanel == null) { miInternalViewer.setSelected(true); @@ -433,7 +431,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi miInternalViewer.setActionCommand("INTERNALVIEWERSWITCH"); miInternalViewer.addActionListener(this); - miParallelSpeedUp = new JCheckBoxMenuItem("Parallel SpeedUp"); + miParallelSpeedUp = new JCheckBoxMenuItem(translate("menu.settings.parallelspeedup")); miParallelSpeedUp.setSelected((Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); miParallelSpeedUp.setActionCommand("PARALLELSPEEDUP"); miParallelSpeedUp.addActionListener(this); @@ -444,50 +442,57 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi //menuTools.add(menuDeobfuscation); menuTools.add(menuDeobfuscation); - JMenuItem miGotoDocumentClass = new JMenuItem("Go to document class"); + JMenuItem miGotoDocumentClass = new JMenuItem(translate("menu.tools.gotodocumentclass")); miGotoDocumentClass.setActionCommand("GOTODOCUMENTCLASS"); miGotoDocumentClass.addActionListener(this); menuBar.add(menuTools); - miDecompile = new JCheckBoxMenuItem("Disable decompilation (Disassemble only)"); + miDecompile = new JCheckBoxMenuItem(translate("menu.settings.disabledecompilation")); miDecompile.setSelected(!(Boolean) Configuration.getConfig("decompile", Boolean.TRUE)); miDecompile.setActionCommand("DISABLEDECOMPILATION"); miDecompile.addActionListener(this); - JMenu menuSettings = new JMenu("Settings"); + JMenu menuSettings = new JMenu(translate("menu.settings")); menuSettings.add(autoDeobfuscateMenuItem); menuSettings.add(miInternalViewer); menuSettings.add(miParallelSpeedUp); menuSettings.add(miDecompile); - miAssociate = new JCheckBoxMenuItem("Add FFDec to SWF files context menu"); + miAssociate = new JCheckBoxMenuItem(translate("menu.settings.addtocontextmenu")); miAssociate.setActionCommand("ASSOCIATE"); miAssociate.addActionListener(this); miAssociate.setState(isAssociated()); + + + JMenuItem miLanguage = new JMenuItem(translate("menu.settings.language")); + miLanguage.setActionCommand("SETLANGUAGE"); + miLanguage.addActionListener(this); + if (Platform.isWindows()) { menuSettings.add(miAssociate); } + menuSettings.add(miLanguage); menuBar.add(menuSettings); - JMenu menuHelp = new JMenu("Help"); - JMenuItem miAbout = new JMenuItem("About..."); + JMenu menuHelp = new JMenu(translate("menu.help")); + JMenuItem miAbout = new JMenuItem(translate("menu.help.about")); miAbout.setIcon(View.getIcon("about16")); miAbout.setActionCommand("ABOUT"); miAbout.addActionListener(this); - JMenuItem miCheckUpdates = new JMenuItem("Check for updates..."); + JMenuItem miCheckUpdates = new JMenuItem(translate("menu.help.checkupdates")); miCheckUpdates.setActionCommand("CHECKUPDATES"); miCheckUpdates.setIcon(View.getIcon("update16")); miCheckUpdates.addActionListener(this); - JMenuItem miHelpUs = new JMenuItem("Help us!"); + JMenuItem miHelpUs = new JMenuItem(translate("menu.help.helpus")); miHelpUs.setActionCommand("HELPUS"); miHelpUs.setIcon(View.getIcon("donate16")); miHelpUs.addActionListener(this); - JMenuItem miHomepage = new JMenuItem("Visit homepage"); + JMenuItem miHomepage = new JMenuItem(translate("menu.help.homepage")); miHomepage.setActionCommand("HOMEPAGE"); miHomepage.setIcon(View.getIcon("homepage16")); miHomepage.addActionListener(this); @@ -521,13 +526,11 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi abcList = new ArrayList<>(); getActionScript3(objs, abcList); if (!abcList.isEmpty()) { - addTab(tabPane, abcPanel = new ABCPanel(abcList), "ActionScript3", View.getIcon("as16")); + abcPanel = new ABCPanel(abcList); detailPanel.add(abcPanel.tabbedPane, DETAILCARDAS3NAVIGATOR); menuTools.add(miGotoDocumentClass); } else { actionPanel = new ActionPanel(); - addTab(tabPane, actionPanel, "ActionScript", View.getIcon("as16")); - miDeobfuscation.setEnabled(false); } @@ -612,7 +615,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } }); final JPopupMenu spritePopupMenu = new JPopupMenu(); - JMenuItem removeMenuItem = new JMenuItem("Remove"); + JMenuItem removeMenuItem = new JMenuItem(translate("contextmenu.remove")); removeMenuItem.addActionListener(this); removeMenuItem.setActionCommand("REMOVEITEM"); spritePopupMenu.add(removeMenuItem); @@ -715,17 +718,17 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi buttonsPanel.setLayout(new FlowLayout()); - textSaveButton = new JButton("Save", View.getIcon("save16")); + textSaveButton = new JButton(translate("button.save"), View.getIcon("save16")); textSaveButton.setMargin(new Insets(3, 3, 3, 10)); textSaveButton.setActionCommand("SAVETEXT"); textSaveButton.addActionListener(this); - textEditButton = new JButton("Edit", View.getIcon("edit16")); + textEditButton = new JButton(translate("button.edit"), View.getIcon("edit16")); textEditButton.setMargin(new Insets(3, 3, 3, 10)); textEditButton.setActionCommand("EDITTEXT"); textEditButton.addActionListener(this); - textCancelButton = new JButton("Cancel", View.getIcon("cancel16")); + textCancelButton = new JButton(translate("button.cancel"), View.getIcon("cancel16")); textCancelButton.setMargin(new Insets(3, 3, 3, 10)); textCancelButton.setActionCommand("CANCELTEXT"); textCancelButton.addActionListener(this); @@ -762,7 +765,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi leftComponent = flashPanel; } else { JPanel swtPanel = new JPanel(new BorderLayout()); - swtPanel.add(new JLabel("
Preview of this object is not available on this platform. (Windows only)
", JLabel.CENTER), BorderLayout.CENTER); + swtPanel.add(new JLabel("
" + translate("notavailonthisplatform") + "
", JLabel.CENTER), BorderLayout.CENTER); swtPanel.setBackground(Color.white); leftComponent = swtPanel; } @@ -772,11 +775,11 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi previewSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); previewSplitPane.setDividerLocation(300); JPanel pan = new JPanel(new BorderLayout()); - JLabel prevLabel = new JLabel("SWF preview"); + JLabel prevLabel = new JLabel(translate("swfpreview")); prevLabel.setHorizontalAlignment(SwingConstants.CENTER); prevLabel.setBorder(new BevelBorder(BevelBorder.RAISED)); - JLabel paramsLabel = new JLabel("Parameters"); + JLabel paramsLabel = new JLabel(translate("parameters")); paramsLabel.setHorizontalAlignment(SwingConstants.CENTER); paramsLabel.setBorder(new BevelBorder(BevelBorder.RAISED)); pan.add(prevLabel, BorderLayout.NORTH); @@ -796,7 +799,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi - imageReplaceButton = new JButton("Replace...", View.getIcon("edit16")); + imageReplaceButton = new JButton(translate("button.replace"), View.getIcon("edit16")); imageReplaceButton.setMargin(new Insets(3, 3, 3, 10)); imageReplaceButton.setActionCommand("REPLACEIMAGE"); imageReplaceButton.addActionListener(this); @@ -813,7 +816,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi previewImagePanel = new ImagePanel(); previewPanel.add(previewImagePanel, BorderLayout.CENTER); - JLabel prevIntLabel = new JLabel("SWF preview (Internal viewer)"); + JLabel prevIntLabel = new JLabel(translate("swfpreview.internal")); prevIntLabel.setHorizontalAlignment(SwingConstants.CENTER); prevIntLabel.setBorder(new BevelBorder(BevelBorder.RAISED)); previewPanel.add(prevIntLabel, BorderLayout.NORTH); @@ -1193,11 +1196,11 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi public void renameIdentifier(String identifier) { String oldName = identifier; - String newName = JOptionPane.showInputDialog("Enter new name:", oldName); + String newName = JOptionPane.showInputDialog(translate("rename.enternew"), oldName); if (newName != null) { if (!oldName.equals(newName)) { swf.renameAS2Identifier(oldName, newName); - JOptionPane.showMessageDialog(null, "Identifier renamed."); + JOptionPane.showMessageDialog(null, translate("rename.finished.identifier")); doFilter(); reload(true); } @@ -1209,7 +1212,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi if (abcPanel.abc.constants.constant_multiname[multiNameIndex].name_index > 0) { oldName = abcPanel.abc.constants.constant_string[abcPanel.abc.constants.constant_multiname[multiNameIndex].name_index]; } - String newName = JOptionPane.showInputDialog("Enter new name:", oldName); + String newName = JOptionPane.showInputDialog(translate("rename.enternew"), oldName); if (newName != null) { if (!oldName.equals(newName)) { int mulCount = 0; @@ -1227,7 +1230,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } } } - JOptionPane.showMessageDialog(null, mulCount + " multiname(s) renamed."); + JOptionPane.showMessageDialog(null, translate("rename.finished.multiname").replace("%count%", "" + mulCount)); if (abcPanel != null) { abcPanel.reload(); } @@ -1272,7 +1275,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi if (node instanceof TagNode) { Object tag = ((TagNode) tm.getChild(root, i)).tag; if (tag != null) { - if (tag.toString().equals("scripts")) { + if (tag.toString().equals("scripts".equals(((TagNode) node).mark))) { return (TagNode) node; } } @@ -1331,42 +1334,43 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } actionScript = SWF.createASTagList(list, null); - TagNode textsNode = new TagNode("texts"); + TagNode textsNode = new TagNode(translate("node.texts")); textsNode.subItems.addAll(texts); - TagNode imagesNode = new TagNode("images"); + TagNode imagesNode = new TagNode(translate("node.images")); imagesNode.subItems.addAll(images); - TagNode moviesNode = new TagNode("movies"); + TagNode moviesNode = new TagNode(translate("node.movies")); moviesNode.subItems.addAll(movies); - TagNode soundsNode = new TagNode("sounds"); + TagNode soundsNode = new TagNode(translate("node.sounds")); soundsNode.subItems.addAll(sounds); - TagNode binaryDataNode = new TagNode("binaryData"); + TagNode binaryDataNode = new TagNode(translate("node.binaryData")); binaryDataNode.subItems.addAll(binaryData); - TagNode fontsNode = new TagNode("fonts"); + TagNode fontsNode = new TagNode(translate("node.fonts")); fontsNode.subItems.addAll(fonts); - TagNode spritesNode = new TagNode("sprites"); + TagNode spritesNode = new TagNode(translate("node.sprites")); spritesNode.subItems.addAll(sprites); - TagNode shapesNode = new TagNode("shapes"); + TagNode shapesNode = new TagNode(translate("node.shapes")); shapesNode.subItems.addAll(shapes); - TagNode morphShapesNode = new TagNode("morphshapes"); + TagNode morphShapesNode = new TagNode(translate("node.morphshapes")); morphShapesNode.subItems.addAll(morphShapes); - TagNode buttonsNode = new TagNode("buttons"); + TagNode buttonsNode = new TagNode(translate("node.buttons")); buttonsNode.subItems.addAll(buttons); - TagNode framesNode = new TagNode("frames"); + TagNode framesNode = new TagNode(translate("node.frames")); framesNode.subItems.addAll(frames); - TagNode actionScriptNode = new TagNode("scripts"); + TagNode actionScriptNode = new TagNode(translate("node.scripts")); + actionScriptNode.mark = "scripts"; actionScriptNode.subItems.addAll(actionScript); if (!shapesNode.subItems.isEmpty()) { @@ -1418,7 +1422,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } public boolean confirmExperimental() { - return JOptionPane.showConfirmDialog(null, "Following procedure can damage SWF file which can be then unplayable.\r\nUSE IT ON YOUR OWN RISK. Do you want to continue?", "Warning", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.OK_OPTION; + return JOptionPane.showConfirmDialog(null, translate("message.confirm.experimental"), translate("message.warning"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.OK_OPTION; } private SearchDialog searchDialog; @@ -1485,7 +1489,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi if (abcPanel != null) { for (int i = 0; i < tlsList.size(); i++) { ScriptPack tls = tlsList.get(i); - Main.startWork("Exporting " + (i + 1) + "/" + tlsList.size() + " " + tls.getPath() + " ..."); + Main.startWork(translate("work.exporting") + " " + (i + 1) + "/" + tlsList.size() + " " + tls.getPath() + " ..."); ret.add(tls.export(selFile, abcList, isPcode, (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE))); } } else { @@ -1513,6 +1517,17 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi @Override public void actionPerformed(ActionEvent e) { switch (e.getActionCommand()) { + case "SETLANGUAGE": + String newLanguage = new SelectLanguageDialog().display(); + if (newLanguage != null) { + if (newLanguage.equals("en")) { + newLanguage = ""; + } + Configuration.setConfig("locale", newLanguage); + JOptionPane.showMessageDialog(null, "Changing language needs application restart.\r\nApplication will exit now, please run it again."); + Main.exit(); + } + break; case "DISABLEDECOMPILATION": Configuration.setConfig("decompile", !miDecompile.isSelected()); clearCache(); @@ -1555,13 +1570,13 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } break; case "PARALLELSPEEDUP": - String confStr = "Parallelism can speed up loading and decompilation but uses more memory.\r\n"; + String confStr = translate("message.confirm.parallel") + "\r\n"; if (miParallelSpeedUp.isSelected()) { - confStr += " Do you want to turn this ON?"; + confStr += " " + translate("message.confirm.on"); } else { - confStr += " Do you want to turn this OFF?"; + confStr += " " + translate("message.confirm.off"); } - if (JOptionPane.showConfirmDialog(null, confStr, "Parallelism", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) { + if (JOptionPane.showConfirmDialog(null, confStr, translate("message.parallel"), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) { Configuration.setConfig("paralelSpeedUp", (Boolean) miParallelSpeedUp.isSelected()); } else { miParallelSpeedUp.setSelected(!miParallelSpeedUp.isSelected()); @@ -1578,7 +1593,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi if (searchDialog.result) { final String txt = searchDialog.searchField.getText(); if (!txt.equals("")) { - Main.startWork("Searching \"" + txt + "\"..."); + Main.startWork(translate("work.searching") + " \"" + txt + "\"..."); if (abcPanel != null) { (new Thread() { @Override @@ -1587,7 +1602,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi showDetail(DETAILCARDAS3NAVIGATOR); showCard(CARDACTIONSCRIPTPANEL); } else { - JOptionPane.showMessageDialog(null, "String \"" + txt + "\" not found.", "Not found", JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog(null, translate("message.search.notfound").replace("%searchtext%", txt), translate("message.search.notfound.title"), JOptionPane.INFORMATION_MESSAGE); } Main.stopWork(); } @@ -1599,7 +1614,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi if (actionPanel.search(txt, searchDialog.ignoreCaseCheckBox.isSelected(), searchDialog.regexpCheckBox.isSelected())) { showCard(CARDACTIONSCRIPTPANEL); } else { - JOptionPane.showMessageDialog(null, "String \"" + txt + "\" not found.", "Not found", JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog(null, translate("message.search.notfound").replace("%searchtext%", txt), translate("message.search.notfound.title"), JOptionPane.INFORMATION_MESSAGE); } Main.stopWork(); } @@ -1634,7 +1649,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi @Override public String getDescription() { - return "Images (*.jpg,*.gif,*.png)"; + return translate("filter.images"); } }); JFrame f = new JFrame(); @@ -1647,8 +1662,8 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi try { it.setImage(data); } catch (IOException ex) { - Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, "message", ex); - JOptionPane.showMessageDialog(null, "Invalid image.", "Error", JOptionPane.ERROR_MESSAGE); + Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, "Invalid image", ex); + JOptionPane.showMessageDialog(null, translate("error.image.invalid"), translate("error"), JOptionPane.ERROR_MESSAGE); } reload(true); } @@ -1705,13 +1720,13 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi ((TextTag) oldValue).setFormattedText(swf.tags, textValue.getText()); setEditText(false); } catch (ParseException ex) { - JOptionPane.showMessageDialog(null, "Invalid text: " + ex.text + " on line " + ex.line, "Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(null, translate("error.text.invalid").replace("%text%", ex.text).replace("%line%", "" + ex.line), translate("error"), JOptionPane.ERROR_MESSAGE); } } break; case "AUTODEOBFUSCATE": - if (JOptionPane.showConfirmDialog(this, "Automatic deobfuscation is a way to decompile obfuscated code.\r\nDeobfuscation leads to slower decompilation and some of the dead code may be eliminated.\r\nIf the code is not obfuscated, it's better to turn autodeobfuscation off.\r\nDo you really want to " + (autoDeobfuscateMenuItem.getState() ? "turn ON" : "turn OFF") + " automatic debfuscation?", "Confirm", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) { + if (JOptionPane.showConfirmDialog(this, translate("message.confirm.autodeobfuscate") + "\r\n" + (autoDeobfuscateMenuItem.getState() ? translate("message.confirm.on") : translate("message.confirm.off")), translate("message.confirm"), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) { Configuration.setConfig("autoDeobfuscate", autoDeobfuscateMenuItem.getState()); clearCache(); } else { @@ -1741,14 +1756,14 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi (new Thread() { @Override public void run() { - Main.startWork("Renaming..."); + Main.startWork(translate("work.renaming") + "..."); renameMultiname(multiName); Main.stopWork(); } }).start(); } else { - JOptionPane.showMessageDialog(null, "No Multiname found under cursor", "Not found", JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog(null, translate("message.rename.notfound.multiname"), translate("message.rename.notfound.title"), JOptionPane.INFORMATION_MESSAGE); } } else { final String identifier = actionPanel.getStringUnderCursor(); @@ -1756,13 +1771,13 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi (new Thread() { @Override public void run() { - Main.startWork("Renaming..."); + Main.startWork(translate("work.renaming") + "..."); renameIdentifier(identifier); Main.stopWork(); } }).start(); } else { - JOptionPane.showMessageDialog(null, "No identifier found under cursor", "Not found", JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog(null, translate("message.rename.notfound.identifier"), translate("message.rename.notfound.title"), JOptionPane.INFORMATION_MESSAGE); } } break; @@ -1785,8 +1800,8 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi try { Main.saveFile(Main.file); } catch (IOException ex) { - Logger.getLogger(com.jpexs.decompiler.flash.abc.gui.ABCPanel.class.getName()).log(Level.SEVERE, null, ex); - JOptionPane.showMessageDialog(null, "Cannot save file", "Error", JOptionPane.ERROR_MESSAGE); + Logger.getLogger(com.jpexs.decompiler.flash.gui.abc.ABCPanel.class.getName()).log(Level.SEVERE, null, ex); + JOptionPane.showMessageDialog(null, translate("error.file.save"), translate("error"), JOptionPane.ERROR_MESSAGE); } break; case "SAVEAS": @@ -1815,7 +1830,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi @Override public String getDescription() { - return "Flash CS 6 Document (*.fla)"; + return translate("filter.fla"); } }; FileFilter xfl = new FileFilter() { @@ -1826,7 +1841,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi @Override public String getDescription() { - return "Flash CS 6 Uncompressed Document (*.xfl)"; + return translate("filter.xfl"); } }; fc.setFileFilter(fla); @@ -1839,7 +1854,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi Configuration.setConfig("lastOpenDir", Helper.fixDialogFile(fc.getSelectedFile()).getParentFile().getAbsolutePath()); File sf = Helper.fixDialogFile(fc.getSelectedFile()); - Main.startWork("Exporting FLA..."); + Main.startWork(translate("work.exporting.fla") + "..."); final boolean compressed = fc.getFileFilter() == fla; if (!compressed) { if (sf.getName().endsWith(".fla")) { @@ -1867,12 +1882,12 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi if (!export.cancelled) { JFileChooser chooser = new JFileChooser(); chooser.setCurrentDirectory(new java.io.File((String) Configuration.getConfig("lastExportDir", "."))); - chooser.setDialogTitle("Select directory to export"); + chooser.setDialogTitle(translate("export.select.directory")); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); chooser.setAcceptAllFileFilterUsed(false); if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { final long timeBefore = System.currentTimeMillis(); - Main.startWork("Exporting..."); + Main.startWork(translate("work.exporting") + "..."); final String selFile = Helper.fixDialogFile(chooser.getSelectedFile()).getAbsolutePath(); Configuration.setConfig("lastExportDir", Helper.fixDialogFile(chooser.getSelectedFile()).getParentFile().getAbsolutePath()); final boolean isPcode = export.getOption(ExportDialog.OPTION_ACTIONSCRIPT) == 1; @@ -1896,7 +1911,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } } catch (Exception ex) { Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, "Error during export", ex); - JOptionPane.showMessageDialog(null, "Error during export"); + JOptionPane.showMessageDialog(null, translate("error.export")); } Main.stopWork(); long timeAfter = System.currentTimeMillis(); @@ -1913,7 +1928,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } timeStr += Helper.padZeros(timeM, 2) + ":"; timeStr += Helper.padZeros(timeS, 2) + "." + Helper.padZeros(timeMs, 3); - setStatus("Exported in " + timeStr); + setStatus(translate("export.finishedin").replace("%time%", timeStr)); } }).start(); @@ -1923,7 +1938,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi case "CHECKUPDATES": if (!Main.checkForUpdates()) { - JOptionPane.showMessageDialog(null, "No new version available."); + JOptionPane.showMessageDialog(null, translate("update.check.nonewversion"), translate("update.check.title"), JOptionPane.INFORMATION_MESSAGE); } break; @@ -1937,7 +1952,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } catch (Exception ex) { } } else { - JOptionPane.showMessageDialog(null, "Please visit\r\n" + helpUsURL + "\r\nfor details."); + JOptionPane.showMessageDialog(null, translate("message.helpus").replace("%url%", helpUsURL)); } break; @@ -1951,7 +1966,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } catch (Exception ex) { } } else { - JOptionPane.showMessageDialog(null, "Visit homepage at: \r\n" + homePageURL); + JOptionPane.showMessageDialog(null, translate("message.homepage").replace("%url%", homePageURL)); } break; @@ -1988,7 +2003,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi if (confirmExperimental()) { final RenameType renameType = new RenameDialog().display(); if (renameType != null) { - Main.startWork("Renaming identifiers..."); + Main.startWork(translate("work.renaming.identifiers") + "..."); new SwingWorker() { @Override protected Object doInBackground() throws Exception { @@ -1996,7 +2011,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi int cnt = 0; cnt = swf.deobfuscateIdentifiers(renameType); Main.stopWork(); - JOptionPane.showMessageDialog(null, "Identifiers renamed: " + cnt); + JOptionPane.showMessageDialog(null, translate("message.rename.renamed").replace("%count%", "" + cnt)); clearCache(); if (abcPanel != null) { abcPanel.reload(); @@ -2004,7 +2019,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi doFilter(); reload(true); } catch (Exception ex) { - Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, "message", ex); + Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, "Error during renaming identifiers", ex); } return true; } @@ -2020,7 +2035,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } deobfuscationDialog.setVisible(true); if (deobfuscationDialog.ok) { - Main.startWork("Deobfuscating..."); + Main.startWork(translate("work.deobfuscating") + "..."); new SwingWorker() { @Override protected Object doInBackground() throws Exception { @@ -2054,7 +2069,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, "Deobfuscation error", ex); } Main.stopWork(); - JOptionPane.showMessageDialog(null, "Deobfuscation complete"); + JOptionPane.showMessageDialog(null, translate("work.deobfuscating.complete")); clearCache(); abcPanel.reload(); doFilter(); @@ -2063,67 +2078,6 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi }.execute(); } break; - - case "REMOVETRAPS": - case "REMOVETRAPSALL": - Main.startWork("Removing traps..."); - final boolean rall = e.getActionCommand().endsWith("ALL"); - if ((!rall) || confirmExperimental()) { - new SwingWorker() { - @Override - protected Object doInBackground() throws Exception { - int cnt = 0; - if (rall) { - for (ABCContainerTag tag : abcPanel.list) { - cnt += tag.getABC().removeTraps(); - } - } else { - int bi = abcPanel.detailPanel.methodTraitPanel.methodCodePanel.getBodyIndex(); - if (bi != -1) { - cnt += abcPanel.abc.bodies[bi].removeTraps(abcPanel.abc.constants, abcPanel.abc, abcPanel.decompiledTextArea.getScriptLeaf().scriptIndex, abcPanel.decompiledTextArea.getClassIndex(), abcPanel.decompiledTextArea.getIsStatic()); - } - abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setBodyIndex(bi, abcPanel.abc); - } - Main.stopWork(); - JOptionPane.showMessageDialog(null, "Traps removed: " + cnt); - abcPanel.reload(); - doFilter(); - return true; - } - }.execute(); - } - break; - - case "REMOVEDEADCODE": - case "REMOVEDEADCODEALL": - Main.startWork("Removing dead code..."); - final boolean dall = e.getActionCommand().endsWith("ALL"); - if ((!dall) || confirmExperimental()) { - new SwingWorker() { - @Override - protected Object doInBackground() throws Exception { - int cnt = 0; - if (dall) { - for (ABCContainerTag tag : abcPanel.list) { - cnt += tag.getABC().removeDeadCode(); - } - } else { - int bi = abcPanel.detailPanel.methodTraitPanel.methodCodePanel.getBodyIndex(); - if (bi != -1) { - cnt += abcPanel.abc.bodies[bi].removeDeadCode(abcPanel.abc.constants); - } - abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setBodyIndex(bi, abcPanel.abc); - } - Main.stopWork(); - JOptionPane.showMessageDialog(null, "Instructions removed: " + cnt); - abcPanel.reload(); - doFilter(); - return true; - } - }.execute(); - } - break; - } @@ -2187,7 +2141,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi if (tagObj instanceof ScriptPack) { final ScriptPack scriptLeaf = (ScriptPack) tagObj; if (!Main.isWorking()) { - Main.startWork("Decompiling..."); + Main.startWork(translate("work.decompiling") + "..."); (new Thread() { @Override public void run() { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/ModeFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/ModeFrame.java index 2a46d25fe..b6bc3a380 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/ModeFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/ModeFrame.java @@ -31,11 +31,11 @@ import javax.swing.JLabel; * * @author JPEXS */ -public class ModeFrame extends JFrame implements ActionListener { +public class ModeFrame extends AppFrame implements ActionListener { - private JButton openButton = new JButton("Open local file"); - private JButton proxyButton = new JButton("Open via proxy"); - private JButton exitButton = new JButton("Exit application"); + private JButton openButton = new JButton(translate("button.open")); + private JButton proxyButton = new JButton(translate("button.proxy")); + private JButton exitButton = new JButton(translate("button.exit")); /** * Constructor diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java index 69c5d35d0..cf31f6e90 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java @@ -38,7 +38,7 @@ import javax.swing.UIManager; * * @author JPEXS */ -public class NewVersionDialog extends JDialog implements ActionListener { +public class NewVersionDialog extends AppDialog implements ActionListener { Version latestVersion; @@ -51,9 +51,9 @@ public class NewVersionDialog extends JDialog implements ActionListener { changesText.setFont(UIManager.getFont("TextField.font")); String changesStr = ""; for (Version v : versions) { - changesStr += "version " + v.versionName + "\r\n"; + changesStr += translate("version") + " " + v.versionName + "\r\n"; changesStr += "-----------------------\r\n"; - changesStr += "Release date:" + v.releaseDate + "\r\n"; + changesStr += translate("releasedate") + v.releaseDate + "\r\n"; for (String type : v.changes.keySet()) { changesStr += type + ":" + "\r\n"; for (String ch : v.changes.get(type)) { @@ -67,11 +67,11 @@ public class NewVersionDialog extends JDialog implements ActionListener { latestVersion = versions.get(0); } changesText.setText(changesStr); - JLabel newAvailableLabel = new JLabel("
New version is available: " + latestVersion.appName + " version " + latestVersion.versionName + "
", SwingConstants.CENTER); + JLabel newAvailableLabel = new JLabel("
" + translate("newversionavailable") + " " + latestVersion.appName + " " + translate("version") + " " + latestVersion.versionName + "
", SwingConstants.CENTER); newAvailableLabel.setAlignmentX(JLabel.CENTER_ALIGNMENT); cnt.add(newAvailableLabel); - JLabel changeslogLabel = new JLabel("Changeslog:"); + JLabel changeslogLabel = new JLabel("" + translate("changeslog") + ""); changeslogLabel.setAlignmentX(JLabel.CENTER_ALIGNMENT); cnt.add(changeslogLabel); @@ -79,11 +79,11 @@ public class NewVersionDialog extends JDialog implements ActionListener { span.setAlignmentX(JLabel.CENTER_ALIGNMENT); cnt.add(span); JPanel buttonsPanel = new JPanel(new FlowLayout()); - JButton buttonOk = new JButton("OK"); + JButton buttonOk = new JButton(translate("button.ok")); buttonOk.setActionCommand("OK"); buttonOk.addActionListener(this); - JButton buttonCancel = new JButton("Cancel"); + JButton buttonCancel = new JButton(translate("button.cancel")); buttonCancel.setActionCommand("CANCEL"); buttonCancel.addActionListener(this); @@ -91,13 +91,13 @@ public class NewVersionDialog extends JDialog implements ActionListener { buttonsPanel.add(buttonCancel); buttonsPanel.setAlignmentX(JLabel.CENTER_ALIGNMENT); - JLabel downloadNowLabel = new JLabel("
Download now?
", SwingConstants.CENTER); + JLabel downloadNowLabel = new JLabel("
" + translate("downloadnow") + "
", SwingConstants.CENTER); downloadNowLabel.setAlignmentX(JLabel.CENTER_ALIGNMENT); cnt.add(downloadNowLabel); cnt.add(buttonsPanel); setResizable(false); - setTitle("New version available"); + setTitle(translate("dialog.title")); this.getRootPane().setDefaultButton(buttonOk); View.centerScreen(this); setModalityType(ModalityType.APPLICATION_MODAL); @@ -127,7 +127,7 @@ public class NewVersionDialog extends JDialog implements ActionListener { } } if (desktop == null) { - JOptionPane.showMessageDialog(null, "New version of " + Main.shortApplicationName + " is available: " + latestVersion.appName + ".\r\nPlease go to " + Main.projectPage + " to download it.", "New version", JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog(null, translate("newvermessage").replace("%oldAppName%", Main.shortApplicationName).replace("%newAppName%", latestVersion.appName).replace("%projectPage%", Main.projectPage), translate("newversion"), JOptionPane.INFORMATION_MESSAGE); } } setVisible(false); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/RenameDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/RenameDialog.java index 99a1a8186..88b12e666 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/RenameDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/RenameDialog.java @@ -34,12 +34,12 @@ import javax.swing.JRadioButton; * * @author JPEXS */ -public class RenameDialog extends JDialog implements ActionListener { +public class RenameDialog extends AppDialog implements ActionListener { - private JRadioButton typeNumberRadioButton = new JRadioButton("Type + Number (class_27, method_456,...)"); - private JRadioButton randomWordRadioButton = new JRadioButton("Random word (abada, kof, supo, kosuri,...)"); - private JButton okButton = new JButton("OK"); - private JButton cancelButton = new JButton("Cancel"); + private JRadioButton typeNumberRadioButton = new JRadioButton(translate("rename.type.typenumber")); + private JRadioButton randomWordRadioButton = new JRadioButton(translate("rename.type.randomword")); + private JButton okButton = new JButton(translate("button.ok")); + private JButton cancelButton = new JButton(translate("button.cancel")); private boolean confirmed = false; public RenameType getRenameType() { @@ -66,7 +66,7 @@ public class RenameDialog extends JDialog implements ActionListener { typeNumberRadioButton.setSelected(renameType == 1); randomWordRadioButton.setSelected(renameType == 2); setLayout(new BorderLayout()); - add(new JLabel("Rename type:"), BorderLayout.NORTH); + add(new JLabel(translate("rename.type")), BorderLayout.NORTH); add(pan, BorderLayout.CENTER); JPanel panButtons = new JPanel(new FlowLayout()); panButtons.add(okButton); @@ -79,7 +79,7 @@ public class RenameDialog extends JDialog implements ActionListener { setModalityType(ModalityType.APPLICATION_MODAL); View.centerScreen(this); View.setWindowIcon(this); - setTitle("Rename Identifiers"); + setTitle(translate("dialog.title")); getRootPane().setDefaultButton(okButton); } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/SWFPreviwPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/SWFPreviwPanel.java index 12d5ba0df..6c8e37981 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/SWFPreviwPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/SWFPreviwPanel.java @@ -27,6 +27,7 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.SwingConstants; import javax.swing.border.BevelBorder; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; /** * @@ -38,7 +39,7 @@ public class SWFPreviwPanel extends JPanel { Timer timer; int frame = 0; List frameImages = new ArrayList<>(); - JLabel buffering = new JLabel("Buffering..."); + JLabel buffering = new JLabel(translate("work.buffering") + "..."); public SWFPreviwPanel() { pan = new ImagePanel(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/SearchDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/SearchDialog.java index fea22b4a3..876b949da 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/SearchDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/SearchDialog.java @@ -36,11 +36,11 @@ import javax.swing.JTextField; * * @author JPEXS */ -public class SearchDialog extends JDialog implements ActionListener { +public class SearchDialog extends AppDialog implements ActionListener { public JTextField searchField = new JTextField(); - public JCheckBox ignoreCaseCheckBox = new JCheckBox("Ignore case"); - public JCheckBox regexpCheckBox = new JCheckBox("Regular expression"); + public JCheckBox ignoreCaseCheckBox = new JCheckBox(translate("checkbox.ignorecase")); + public JCheckBox regexpCheckBox = new JCheckBox(translate("checkbox.regexp")); public boolean result = false; public SearchDialog() { @@ -49,17 +49,17 @@ public class SearchDialog extends JDialog implements ActionListener { setSize(400, 150); cnt.setLayout(new BoxLayout(cnt, BoxLayout.PAGE_AXIS)); JPanel panButtons = new JPanel(new FlowLayout()); - JButton okButton = new JButton("OK"); + JButton okButton = new JButton(translate("button.ok")); okButton.setActionCommand("OK"); okButton.addActionListener(this); - JButton cancelButton = new JButton("Cancel"); + JButton cancelButton = new JButton(translate("button.cancel")); cancelButton.setActionCommand("CANCEL"); cancelButton.addActionListener(this); panButtons.add(okButton); panButtons.add(cancelButton); JPanel panField = new JPanel(new FlowLayout()); searchField.setPreferredSize(new Dimension(250, 25)); - panField.add(new JLabel("Search text:")); + panField.add(new JLabel(translate("label.searchtext"))); panField.add(searchField); cnt.add(panField); JPanel checkPanel = new JPanel(new FlowLayout()); @@ -70,7 +70,7 @@ public class SearchDialog extends JDialog implements ActionListener { getRootPane().setDefaultButton(okButton); View.centerScreen(this); View.setWindowIcon(this); - setTitle("ActionScript search"); + setTitle(translate("dialog.title")); setModalityType(ModalityType.APPLICATION_MODAL); } @@ -90,7 +90,7 @@ public class SearchDialog extends JDialog implements ActionListener { try { Pattern pat = Pattern.compile(searchField.getText()); } catch (PatternSyntaxException ex) { - JOptionPane.showMessageDialog(null, "Invalid pattern", "Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(null, translate("error.invalidregexp"), translate("error"), JOptionPane.ERROR_MESSAGE); return; } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java new file mode 100644 index 000000000..ba4a4fa68 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2013 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.jpexs.decompiler.flash.gui; + +import com.jpexs.decompiler.flash.Configuration; +import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.FlowLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.InputStream; +import java.util.Locale; +import java.util.Properties; +import javax.swing.BoxLayout; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; + +/** + * + * @author JPEXS + */ +public class SelectLanguageDialog extends AppDialog implements ActionListener { + + JComboBox languageCombobox = new JComboBox<>(); + public String languageCode = null; + private String languages[] = new String[]{"en", "cs"}; + + public SelectLanguageDialog() { + setSize(350, 130); + Container cnt1 = getContentPane(); + JPanel cnt = new JPanel(); + cnt1.setLayout(new BorderLayout()); + cnt1.add(cnt, BorderLayout.CENTER); + + + String currentLanguage = (String) Configuration.getConfig("locale", Locale.getDefault().getLanguage()); + boolean found = false; + int enIndex = 0; + for (String code : languages) { + String name = new Locale(code).getDisplayName(); + if (name.length() > 1) { + name = name.substring(0, 1).toUpperCase() + name.substring(1); + } + if (code.equals("en")) { + enIndex = languageCombobox.getItemCount(); + } + languageCombobox.addItem(new Language(code, name)); + if (code.equals(currentLanguage)) { + languageCombobox.setSelectedIndex(languageCombobox.getItemCount() - 1); + found = true; + } + } + + if (!found) { + languageCombobox.setSelectedIndex(enIndex); + } + cnt.setBorder(new EmptyBorder(10, 10, 10, 10)); + cnt.setLayout(new BoxLayout(cnt, BoxLayout.Y_AXIS)); + JLabel langLabel = new JLabel("Language:"); + langLabel.setAlignmentX(0.5f); + cnt.add(langLabel); + languageCombobox.setAlignmentX(0.5f); + cnt.add(languageCombobox); + JPanel buttonsPanel = new JPanel(new FlowLayout()); + buttonsPanel.setAlignmentX(0.5f); + JButton okButton = new JButton(translate("button.ok")); + okButton.setActionCommand("OK"); + okButton.addActionListener(this); + JButton cancelButton = new JButton(translate("button.cancel")); + cancelButton.setActionCommand("CANCEL"); + cancelButton.addActionListener(this); + buttonsPanel.add(okButton); + buttonsPanel.add(cancelButton); + cnt.add(buttonsPanel); + getRootPane().setDefaultButton(okButton); + setModalityType(ModalityType.APPLICATION_MODAL); + View.setWindowIcon(this); + View.centerScreen(this); + setTitle("Select language"); + } + + @Override + public void actionPerformed(ActionEvent e) { + switch (e.getActionCommand()) { + case "OK": + if (languageCombobox.getSelectedIndex() == -1) { + } else { + languageCode = ((Language) languageCombobox.getSelectedItem()).code; + setVisible(false); + } + break; + case "CANCEL": + setVisible(false); + break; + } + } + + public String display() { + setVisible(true); + return languageCode; + } +} diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java index c3ae92bb8..f7c47ff20 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java @@ -17,8 +17,8 @@ package com.jpexs.decompiler.flash.gui; import com.jpexs.decompiler.flash.TagNode; -import com.jpexs.decompiler.flash.abc.gui.ClassesListTreeModel; -import com.jpexs.decompiler.flash.abc.gui.TreeElement; +import com.jpexs.decompiler.flash.gui.abc.ClassesListTreeModel; +import com.jpexs.decompiler.flash.gui.abc.TreeElement; import java.util.ArrayList; import java.util.List; import javax.swing.event.TreeModelListener; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/View.java b/trunk/src/com/jpexs/decompiler/flash/gui/View.java index 6c8b0e9cd..fd16bf4c2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/View.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/View.java @@ -17,10 +17,18 @@ package com.jpexs.decompiler.flash.gui; import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.KeyEvent; +import java.awt.event.WindowEvent; import java.util.ArrayList; +import javax.swing.AbstractAction; +import javax.swing.Action; import javax.swing.ImageIcon; +import javax.swing.JComponent; import javax.swing.JDialog; import javax.swing.JFrame; +import javax.swing.JRootPane; +import javax.swing.KeyStroke; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; @@ -86,4 +94,20 @@ public class View { public static ImageIcon getIcon(String name) { return new ImageIcon(View.class.getClassLoader().getResource("com/jpexs/decompiler/flash/gui/graphics/" + name + ".png")); } + private static final KeyStroke escapeStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0); + private static final String dispatchWindowClosingActionMapKey = "com.jpexs.dispatch:WINDOW_CLOSING"; + + public static void installEscapeCloseOperation(final JDialog dialog) { + Action dispatchClosing = new AbstractAction() { + @Override + public void actionPerformed(ActionEvent event) { + dialog.dispatchEvent(new WindowEvent( + dialog, WindowEvent.WINDOW_CLOSING)); + } + }; + JRootPane root = dialog.getRootPane(); + root.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( + escapeStroke, dispatchWindowClosingActionMapKey); + root.getActionMap().put(dispatchWindowClosingActionMapKey, dispatchClosing); + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ABCComboBoxModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCComboBoxModel.java similarity index 94% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/ABCComboBoxModel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCComboBoxModel.java index f4698f106..9d4459484 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ABCComboBoxModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCComboBoxModel.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.tags.ABCContainerTag; import java.util.Collections; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ABCPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java similarity index 94% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/ABCPanel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index bec159ec3..d1088f84f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ABCPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.Configuration; import com.jpexs.decompiler.flash.abc.ABC; @@ -48,6 +48,7 @@ import javax.swing.table.*; import javax.swing.tree.TreePath; import jsyntaxpane.DefaultSyntaxKit; import jsyntaxpane.actions.DocumentSearchData; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; public class ABCPanel extends JPanel implements ItemListener, ActionListener { @@ -64,8 +65,8 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener { //public JSplitPane splitPaneTreeNavVSDecompiledDetail; private JTable constantTable; public JComboBox constantTypeList; - public JLabel asmLabel = new JLabel("P-code source"); - public JLabel decLabel = new JLabel("ActionScript source"); + public JLabel asmLabel = new JLabel(translate("panel.disassembled")); + public JLabel decLabel = new JLabel(translate("panel.decompiled")); public DetailPanel detailPanel; public JTextField filterField = new JTextField(""); public JPanel navPanel; @@ -111,7 +112,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener { searchPanel.setVisible(true); searchFor = txt; updateSearchPos(); - searchForLabel.setText("Search for \"" + txt + "\" : "); + searchForLabel.setText(translate("search.info").replace("%text%", txt) + " "); } return true; } @@ -303,7 +304,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener { } }); - Main.startWork("Building script tree..."); + Main.startWork(translate("work.buildingscripttree") + "..."); filterField.setActionCommand("FILTERSCRIPT"); filterField.addActionListener(this); @@ -349,10 +350,10 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener { cancelSearchButton.addActionListener(this); cancelSearchButton.setActionCommand("SEARCHCANCEL"); searchPos = new JLabel("0/0"); - searchForLabel = new JLabel("Search for \"\": "); + searchForLabel = new JLabel(translate("search.info").replace("%text%", "") + " "); searchPanel.add(searchForLabel); searchPanel.add(prevSearchButton); - searchPanel.add(new JLabel("Script ")); + searchPanel.add(new JLabel(translate("search.script") + " ")); searchPanel.add(searchPos); searchPanel.add(nextSearchButton); searchPanel.add(cancelSearchButton); @@ -421,7 +422,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener { constantTypeList.addItemListener(this); panConstants.add(constantTypeList, BorderLayout.NORTH); panConstants.add(new JScrollPane(constantTable), BorderLayout.CENTER); - tabbedPane.addTab("Constants", panConstants); + tabbedPane.addTab(translate("constants"), panConstants); } public void doFilter() { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ASMSourceEditorPane.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ASMSourceEditorPane.java similarity index 96% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/ASMSourceEditorPane.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/ASMSourceEditorPane.java index 625dae5d2..b2f357ec7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ASMSourceEditorPane.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ASMSourceEditorPane.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/CachedDecompilation.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/CachedDecompilation.java similarity index 94% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/CachedDecompilation.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/CachedDecompilation.java index 64019fb3d..d70c9604a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/CachedDecompilation.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/CachedDecompilation.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.helpers.Highlighting; import java.io.Serializable; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ClassesListTree.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java similarity index 96% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/ClassesListTree.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java index f9efb835d..62da0df75 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ClassesListTree.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.ClassPath; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ClassesListTreeModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTreeModel.java similarity index 92% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/ClassesListTreeModel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTreeModel.java index e41e9fd27..ddbe5d850 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ClassesListTreeModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTreeModel.java @@ -14,16 +14,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.ClassPath; import com.jpexs.decompiler.flash.abc.ScriptPack; import com.jpexs.decompiler.flash.abc.types.traits.Trait; import com.jpexs.decompiler.flash.abc.types.traits.TraitClass; +import com.jpexs.decompiler.flash.gui.MainFrame; import java.util.HashMap; import javax.swing.event.TreeModelListener; import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; class ClassIndexVisitor implements TreeVisitor { @@ -162,6 +164,6 @@ public class ClassesListTreeModel implements TreeModel { @Override public String toString() { - return "scripts"; + return translate("node.scripts"); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ConstantsListModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ConstantsListModel.java similarity index 96% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/ConstantsListModel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/ConstantsListModel.java index 61cb29ad5..de17c0efc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ConstantsListModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ConstantsListModel.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; import com.jpexs.decompiler.flash.helpers.Helper; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/DecompiledEditorPane.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java similarity index 96% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/DecompiledEditorPane.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java index 7f1c3129d..0b8002930 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/DecompiledEditorPane.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.Configuration; import com.jpexs.decompiler.flash.abc.ABC; @@ -33,6 +33,7 @@ import java.util.Timer; import java.util.TimerTask; import javax.swing.event.CaretEvent; import javax.swing.event.CaretListener; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretListener { @@ -350,7 +351,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL this.script = scriptLeaf; return; } - setText("//Please wait..."); + setText("//" + translate("pleasewait") + "..."); String hilightedCode = ""; cacheScriptPack(scriptLeaf, abcList); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/DeobfuscationDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DeobfuscationDialog.java similarity index 82% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/DeobfuscationDialog.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/DeobfuscationDialog.java index 661f333ab..fdea644a3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/DeobfuscationDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DeobfuscationDialog.java @@ -14,8 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; +import com.jpexs.decompiler.flash.gui.AppDialog; import com.jpexs.decompiler.flash.gui.View; import java.awt.Component; import java.awt.Container; @@ -33,9 +34,9 @@ import javax.swing.JSlider; * * @author JPEXS */ -public class DeobfuscationDialog extends JDialog implements ActionListener { +public class DeobfuscationDialog extends AppDialog implements ActionListener { - public JCheckBox processAllCheckbox = new JCheckBox("Process all classes"); + public JCheckBox processAllCheckbox = new JCheckBox(translate("processallclasses")); public JSlider codeProcessingLevel; public boolean ok = false; public static final int LEVEL_REMOVE_DEAD_CODE = 1; @@ -46,7 +47,7 @@ public class DeobfuscationDialog extends JDialog implements ActionListener { public DeobfuscationDialog() { setDefaultCloseOperation(HIDE_ON_CLOSE); setSize(new Dimension(300, 270)); - setTitle("PCode deobfuscation"); + setTitle(translate("dialog.title")); Container cp = getContentPane(); cp.setLayout(null); codeProcessingLevel = new JSlider(JSlider.VERTICAL, 1, 3, 3); @@ -54,15 +55,15 @@ public class DeobfuscationDialog extends JDialog implements ActionListener { codeProcessingLevel.setPaintTicks(true); codeProcessingLevel.setMinorTickSpacing(1); codeProcessingLevel.setSnapToTicks(true); - JLabel lab1 = new JLabel("Code deobfuscation level:"); + JLabel lab1 = new JLabel(translate("deobfuscation.level")); lab1.setBounds(30, 0, getWidth() - 60, 25); cp.add(lab1); Hashtable labelTable = new Hashtable(); //labelTable.put(new Integer(LEVEL_NONE), new JLabel("None")); - labelTable.put(new Integer(LEVEL_REMOVE_DEAD_CODE), new JLabel("Remove dead code")); - labelTable.put(new Integer(LEVEL_REMOVE_TRAPS), new JLabel("Remove traps")); - labelTable.put(new Integer(LEVEL_RESTORE_CONTROL_FLOW), new JLabel("Restore control flow")); + labelTable.put(new Integer(LEVEL_REMOVE_DEAD_CODE), new JLabel(translate("deobfuscation.removedeadcode"))); + labelTable.put(new Integer(LEVEL_REMOVE_TRAPS), new JLabel(translate("deobfuscation.removetraps"))); + labelTable.put(new Integer(LEVEL_RESTORE_CONTROL_FLOW), new JLabel(translate("deobfuscation.restorecontrolflow"))); codeProcessingLevel.setLabelTable(labelTable); codeProcessingLevel.setPaintLabels(true); @@ -79,10 +80,10 @@ public class DeobfuscationDialog extends JDialog implements ActionListener { processAllCheckbox.setSelected(true); - JButton cancelButton = new JButton("Cancel"); + JButton cancelButton = new JButton(translate("button.cancel")); cancelButton.addActionListener(this); cancelButton.setActionCommand("CANCEL"); - JButton okButton = new JButton("OK"); + JButton okButton = new JButton(translate("button.ok")); okButton.addActionListener(this); okButton.setActionCommand("OK"); okButton.setBounds(50, 200, 75, 25); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/DetailPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java similarity index 84% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/DetailPanel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java index a04d2f49c..b3d17c561 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/DetailPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.types.traits.Trait; import com.jpexs.decompiler.flash.gui.View; @@ -29,6 +29,7 @@ import java.util.ArrayList; import java.util.HashMap; import javax.swing.*; import javax.swing.border.BevelBorder; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; /** * @@ -39,13 +40,13 @@ public class DetailPanel extends JPanel implements ActionListener { public MethodTraitDetailPanel methodTraitPanel; public JPanel unsupportedTraitPanel; public SlotConstTraitDetailPanel slotConstTraitPanel; - public static final String METHOD_TRAIT_CARD = "Method/Getter/Setter Trait"; - public static final String UNSUPPORTED_TRAIT_CARD = "-"; - public static final String SLOT_CONST_TRAIT_CARD = "Slot/Const Trait"; + public static final String METHOD_TRAIT_CARD = translate("abc.detail.methodtrait"); + public static final String UNSUPPORTED_TRAIT_CARD = translate("abc.detail.unsupported"); + public static final String SLOT_CONST_TRAIT_CARD = translate("abc.detail.slotconsttrait"); private JPanel innerPanel; - public JButton saveButton = new JButton("Save", View.getIcon("save16")); - public JButton editButton = new JButton("Edit", View.getIcon("edit16")); - public JButton cancelButton = new JButton("Cancel", View.getIcon("cancel16")); + public JButton saveButton = new JButton(translate("button.save"), View.getIcon("save16")); + public JButton editButton = new JButton(translate("button.edit"), View.getIcon("edit16")); + public JButton cancelButton = new JButton(translate("button.cancel"), View.getIcon("cancel16")); private HashMap cardMap = new HashMap<>(); private String selectedCard; private JLabel selectedLabel; @@ -63,7 +64,7 @@ public class DetailPanel extends JPanel implements ActionListener { cardMap.put(METHOD_TRAIT_CARD, methodTraitPanel); unsupportedTraitPanel = new JPanel(new BorderLayout()); - JLabel unsup = new JLabel("Select class and click a trait in Actionscript source to edit it.", SwingConstants.CENTER); + JLabel unsup = new JLabel(translate("info.selecttrait"), SwingConstants.CENTER); unsupportedTraitPanel.add(unsup, BorderLayout.CENTER); cardMap.put(UNSUPPORTED_TRAIT_CARD, unsupportedTraitPanel); @@ -107,7 +108,7 @@ public class DetailPanel extends JPanel implements ActionListener { traitNameLabel = new JLabel(""); JPanel traitInfoPanel = new JPanel(); traitInfoPanel.setLayout(new BoxLayout(traitInfoPanel, BoxLayout.LINE_AXIS)); - traitInfoPanel.add(new JLabel(" Name:")); + traitInfoPanel.add(new JLabel(" " + translate("abc.detail.traitname"))); traitInfoPanel.add(traitNameLabel); topPanel.add(traitInfoPanel, BorderLayout.CENTER); add(topPanel, BorderLayout.NORTH); @@ -157,7 +158,7 @@ public class DetailPanel extends JPanel implements ActionListener { int lasttrait = abcPanel.decompiledTextArea.lastTraitIndex; abcPanel.decompiledTextArea.reloadClass(); abcPanel.decompiledTextArea.gotoTrait(lasttrait); - JOptionPane.showMessageDialog(this, "Trait Successfully saved"); + JOptionPane.showMessageDialog(this, translate("message.trait.saved")); } } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DialogMissingSymbolHandler.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DialogMissingSymbolHandler.java new file mode 100644 index 000000000..48c44896a --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DialogMissingSymbolHandler.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2010-2013 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.jpexs.decompiler.flash.gui.abc; + +import com.jpexs.decompiler.flash.abc.avm2.parser.MissingSymbolHandler; +import javax.swing.JOptionPane; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; + +public class DialogMissingSymbolHandler implements MissingSymbolHandler { + + @Override + public boolean missingString(String value) { + return JOptionPane.showConfirmDialog(null, translate("message.constant.new.string").replace("%value%", value), translate("message.constant.new.string.title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION; + } + + @Override + public boolean missingInt(long value) { + return JOptionPane.showConfirmDialog(null, translate("message.constant.new.integer").replace("%value%", "" + value), translate("message.constant.new.integer.title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION; + } + + @Override + public boolean missingUInt(long value) { + return JOptionPane.showConfirmDialog(null, translate("message.constant.new.unsignedinteger").replace("%value%", "" + value), translate("message.constant.new.unsignedinteger.title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION; + } + + @Override + public boolean missingDouble(double value) { + return JOptionPane.showConfirmDialog(null, translate("message.constant.new.double").replace("%value%", "" + value), translate("message.constant.new.double.title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION; + } +} diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/IconListRenderer.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java similarity index 95% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/IconListRenderer.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java index 391fb9480..f5b0db1d7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/IconListRenderer.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.gui.View; import java.awt.Component; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/LineMarkedEditorPane.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/LineMarkedEditorPane.java similarity index 95% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/LineMarkedEditorPane.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/LineMarkedEditorPane.java index a4536e3c2..7bdb5bf55 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/LineMarkedEditorPane.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/LineMarkedEditorPane.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import java.awt.Color; import java.awt.FontMetrics; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodBodyParamsPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodBodyParamsPanel.java similarity index 81% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodBodyParamsPanel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodBodyParamsPanel.java index 8fbe5d17a..3488ba993 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodBodyParamsPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodBodyParamsPanel.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.types.MethodBody; import java.awt.Color; @@ -23,6 +23,7 @@ import java.text.NumberFormat; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; /** * @@ -30,17 +31,17 @@ import javax.swing.event.ChangeListener; */ public class MethodBodyParamsPanel extends JPanel implements ChangeListener { - public JLabel maxStackLabel = new JLabel("Max stack:", SwingConstants.RIGHT); + public JLabel maxStackLabel = new JLabel(translate("abc.detail.body.params.maxstack"), SwingConstants.RIGHT); public JFormattedTextField maxStackField = new JFormattedTextField(NumberFormat.getNumberInstance()); - public JLabel localCountLabel = new JLabel("Local registers count:", SwingConstants.RIGHT); + public JLabel localCountLabel = new JLabel(translate("abc.detail.body.params.localregcount"), SwingConstants.RIGHT); public JFormattedTextField localCountField = new JFormattedTextField(NumberFormat.getNumberInstance()); - public JLabel initScopeDepthLabel = new JLabel("Minimum scope depth:", SwingConstants.RIGHT); + public JLabel initScopeDepthLabel = new JLabel(translate("abc.detail.body.params.minscope"), SwingConstants.RIGHT); public JFormattedTextField initScopeDepthField = new JFormattedTextField(NumberFormat.getNumberInstance()); - public JLabel maxScopeDepthLabel = new JLabel("Maximum scope depth:", SwingConstants.RIGHT); + public JLabel maxScopeDepthLabel = new JLabel(translate("abc.detail.body.params.maxscope"), SwingConstants.RIGHT); public JFormattedTextField maxScopeDepthField = new JFormattedTextField(NumberFormat.getNumberInstance()); public MethodBody body; - public JCheckBox autoFillCheckBox = new JCheckBox("Auto fill on code save (GLOBAL SETTING)"); - public JLabel experimentalLabel = new JLabel("...EXPERIMENTAL"); + public JCheckBox autoFillCheckBox = new JCheckBox(translate("abc.detail.body.params.autofill")); + public JLabel experimentalLabel = new JLabel(translate("abc.detail.body.params.autofill.experimental")); private ABCPanel abcPanel; public MethodBodyParamsPanel(ABCPanel abcPanel) { @@ -102,7 +103,7 @@ public class MethodBodyParamsPanel extends JPanel implements ChangeListener { body.max_scope_depth = Integer.parseInt(maxScopeDepthField.getText()); } else { if (!body.autoFillStats(abcPanel.abc)) { - JOptionPane.showMessageDialog(null, "Cannot get code stats for automatic body params.\r\nUncheck autofill to avoid this message.", "Warning", JOptionPane.WARNING_MESSAGE); + JOptionPane.showMessageDialog(null, translate("message.autofill.failed"), translate("message.warning"), JOptionPane.WARNING_MESSAGE); } } return true; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodCodePanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java similarity index 86% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodCodePanel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java index 0203cc8d1..694370810 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodCodePanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; @@ -30,6 +30,7 @@ import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JToggleButton; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; /** * @@ -87,25 +88,19 @@ public class MethodCodePanel extends JPanel implements ActionListener { buttonsPanel = new JPanel(); buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS)); - JButton verifyButton = new JButton("Verify"); - verifyButton.setActionCommand("VERIFYBODY"); - verifyButton.addActionListener(this); JButton graphButton = new JButton(View.getIcon("graph16")); graphButton.setActionCommand("GRAPH"); graphButton.addActionListener(this); - graphButton.setToolTipText("View Graph"); + graphButton.setToolTipText(translate("button.viewgraph")); graphButton.setMargin(new Insets(3, 3, 3, 3)); hexButton = new JToggleButton(View.getIcon("hex16")); hexButton.setActionCommand("HEX"); hexButton.addActionListener(this); - hexButton.setToolTipText("View Hex"); + hexButton.setToolTipText(translate("button.viewhex")); hexButton.setMargin(new Insets(3, 3, 3, 3)); - JButton execButton = new JButton("Execute"); - execButton.setActionCommand("EXEC"); - execButton.addActionListener(this); buttonsPanel.add(graphButton); buttonsPanel.add(hexButton); @@ -128,10 +123,6 @@ public class MethodCodePanel extends JPanel implements ActionListener { if (e.getActionCommand().equals("HEX")) { sourceTextArea.setHex(hexButton.isSelected()); } - - if (e.getActionCommand().equals("EXEC")) { - sourceTextArea.exec(); - } } public void setEditMode(boolean val) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodInfoPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodInfoPanel.java similarity index 89% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodInfoPanel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodInfoPanel.java index 2c9f0be39..dfe26e9c2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodInfoPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodInfoPanel.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.Configuration; import com.jpexs.decompiler.flash.abc.ABC; @@ -27,6 +27,7 @@ import java.awt.Font; import java.util.ArrayList; import javax.swing.*; import jsyntaxpane.syntaxkits.Flasm3MethodInfoSyntaxKit; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; /** * @@ -46,13 +47,13 @@ public class MethodInfoPanel extends JPanel { setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); JPanel miPanel = new JPanel(); miPanel.setLayout(new BoxLayout(miPanel, BoxLayout.LINE_AXIS)); - miPanel.add(new JLabel("Method Index:")); + miPanel.add(new JLabel(translate("abc.detail.methodinfo.methodindex"))); methodIndexLabel = new JLabel(" "); miPanel.add(methodIndexLabel); add(miPanel); - add(new JLabel("Parameters:")); + add(new JLabel(translate("abc.detail.methodinfo.parameters"))); add(new JScrollPane(paramEditor)); - add(new JLabel("Return value type:")); + add(new JLabel(translate("abc.detail.methodinfo.returnvalue"))); JScrollPane jsp = new JScrollPane(returnTypeEditor); add(jsp); paramEditor.setContentType("text/flasm3_methodinfo"); @@ -119,13 +120,13 @@ public class MethodInfoPanel extends JPanel { try { MethodInfoParser.parseParams(paramEditor.getText(), methodInfo, abc); } catch (ParseException ex) { - JOptionPane.showMessageDialog(paramEditor, ex.text, "MethodInfo Params Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(paramEditor, ex.text, translate("error.methodinfo.params"), JOptionPane.ERROR_MESSAGE); return false; } try { MethodInfoParser.parseReturnType(returnTypeEditor.getText(), methodInfo); } catch (ParseException ex) { - JOptionPane.showMessageDialog(returnTypeEditor, ex.text, "MethodInfo Return type Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(returnTypeEditor, ex.text, translate("error.methodinfo.returnvalue"), JOptionPane.ERROR_MESSAGE); return false; } return true; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodTraitDetailPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodTraitDetailPanel.java similarity index 82% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodTraitDetailPanel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodTraitDetailPanel.java index edf6cf86b..232681fd3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/MethodTraitDetailPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodTraitDetailPanel.java @@ -14,10 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; /** * @@ -35,9 +36,9 @@ public class MethodTraitDetailPanel extends JTabbedPane implements TraitDetail { methodCodePanel = new MethodCodePanel(abcPanel.decompiledTextArea); methodBodyParamsPanel = new MethodBodyParamsPanel(abcPanel); methodInfoPanel = new MethodInfoPanel(); - addTab("MethodInfo", methodInfoPanel); - addTab("MethodBody Code", methodCodePanel); - addTab("MethodBody params", new JScrollPane(methodBodyParamsPanel)); + addTab(translate("abc.detail.methodinfo"), methodInfoPanel); + addTab(translate("abc.detail.body.code"), methodCodePanel); + addTab(translate("abc.detail.body.params"), new JScrollPane(methodBodyParamsPanel)); setSelectedIndex(1); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/SlotConstTraitDetailPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java similarity index 89% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/SlotConstTraitDetailPanel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java index 292f93948..191bcfc11 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/SlotConstTraitDetailPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.methodinfo_parser.MethodInfoParser; @@ -26,6 +26,7 @@ import java.awt.BorderLayout; import java.util.ArrayList; import javax.swing.*; import jsyntaxpane.syntaxkits.Flasm3MethodInfoSyntaxKit; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; /** * @@ -40,7 +41,7 @@ public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail { public SlotConstTraitDetailPanel() { slotConstEditor = new JEditorPane(); setLayout(new BorderLayout()); - add(new JLabel("Type and Value:"), BorderLayout.NORTH); + add(new JLabel(translate("abc.detail.slotconst.typevalue")), BorderLayout.NORTH); add(new JScrollPane(slotConstEditor), BorderLayout.CENTER); slotConstEditor.setContentType("text/flasm3_methodinfo"); Flasm3MethodInfoSyntaxKit sk = (Flasm3MethodInfoSyntaxKit) slotConstEditor.getEditorKit(); @@ -74,7 +75,7 @@ public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail { return false; } } catch (ParseException ex) { - JOptionPane.showMessageDialog(slotConstEditor, ex.text, "SlotConst typevalue Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(slotConstEditor, ex.text, translate("error.slotconst.typevalue"), JOptionPane.ERROR_MESSAGE); return false; } return true; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitDetail.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitDetail.java similarity index 92% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitDetail.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitDetail.java index 9cad992a2..2e4042020 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitDetail.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitDetail.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; /** * diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsList.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java similarity index 95% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsList.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java index 2b69f99b0..3312216f5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsList.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.tags.ABCContainerTag; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListItem.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListItem.java similarity index 89% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListItem.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListItem.java index cec09abdc..bfd8ffeb2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListItem.java @@ -1,4 +1,4 @@ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.types.traits.Trait; @@ -7,6 +7,7 @@ import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; import com.jpexs.decompiler.flash.tags.ABCContainerTag; import java.util.ArrayList; import java.util.List; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; /** * @@ -21,8 +22,8 @@ public class TraitsListItem { private int classIndex; private int index; private int scriptIndex; - public static final String STR_INSTANCE_INITIALIZER = "instance initializer"; - public static final String STR_CLASS_INITIALIZER = "class initializer"; + public static final String STR_INSTANCE_INITIALIZER = translate("abc.traitslist.instanceinitializer"); + public static final String STR_CLASS_INITIALIZER = translate("abc.traitslist.classinitializer"); public TraitsListItem(Type type, int index, boolean isStatic, List abcTags, ABC abc, int classIndex, int scriptIndex) { this.type = type; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java similarity index 95% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListModel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java index 2cc22fde7..71f7f0f5a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.tags.ABCContainerTag; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/Tree.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/Tree.java similarity index 94% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/Tree.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/Tree.java index 47440f2a4..027a3fa82 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/Tree.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/Tree.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import java.util.StringTokenizer; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TreeElement.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TreeElement.java similarity index 95% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/TreeElement.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/TreeElement.java index 18f5e589c..014345745 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TreeElement.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TreeElement.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import java.util.*; import javax.swing.tree.TreePath; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TreeVisitor.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TreeVisitor.java similarity index 92% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/TreeVisitor.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/TreeVisitor.java index 6c256b04a..a4b546156 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TreeVisitor.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TreeVisitor.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; public interface TreeVisitor { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/UsageFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java similarity index 89% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/UsageFrame.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java index d606db10b..2cc90537f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/UsageFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java @@ -14,13 +14,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.usages.InsideClassMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.MethodMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.MultinameUsage; import com.jpexs.decompiler.flash.abc.usages.TraitMultinameUsage; +import com.jpexs.decompiler.flash.gui.AppFrame; import com.jpexs.decompiler.flash.gui.View; import com.jpexs.decompiler.flash.tags.ABCContainerTag; import java.awt.BorderLayout; @@ -37,10 +38,10 @@ import javax.swing.*; * * @author JPEXS */ -public class UsageFrame extends JFrame implements ActionListener, MouseListener { +public class UsageFrame extends AppFrame implements ActionListener, MouseListener { - private JButton gotoButton = new JButton("Go to"); - private JButton cancelButton = new JButton("Cancel"); + private JButton gotoButton = new JButton(translate("button.goto")); + private JButton cancelButton = new JButton(translate("button.cancel")); private JList usageList; private UsageListModel usageListModel; private ABC abc; @@ -71,7 +72,7 @@ public class UsageFrame extends JFrame implements ActionListener, MouseListener cont.add(new JScrollPane(usageList), BorderLayout.CENTER); cont.add(buttonsPanel, BorderLayout.SOUTH); setSize(400, 300); - setTitle("Usages:" + abc.constants.constant_multiname[multinameIndex].getNameWithNamespace(abc.constants)); + setTitle(translate("dialog.title") + abc.constants.constant_multiname[multinameIndex].getNameWithNamespace(abc.constants)); View.centerScreen(this); View.setWindowIcon(this); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/UsageListModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageListModel.java similarity index 94% rename from trunk/src/com/jpexs/decompiler/flash/abc/gui/UsageListModel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageListModel.java index 027cce7ce..fd2a73d60 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/UsageListModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageListModel.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.abc.gui; +package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.usages.MultinameUsage; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java similarity index 85% rename from trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java index e106182b7..04c1455cc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java @@ -14,13 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.action.gui; +package com.jpexs.decompiler.flash.gui.action; import com.jpexs.decompiler.flash.Configuration; import com.jpexs.decompiler.flash.DisassemblyListener; import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.TagNode; -import com.jpexs.decompiler.flash.abc.gui.LineMarkedEditorPane; +import com.jpexs.decompiler.flash.gui.abc.LineMarkedEditorPane; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.ActionGraph; import com.jpexs.decompiler.flash.action.parser.ParseException; @@ -71,27 +71,24 @@ import javax.swing.event.CaretListener; import javax.swing.tree.TreePath; import jsyntaxpane.DefaultSyntaxKit; import jsyntaxpane.actions.DocumentSearchData; +import static com.jpexs.decompiler.flash.gui.AppStrings.translate; public class ActionPanel extends JPanel implements ActionListener { - private boolean debugRecompile = false; public LineMarkedEditorPane editor; public LineMarkedEditorPane decompiledEditor; - public LineMarkedEditorPane recompiledEditor; public List list; public JSplitPane splitPane; - public JButton saveButton = new JButton("Save", View.getIcon("save16")); - public JButton editButton = new JButton("Edit", View.getIcon("edit16")); - public JButton cancelButton = new JButton("Cancel", View.getIcon("cancel16")); - public JLabel experimentalLabel = new JLabel("(Experimental)"); - public JButton editDecompiledButton = new JButton("Edit", View.getIcon("edit16")); - public JButton saveDecompiledButton = new JButton("Save", View.getIcon("save16")); - public JButton cancelDecompiledButton = new JButton("Cancel", View.getIcon("cancel16")); + public JButton saveButton = new JButton(translate("button.save"), View.getIcon("save16")); + public JButton editButton = new JButton(translate("button.edit"), View.getIcon("edit16")); + public JButton cancelButton = new JButton(translate("button.cancel"), View.getIcon("cancel16")); + public JLabel experimentalLabel = new JLabel(translate("action.edit.experimental")); + public JButton editDecompiledButton = new JButton(translate("button.edit"), View.getIcon("edit16")); + public JButton saveDecompiledButton = new JButton(translate("button.save"), View.getIcon("save16")); + public JButton cancelDecompiledButton = new JButton(translate("button.cancel"), View.getIcon("cancel16")); public JToggleButton hexButton; - public JButton saveHexButton = new JButton("Save hex"); - public JButton loadHexButton = new JButton("Load hex"); - public JLabel asmLabel = new JLabel("P-code source"); - public JLabel decLabel = new JLabel("ActionScript source"); + public JLabel asmLabel = new JLabel(translate("panel.disassembled")); + public JLabel decLabel = new JLabel(translate("panel.decompiled")); public List decompiledHilights = new ArrayList<>(); public List disassembledHilights = new ArrayList<>(); public String lastDisasm = ""; @@ -213,7 +210,7 @@ public class ActionPanel extends JPanel implements ActionListener { searchPanel.setVisible(true); searchFor = txt; updateSearchPos(); - searchForLabel.setText("Search for \"" + txt + "\" : "); + searchForLabel.setText(translate("search.info").replace("%text%", txt) + " "); } return true; } @@ -230,7 +227,7 @@ public class ActionPanel extends JPanel implements ActionListener { lastH = h; } long offset = lastH.offset; - editor.setText("; Getting hilights..."); + editor.setText("; " + translate("work.gettinghilights") + "..."); disassembledHilights = Highlighting.getInstrHighlights(text); String stripped = Highlighting.stripHilights(text); /*if(stripped.length()>30000){ @@ -256,14 +253,14 @@ public class ActionPanel extends JPanel implements ActionListener { public void setSource(ASMSource src, final boolean useCache) { this.src = src; - Main.startWork("Decompiling..."); + Main.startWork(translate("work.decompiling") + "..."); final ASMSource asm = (ASMSource) src; (new Thread() { @Override public void run() { - editor.setText("; Disassembling..."); + editor.setText("; " + translate("work.disassembling") + "..."); if ((Boolean) Configuration.getConfig("decompile", Boolean.TRUE)) { - decompiledEditor.setText("//Waiting for dissasembly..."); + decompiledEditor.setText("//" + translate("work.waitingfordissasembly") + "..."); } DisassemblyListener listener = new DisassemblyListener() { int percent = 0; @@ -278,20 +275,18 @@ public class ActionPanel extends JPanel implements ActionListener { if (((newpercent > percent) || (!this.phase.equals(phase))) && newpercent <= 100) { percent = newpercent; this.phase = phase; - editor.setText("; Disassembling - " + phase + " " + percent + "%..."); + editor.setText("; " + translate("work.disassembling") + " - " + phase + " " + percent + "%..."); } } }; asm.addDisassemblyListener(listener); lastDisasm = asm.getASMSource(SWF.DEFAULT_VERSION, true); asm.removeDisassemblyListener(listener); - editor.setText("; Disassembled"); srcWithHex = Helper.hexToComments(lastDisasm); srcNoHex = Helper.stripComments(lastDisasm); - editor.setText("; Disassembling - setting"); setHex(hexButton.isSelected()); if ((Boolean) Configuration.getConfig("decompile", Boolean.TRUE)) { - decompiledEditor.setText("//Decompiling..."); + decompiledEditor.setText("//" + translate("work.decompiling") + "..."); String stripped = ""; if (!useCache) { uncache(asm); @@ -303,15 +298,6 @@ public class ActionPanel extends JPanel implements ActionListener { lastDecompiled = sc.text; stripped = lastDecompiled; decompiledEditor.setText(lastDecompiled); - - if (debugRecompile) { - try { - ActionScriptParser ps = new ActionScriptParser(); - recompiledEditor.setText(Highlighting.stripHilights(com.jpexs.decompiler.flash.action.Action.actionsToString(new ArrayList(), 0, ps.parse(stripped), null, SWF.DEFAULT_VERSION, false, 0))); - } catch (ParseException | IOException ex) { - Logger.getLogger(ActionPanel.class.getName()).log(Level.SEVERE, null, ex); - } - } } setEditMode(false); setDecompiledEditMode(false); @@ -330,9 +316,6 @@ public class ActionPanel extends JPanel implements ActionListener { decompiledEditor = new LineMarkedEditorPane(); decompiledEditor.setEditable(false); - recompiledEditor = new LineMarkedEditorPane(); - recompiledEditor.setEditable(false); - searchPanel = new JPanel(new FlowLayout()); JButton prevSearchButton = new JButton(View.getIcon("prev16")); @@ -348,7 +331,7 @@ public class ActionPanel extends JPanel implements ActionListener { cancelSearchButton.addActionListener(this); cancelSearchButton.setActionCommand("SEARCHCANCEL"); searchPos = new JLabel("0/0"); - searchForLabel = new JLabel("Search for \"\": "); + searchForLabel = new JLabel(translate("search.info").replace("%text%", "")); searchPanel.add(searchForLabel); searchPanel.add(prevSearchButton); searchPanel.add(new JLabel("Script ")); @@ -360,13 +343,13 @@ public class ActionPanel extends JPanel implements ActionListener { JButton graphButton = new JButton(View.getIcon("graph16")); graphButton.setActionCommand("GRAPH"); graphButton.addActionListener(this); - graphButton.setToolTipText("View Graph"); + graphButton.setToolTipText(translate("button.viewgraph")); graphButton.setMargin(new Insets(3, 3, 3, 3)); hexButton = new JToggleButton(View.getIcon("hex16")); hexButton.setActionCommand("HEX"); hexButton.addActionListener(this); - hexButton.setToolTipText("View Hex"); + hexButton.setToolTipText(translate("button.viewhex")); hexButton.setMargin(new Insets(3, 3, 3, 3)); topButtonsPan = new JPanel(); @@ -411,11 +394,6 @@ public class ActionPanel extends JPanel implements ActionListener { //buttonsPan.add(loadHexButton); panB.add(buttonsPan, BorderLayout.SOUTH); - - saveHexButton.addActionListener(this); - saveHexButton.setActionCommand("SAVEHEXACTION"); - loadHexButton.addActionListener(this); - loadHexButton.setActionCommand("LOADHEXACTION"); saveButton.addActionListener(this); saveButton.setActionCommand("SAVEACTION"); editButton.addActionListener(this); @@ -451,16 +429,12 @@ public class ActionPanel extends JPanel implements ActionListener { decLabel.setBorder(new BevelBorder(BevelBorder.RAISED)); - JPanel panC = new JPanel(); - panC.setLayout(new BorderLayout()); - panC.add(new JScrollPane(recompiledEditor), BorderLayout.CENTER); - panC.add(new JLabel("Recompiled"), BorderLayout.NORTH); setLayout(new BorderLayout()); - add(splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panA, debugRecompile ? new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panB, panC) : panB), BorderLayout.CENTER); + add(splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panA, panB), BorderLayout.CENTER); splitPane.setResizeWeight(0.5); splitPane.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, new PropertyChangeListener() { @Override @@ -473,10 +447,6 @@ public class ActionPanel extends JPanel implements ActionListener { decompiledEditor.setContentType("text/actionscript"); decompiledEditor.setFont(new Font("Monospaced", Font.PLAIN, decompiledEditor.getFont().getSize())); - if (debugRecompile) { - recompiledEditor.setContentType("text/flasm"); - recompiledEditor.setFont(new Font("Monospaced", Font.PLAIN, editor.getFont().getSize())); - } //tagTree.addTreeSelectionListener(this); editor.addCaretListener(new CaretListener() { @Override @@ -627,7 +597,7 @@ public class ActionPanel extends JPanel implements ActionListener { try { src.setActions(ASMParser.parse(0, src.getPos(), true, new StringReader(editor.getText()), SWF.DEFAULT_VERSION), SWF.DEFAULT_VERSION); setSource(this.src, false); - JOptionPane.showMessageDialog(this, "Code successfully saved"); + JOptionPane.showMessageDialog(this, translate("message.action.saved")); saveButton.setVisible(false); cancelButton.setVisible(false); editButton.setVisible(true); @@ -635,7 +605,7 @@ public class ActionPanel extends JPanel implements ActionListener { editMode = false; } catch (IOException ex) { } catch (ParseException ex) { - JOptionPane.showMessageDialog(this, "" + ex.text + " on line " + ex.line, "Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, translate("error.action.save").replace("%error%", ex.text).replace("%line%", "" + ex.line), translate("error"), JOptionPane.ERROR_MESSAGE); } } else if (e.getActionCommand().equals("EDITDECOMPILED")) { setDecompiledEditMode(true); @@ -647,7 +617,7 @@ public class ActionPanel extends JPanel implements ActionListener { ActionScriptParser par = new ActionScriptParser(); src.setActions(par.parse(decompiledEditor.getText()), SWF.DEFAULT_VERSION); setSource(this.src, false); - JOptionPane.showMessageDialog(this, "Code successfully saved"); + JOptionPane.showMessageDialog(this, translate("message.action.saved")); saveDecompiledButton.setVisible(false); cancelDecompiledButton.setVisible(false); editDecompiledButton.setVisible(true); @@ -656,7 +626,7 @@ public class ActionPanel extends JPanel implements ActionListener { editDecompiledMode = false; } catch (IOException ex) { } catch (ParseException ex) { - JOptionPane.showMessageDialog(this, "" + ex.text + " on line " + ex.line, "Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, translate("error.action.save").replace("%error%", ex.text).replace("%line%", "" + ex.line), translate("error"), JOptionPane.ERROR_MESSAGE); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/gui/CachedScript.java b/trunk/src/com/jpexs/decompiler/flash/gui/action/CachedScript.java similarity index 92% rename from trunk/src/com/jpexs/decompiler/flash/action/gui/CachedScript.java rename to trunk/src/com/jpexs/decompiler/flash/gui/action/CachedScript.java index cca4fa7f2..b13b7315f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/gui/CachedScript.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/action/CachedScript.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.jpexs.decompiler.flash.action.gui; +package com.jpexs.decompiler.flash.gui.action; import com.jpexs.decompiler.flash.helpers.Highlighting; import java.io.Serializable; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java index c71d18498..78335f8b1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.flash.gui.proxy; import com.jpexs.decompiler.flash.Configuration; +import com.jpexs.decompiler.flash.gui.AppFrame; import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.gui.View; import com.jpexs.proxy.CatchedListener; @@ -38,11 +39,11 @@ import javax.swing.*; * * @author JPEXS */ -public class ProxyFrame extends JFrame implements ActionListener, CatchedListener, MouseListener, ReplacedListener { +public class ProxyFrame extends AppFrame implements ActionListener, CatchedListener, MouseListener, ReplacedListener { private JList swfList; private SWFListModel listModel; - private JButton switchButton = new JButton("Start proxy"); + private JButton switchButton = new JButton(translate("proxy.start")); private boolean started = false; private JTextField portField = new JTextField("55555"); private JCheckBox sniffSWFCheckBox = new JCheckBox("SWF", false); @@ -88,7 +89,7 @@ public class ProxyFrame extends JFrame implements ActionListener, CatchedListene portField.setPreferredSize(new Dimension(60, 22)); JPanel buttonsPanel = new JPanel(); buttonsPanel.setLayout(new FlowLayout()); - buttonsPanel.add(new Label("Port:")); + buttonsPanel.add(new Label(translate("port"))); buttonsPanel.add(portField); buttonsPanel.add(switchButton); cnt.add(buttonsPanel, BorderLayout.NORTH); @@ -99,19 +100,19 @@ public class ProxyFrame extends JFrame implements ActionListener, CatchedListene JPanel buttonsPanel2 = new JPanel(); buttonsPanel2.setLayout(new FlowLayout()); - JButton openButton = new JButton("Open"); + JButton openButton = new JButton(translate("open")); openButton.setActionCommand("OPEN"); openButton.addActionListener(this); buttonsPanel2.add(openButton); - JButton clearButton = new JButton("Clear"); + JButton clearButton = new JButton(translate("clear")); clearButton.setActionCommand("CLEAR"); clearButton.addActionListener(this); buttonsPanel2.add(clearButton); - JButton renameButton = new JButton("Rename"); + JButton renameButton = new JButton(translate("rename")); renameButton.setActionCommand("RENAME"); renameButton.addActionListener(this); buttonsPanel2.add(renameButton); - JButton removeButton = new JButton("Remove"); + JButton removeButton = new JButton(translate("remove")); removeButton.setActionCommand("REMOVE"); removeButton.addActionListener(this); buttonsPanel2.add(removeButton); @@ -119,7 +120,7 @@ public class ProxyFrame extends JFrame implements ActionListener, CatchedListene JPanel buttonsPanel3 = new JPanel(); buttonsPanel3.setLayout(new FlowLayout()); - buttonsPanel3.add(new JLabel("Sniff:")); + buttonsPanel3.add(new JLabel(translate("sniff"))); buttonsPanel3.add(sniffSWFCheckBox); buttonsPanel3.add(sniffOSCheckBox); //buttonsPanel3.add(sniffJSCheckBox); @@ -132,7 +133,7 @@ public class ProxyFrame extends JFrame implements ActionListener, CatchedListene setSize(400, 300); View.centerScreen(this); View.setWindowIcon(this); - setTitle("Proxy"); + setTitle(translate("dialog.title")); this.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { @@ -232,7 +233,7 @@ public class ProxyFrame extends JFrame implements ActionListener, CatchedListene } catch (NumberFormatException nfe) { } if ((port <= 0) || (port > 65535)) { - JOptionPane.showMessageDialog(this, "Wrong format for port number.", "Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, translate("error.port"), translate("error"), JOptionPane.ERROR_MESSAGE); started = false; return; } @@ -246,11 +247,11 @@ public class ProxyFrame extends JFrame implements ActionListener, CatchedListene catchedContentTypes.add("application/xml"); catchedContentTypes.add("application/octet-stream"); Server.startServer(port, Configuration.getReplacements(), catchedContentTypes, this, this); - switchButton.setText("Stop proxy"); + switchButton.setText(translate("proxy.stop")); portField.setEditable(false); } else { Server.stopServer(); - switchButton.setText("Start proxy"); + switchButton.setText(translate("proxy.start")); portField.setEditable(true); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.properties b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.properties new file mode 100644 index 000000000..01e9d206d --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.properties @@ -0,0 +1,26 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +proxy.start = Start proxy +proxy.stop = Stop proxy +port = Port: +open = Open +clear = Clear +rename = Rename +remove = Remove +sniff = Sniff: +dialog.title = Proxy +error = Error +error.port = Wrong format for port number. \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame_cs.properties new file mode 100644 index 000000000..953b214a0 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame_cs.properties @@ -0,0 +1,26 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +proxy.start = Spustit proxy +proxy.stop = Zastavit proxy +port = Port: +open = Otev\u0159\u00edt +clear = Vy\u010distit +rename = P\u0159ejmenovat +remove = Odebrat +sniff = Zachyt\u00e1vat: +dialog.title = Proxy +error = Chyba +error.port = \u0160patn\u00fd form\u00e1t pro \u010d\u00edslo portu. \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/AboutDialog.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/AboutDialog.properties new file mode 100644 index 000000000..5bef4a6e1 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/AboutDialog.properties @@ -0,0 +1,19 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +version = version +by = by +button.ok = OK +dialog.title = About \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/AboutDialog_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/AboutDialog_cs.properties new file mode 100644 index 000000000..277cfdd4d --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/AboutDialog_cs.properties @@ -0,0 +1,19 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +version = verze +by = autor: +button.ok = OK +dialog.title = O aplikaci \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/ExportDialog.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/ExportDialog.properties new file mode 100644 index 000000000..51d5401ef --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/ExportDialog.properties @@ -0,0 +1,42 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +shapes = Shapes +shapes.svg = SVG + +texts = Texts +texts.plain = Plain Text +texts.formatted = Formatted text + +images = Images +images.pngjpeg = PNG/JPEG + +movies = Movies +movies.flv = FLV (No audio) + +sounds = Sounds +sounds.mp3wavflv = MP3/WAV/FLV +sounds.flv = FLV (Audio only) + +actionscript = ActionScript +actionscript.as = AS +actionscript.pcode = PCODE + +dialog.title = Export... + +button.ok = OK +button.cancel = Cancel + + + diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/ExportDialog_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/ExportDialog_cs.properties new file mode 100644 index 000000000..af3a38343 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/ExportDialog_cs.properties @@ -0,0 +1,42 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +shapes = Tvary +shapes.svg = SVG + +texts = Texty +texts.plain = \u010cist\u00fd Text +texts.formatted = Form\u00e1tovan\u00fd text + +images = Obr\u00e1zky +images.pngjpeg = PNG/JPEG + +movies = Videa +movies.flv = FLV (bez zvuku) + +sounds = Zvuky +sounds.mp3wavflv = MP3/WAV/FLV +sounds.flv = FLV (pouze zvuk) + +actionscript = ActionScript +actionscript.as = AS +actionscript.pcode = P-k\u00f3d + +dialog.title = Exportovat... + +button.ok = OK +button.cancel = Storno + + + diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/GraphFrame.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/GraphFrame.properties new file mode 100644 index 000000000..6ffe76a05 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/GraphFrame.properties @@ -0,0 +1,16 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +graph = Graph \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/GraphFrame_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/GraphFrame_cs.properties new file mode 100644 index 000000000..67f081447 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/GraphFrame_cs.properties @@ -0,0 +1,16 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +graph = Graf \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/GraphTreeFrame.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/GraphTreeFrame.properties new file mode 100644 index 000000000..732ce2430 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/GraphTreeFrame.properties @@ -0,0 +1,15 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/LoadingDialog.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/LoadingDialog.properties new file mode 100644 index 000000000..3def8cabb --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/LoadingDialog.properties @@ -0,0 +1,16 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +loadingpleasewait = Loading, please wait... \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/LoadingDialog_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/LoadingDialog_cs.properties new file mode 100644 index 000000000..be9fefec3 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/LoadingDialog_cs.properties @@ -0,0 +1,16 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +loadingpleasewait = Nahr\u00e1v\u00e1m, vy\u010dkejte... \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/MainFrame.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/MainFrame.properties new file mode 100644 index 000000000..6dcda99d3 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/MainFrame.properties @@ -0,0 +1,211 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +menu.file = File +menu.file.open = Open... +menu.file.save = Save +menu.file.saveas = Save as... +menu.file.export.fla = Export to FLA +menu.file.export.all = Export all parts +menu.file.export.selection = Export selection +menu.file.exit = Exit + + +menu.tools = Tools +menu.tools.searchas = Search All ActionScript... +menu.tools.proxy = Proxy +menu.tools.deobfuscation = Deobfuscation +menu.tools.deobfuscation.pcode = PCode deobfuscation... +menu.tools.deobfuscation.globalrename = Globally rename identifier +menu.tools.deobfuscation.renameinvalid = Rename invalid identifiers +menu.tools.gotodocumentclass = Go to document class + +menu.settings = Settings +menu.settings.autodeobfuscation = Automatic deobfuscation +menu.settings.internalflashviewer = Use own Flash viewer +menu.settings.parallelspeedup = Parallel SpeedUp +menu.settings.disabledecompilation = Disable decompilation (Disassemble only) +menu.settings.addtocontextmenu = Add FFDec to SWF files context menu +menu.settings.language = Change language + +menu.help = Help +menu.help.checkupdates = Check for updates... +menu.help.helpus = Help us! +menu.help.homepage = Visit homepage +menu.help.about = About... + +contextmenu.remove = Remove + +button.save = Save +button.edit = Edit +button.cancel = Cancel +button.replace = Replace... + +notavailonthisplatform = Preview of this object is not available on this platform. (Windows only) + +swfpreview = SWF preview +swfpreview.internal = SWF preview (Internal viewer) + +parameters = Parameters + +rename.enternew = Enter new name: + +rename.finished.identifier = Identifier renamed. +rename.finished.multiname = %count% multiname(s) renamed. + +node.texts = texts +node.images = images +node.movies = movies +node.sounds = sounds +node.binaryData = binaryData +node.fonts = fonts +node.sprites = sprites +node.shapes = shapes +node.morphshapes = morphshapes +node.buttons = buttons +node.frames = frames +node.scripts = scripts + +message.warning = Warning +message.confirm.experimental = Following procedure can damage SWF file which can be then unplayable.\r\nUSE IT ON YOUR OWN RISK. Do you want to continue? +message.confirm.parallel = Parallelism can speed up loading and decompilation but uses more memory. +message.confirm.on = Do you want to turn this ON? +message.confirm.off = Do you want to turn this OFF? +message.confirm = Confirm + +message.confirm.autodeobfuscate = Automatic deobfuscation is a way to decompile obfuscated code.\r\nDeobfuscation leads to slower decompilation and some of the dead code may be eliminated.\r\nIf the code is not obfuscated, it's better to turn autodeobfuscation off. + +message.parallel = Parallelism +message.trait.saved = Trait successfully saved + + +message.constant.new.string = String "%value%" is not present in constants table. Do you want to add it? +message.constant.new.string.title = Add String +message.constant.new.integer = Integer value "%value%" is not present in constants table. Do you want to add it? +message.constant.new.integer.title = Add Integer +message.constant.new.unsignedinteger = Unsigned integer value "%value%" is not present in constants table. Do you want to add it? +message.constant.new.unsignedinteger.title = Add Unsigned integer +message.constant.new.double = Double value "%value%" is not present in constants table. Do you want to add it? +message.constant.new.double.title = Add Double + +work.buffering = Buffering +work.waitingfordissasembly = Waiting for dissasembly +work.gettinghilights = Getting hilights +work.disassembling = Disassembling +work.exporting = Exporting +work.searching = Searching +work.renaming = Renaming +work.exporting.fla = Exporting FLA +work.renaming.identifiers = Renaming identifiers +work.deobfuscating = Deobfuscating +work.decompiling = Decompiling +work.gettingvariables = Getting variables +work.reading.swf = Reading SWF +work.creatingwindow = Creating window +work.buildingscripttree = Building script tree + +work.deobfuscating.complete = Deobfuscation complete + + +message.search.notfound = String "%searchtext%" not found. +message.search.notfound.title = Not found + +message.rename.notfound.multiname = No multiname found under cursor +message.rename.notfound.identifier = No identifier found under cursor +message.rename.notfound.title = Not found +message.rename.renamed = Identifiers renamed: %count% + +filter.images = Images (*.jpg,*.gif,*.png) +filter.fla = Flash CS 6 Document (*.fla) +filter.xfl = Flash CS 6 Uncompressed Document (*.xfl) +filter.swf = SWF files (*.swf) + +error = Error +error.image.invalid = Invalid image. + +error.text.invalid = Invalid text: %text% on line %line% +error.file.save = Cannot save file +error.file.write = Cannot write to the file +error.export = Error during export + +export.select.directory = Select directory to export +export.finishedin = Exported in %time% + +update.check.title = Update check +update.check.nonewversion = No new version available. + +message.helpus = Please visit\r\n%url%\r\nfor details. +message.homepage = Visit homepage at: \r\n%url% + +proxy = Proxy +proxy.start = Start proxy +proxy.stop = Stop proxy +proxy.show = Show proxy +exit = Exit + +panel.disassembled = P-code source +panel.decompiled = ActionScript source + +search.info = Search for "%text%" : +search.script = Script + +constants = Constants + +pleasewait = Please wait + +abc.detail.methodtrait = Method/Getter/Setter Trait +abc.detail.unsupported = - +abc.detail.slotconsttrait = Slot/Const Trait +abc.detail.traitname = Name: + +abc.detail.body.params.maxstack = Max stack: +abc.detail.body.params.localregcount = Local registers count: +abc.detail.body.params.minscope = Minimum scope depth: +abc.detail.body.params.maxscope = Maximum scope depth: +abc.detail.body.params.autofill = Auto fill on code save (GLOBAL SETTING) +abc.detail.body.params.autofill.experimental = ...EXPERIMENTAL + +abc.detail.methodinfo.methodindex = Method Index: +abc.detail.methodinfo.parameters = Parameters: +abc.detail.methodinfo.returnvalue = Return value type: + +error.methodinfo.params = MethodInfo Params Error +error.methodinfo.returnvalue = MethodInfo Return type Error + + +abc.detail.methodinfo = MethodInfo +abc.detail.body.code = MethodBody Code +abc.detail.body.params = MethodBody params + +abc.detail.slotconst.typevalue = Type and Value: + +error.slotconst.typevalue = SlotConst typevalue Error + + +message.autofill.failed = Cannot get code stats for automatic body params.\r\nUncheck autofill to avoid this message. +info.selecttrait = Select class and click a trait in Actionscript source to edit it. + +button.viewgraph = View Graph +button.viewhex = View Hex + +abc.traitslist.instanceinitializer = instance initializer +abc.traitslist.classinitializer = class initializer + +action.edit.experimental = (Experimental) + +message.action.saved = Code successfully saved + +error.action.save = %error% on line %line% + diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/MainFrame_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/MainFrame_cs.properties new file mode 100644 index 000000000..91b9de4d8 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/MainFrame_cs.properties @@ -0,0 +1,210 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +menu.file = Soubor +menu.file.open = Otev\u0159\u00edt... +menu.file.save = Ulo\u017eit +menu.file.saveas = Ulo\u017eit jako... +menu.file.export.fla = Exportovat do FLA +menu.file.export.all = Exportovat v\u0161e +menu.file.export.selection = Exportovat vybran\u00e9 +menu.file.exit = Ukon\u010dit + + +menu.tools = N\u00e1stroje +menu.tools.searchas = Prohledat ActionScript... +menu.tools.proxy = Proxy +menu.tools.deobfuscation = Deobfuskace +menu.tools.deobfuscation.pcode = Deobfuskace P-k\u00f3du... +menu.tools.deobfuscation.globalrename = Glob\u00e1ln\u011b p\u0159ejmenovat identifik\u00e1tor +menu.tools.deobfuscation.renameinvalid = P\u0159ejmenovat neplatn\u00e9 identifik\u00e1tory +menu.tools.gotodocumentclass = P\u0159ej\u00edt na hlavn\u00ed t\u0159\u00eddu dokumentu + + +menu.settings = Nastaven\u00ed +menu.settings.autodeobfuscation = Automatick\u00e1 deobfuskace +menu.settings.internalflashviewer = Pou\u017e\u00edvat vlastn\u00ed prohl\u00ed\u017ee\u010d Flashe +menu.settings.parallelspeedup = Paraleln\u00ed zrychlen\u00ed +menu.settings.disabledecompilation = Zak\u00e1zat dekompilaci (Pouze P-k\u00f3d) +menu.settings.addtocontextmenu = P\u0159idat FFDec do kontextov\u00e9ho menu SWF +menu.settings.language = Zm\u011bnit jazyk + +menu.help = N\u00e1pov\u011bda +menu.help.checkupdates = Zkontrolovat novou verzi... +menu.help.helpus = Pomo\u017ete n\u00e1m! +menu.help.homepage = Nav\u0161t\u00edvit domovskou str\u00e1nku +menu.help.about = O aplikaci... + +contextmenu.remove = Odebrat + +button.save = Ulo\u017eit +button.edit = Upravit +button.cancel = Storno +button.replace = Nahradit... + +notavailonthisplatform = N\u00e1hled tohoto objektu nen\u00ed dostupn\u00fd na t\u00e9to platform\u011b. (pouze Windows) + +swfpreview = n\u00e1hled SWF +swfpreview.internal = n\u00e1hled SWF (vlastn\u00ed prohl\u00ed\u017ee\u010d) + +parameters = Parametry + +rename.enternew = Zadejte nov\u00fd n\u00e1zev: + +rename.finished.identifier = Identifik\u00e1tor p\u0159ejmenov\u00e1n. +rename.finished.multiname = %count% multiname p\u0159ejmenov\u00e1no. + +node.texts = texty +node.images = obr\u00e1zky +node.movies = videa +node.sounds = zvuky +node.binaryData = bin\u00e1rn\u00ed data +node.fonts = p\u00edsma +node.sprites = sprity +node.shapes = tvary +node.morphshapes = morphshapes +node.buttons = tla\u010d\u00edtka +node.frames = sn\u00edmky +node.scripts = skripty + +message.warning = Varov\u00e1n\u00ed +message.confirm.experimental = N\u00e1sleduj\u00edc\u00ed procedura m\u016f\u017ee po\u0161kodit SWF soubor kter\u00fd mo\u017en\u00e1 nep\u016fjde p\u0159ehr\u00e1t.\r\nPOU\u017d\u00cdVAT NA VLASTN\u00cd RIZIKO. Chcete pokra\u010dovat? +message.confirm.parallel = Paralelismus m\u016f\u017ee urychlit na\u010d\u00edt\u00e1n\u00ed a dekompilaci ale pou\u017e\u00edv\u00e1 v\u00edce pam\u011bti. +message.confirm.on = Chcete to ZAPNOUT? +message.confirm.off = Chcete to VYPNOUT? +message.confirm = Potvrzen\u00ed + +message.confirm.autodeobfuscate = Automatick\u00e1 deobfuskace je zp\u016fsob jak dekompilovat obfuskovan\u00fd k\u00f3d.\r\nDeobfuskace vede k pomalej\u0161\u00ed dekompilaci a n\u011bkter\u00fd nepou\u017eit\u00fd k\u00f3d m\u016f\u017ee b\u00fdt odstran\u011bn.\r\nPokud k\u00f3d nen\u00ed obfuskovan\u00fd, je lep\u0161\u00ed autodeobfuskaci vypnout. + +message.parallel = Paralelismus +message.trait.saved = Vlastnost \u00fasp\u011b\u0161ne ulo\u017eena + + +message.constant.new.string = \u0158et\u011bzec "%value%" neexistuje v tabulce konstant. Chcete ho p\u0159idat? +message.constant.new.string.title = P\u0159idat \u0158et\u011bzec +message.constant.new.integer = Cel\u00e9 \u010d\u00edslo "%value%" neexistuje v tabulce konstant. Chcete ho p\u0159idat? +message.constant.new.integer.title = P\u0159idat Cel\u00e9 \u010d\u00edslo +message.constant.new.unsignedinteger = P\u0159irozen\u00e9 \u010d\u00edslo "%value%" neexistuje v tabulce konstant. Chcete ho p\u0159idat? +message.constant.new.unsignedinteger.title = P\u0159idat P\u0159irozen\u00e9 \u010d\u00edslo +message.constant.new.double = Racion\u00e1ln\u00ed \u010d\u00edslo "%value%" neexistuje v tabulce konstant. Chcete ho p\u0159idat? +message.constant.new.double.title = P\u0159idat Racion\u00e1ln\u00ed \u010d\u00edslo + +work.buffering = Na\u010d\u00edt\u00e1n\u00ed +work.waitingfordissasembly = \u010cek\u00e1n\u00ed na disassemblaci +work.gettinghilights = Z\u00edsk\u00e1v\u00e1n\u00ed zv\u00fdraz\u011bn\u00ed +work.disassembling = Disassemblov\u00e1n\u00ed +work.exporting = Exportov\u00e1n\u00ed +work.searching = Vyhled\u00e1v\u00e1n\u00ed +work.renaming = P\u0159ejmenov\u00e1n\u00ed +work.exporting.fla = Exportov\u00e1n\u00ed FLA +work.renaming.identifiers = P\u0159ejmenov\u00e1n\u00ed identifik\u00e1tor\u016f +work.deobfuscating = Deobfuskov\u00e1n\u00ed +work.decompiling = Dekompilov\u00e1n\u00ed +work.gettingvariables = Z\u00edsk\u00e1v\u00e1m prom\u011bnn\u00e9 +work.reading.swf = \u010cten\u00ed SWF +work.creatingwindow = Vytv\u00e1\u0159en\u00ed okna +work.buildingscripttree = Vytv\u00e1\u0159en\u00ed stromu skript\u016f + +work.deobfuscating.complete = Deobfuskace kompletn\u00ed + + +message.search.notfound = \u0158et\u011bzec "%searchtext%" nenalezen. +message.search.notfound.title = Nenalezeno + +message.rename.notfound.multiname = Na m\u00edst\u011b kurzoru nen\u00ed \u017e\u00e1dn\u00e9 multiname +message.rename.notfound.identifier = Na m\u00edst\u011b kurzoru nen\u00ed \u017e\u00e1dn\u00fd identifik\u00e1tor +message.rename.notfound.title = Nenalezeno +message.rename.renamed = Po\u010det p\u0159ejmenovan\u00fdch identifik\u00e1tor\u016f: %count% + +filter.images = Obr\u00e1zky (*.jpg,*.gif,*.png) +filter.fla = Dokument Flash CS 6 (*.fla) +filter.xfl = Nekomprimovan\u00fd Dokument Flash CS 6 (*.xfl) +filter.swf = SWF soubory (*.swf) + +error = Chyba +error.image.invalid = Neplatn\u00fd obr\u00e1zek. + +error.text.invalid = Neplatn\u00fd text: %text% na \u0159\u00e1dku %line% +error.file.save = Nelze ulo\u017eit soubor +error.file.write = Nelze zapisovat do souboru +error.export = Chyba b\u011bhem exportu + +export.select.directory = Vyberte adres\u00e1\u0159 pro export +export.finishedin = Exportov\u00e1no za %time% + +update.check.title = Vyhled\u00e1n\u00ed aktualizac\u00ed +update.check.nonewversion = Nov\u011bj\u0161\u00ed verze nebyla nalezena. + +message.helpus = Pros\u00edm nav\u0161tivte\r\n%url%\r\npro detaily. +message.homepage = Nav\u0161tivte domovskou str\u00e1nku na: \r\n%url% + +proxy = Proxy +proxy.start = Spustit proxy +proxy.stop = Zastavit proxy +proxy.show = Zobrazit proxy +exit = Ukon\u010den\u00ed + +panel.disassembled = Zdrojov\u00fd P-k\u00f3d +panel.decompiled = Zdrojov\u00fd ActionScript + +search.info = Hlead\u00e1n\u00ed "%text%" : +search.script = Skript + +constants = Konstanty + +pleasewait = Pros\u00edm \u010dekejte + +abc.detail.methodtrait = Vlastnost Metoda/Getter/Setter +abc.detail.unsupported = - +abc.detail.slotconsttrait = Vlastnost Slot/Konstanta +abc.detail.traitname = N\u00e1zev: + +abc.detail.body.params.maxstack = Maxim\u00e1ln\u00ed stack: +abc.detail.body.params.localregcount = Po\u010det lok\u00e1ln\u00edch registr\u016f: +abc.detail.body.params.minscope = Min\u00e1ln\u00ed hloubka scope : +abc.detail.body.params.maxscope = Maxim\u00e1ln\u00ed hloubka scope : +abc.detail.body.params.autofill = Automaticky vyplnit p\u0159i ulo\u017een\u00ed (GLOB\u00c1LN\u00cd NASTAVEN\u00cd) +abc.detail.body.params.autofill.experimental = ...EXPERIMENT\u00c1LN\u00cd + +abc.detail.methodinfo.methodindex = Index metody: +abc.detail.methodinfo.parameters = Parametry: +abc.detail.methodinfo.returnvalue = Typ n\u00e1vratov\u00e9 hodnoty: + +error.methodinfo.params = Chyba parametr\u016f MethodInfo +error.methodinfo.returnvalue = Chyba n\u00e1vrat\u00e9ho typu MethodInfo + +abc.detail.methodinfo = MethodInfo +abc.detail.body.code = MethodBody K\u00f3d +abc.detail.body.params = MethodBody parametry + +abc.detail.slotconst.typevalue = Typ a Hodnota: + +error.slotconst.typevalue = Chyba typu a hodnoty SlotConst + + +message.autofill.failed = Nelze z\u00edskat statistiky k\u00f3du pro automatick\u00e9 parametry body.\r\nOd\u0161krtn\u011bte automatick\u00e9 vypl\u0148ov\u00e1n\u00ed pro zamezen\u00ed t\u00e9to zpr\u00e1vy. +info.selecttrait = Vyberte t\u0159\u00eddu a klikn\u011bte na vlastnost v zdrojov\u00e9m ActionScriptu pro \u00fapravy. + +button.viewgraph = Zobrazit Graf +button.viewhex = Zobrazit Hex + +abc.traitslist.instanceinitializer = inicializ\u00e1tor instance +abc.traitslist.classinitializer = inicializ\u00e1tor t\u0159\u00eddy + +action.edit.experimental = (Experiment\u00e1ln\u00ed) + +message.action.saved = K\u00f3d \u00fasp\u011b\u0161n\u011b ulo\u017een + +error.action.save = %error% na \u0159\u00e1dku %line% \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/ModeFrame.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/ModeFrame.properties new file mode 100644 index 000000000..705f38ef5 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/ModeFrame.properties @@ -0,0 +1,18 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +button.open = Open local file +button.proxy = Open via proxy +button.exit = Exit application diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/ModeFrame_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/ModeFrame_cs.properties new file mode 100644 index 000000000..cc5533938 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/ModeFrame_cs.properties @@ -0,0 +1,18 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +button.open = Otev\u0159\u00edt soubor z disku +button.proxy = Otev\u0159\u00edt soubor p\u0159es proxy +button.exit = Ukon\u010dit aplikaci diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/NewVersionDialog.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/NewVersionDialog.properties new file mode 100644 index 000000000..665a45d22 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/NewVersionDialog.properties @@ -0,0 +1,25 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +version = version +releasedate = Release date: +newversionavailable = New version is available: +changeslog = Changeslog: +downloadnow = Download now? +button.ok = OK +button.cancel = Cancel +dialog.title = New version available +newversion = New version +newvermessage = New version of %oldAppName% is available: %newAppName%.\r\nPlease go to %projectPage% to download it. \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/NewVersionDialog_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/NewVersionDialog_cs.properties new file mode 100644 index 000000000..cfcbacb95 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/NewVersionDialog_cs.properties @@ -0,0 +1,25 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +version = verze +releasedate = Datum vyd\u00e1n\u00ed: +newversionavailable = Je dostupn\u00e1 nov\u00e1 verze: +changeslog = Zm\u011bny: +downloadnow = Stahnout te\u010f? +button.ok = OK +button.cancel = Storno +dialog.title = Dostupn\u00e1 nov\u00e1 verze +newversion = Nov\u00e1 verze +newvermessage = Nov\u00e1 verze %oldAppName% je dostupn\u00e1: %newAppName%.\r\nPros\u00edm nav\u0161tivte %projectPage% pro jej\u00ed sta\u017een\u00ed. \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/RenameDialog.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/RenameDialog.properties new file mode 100644 index 000000000..33a202a01 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/RenameDialog.properties @@ -0,0 +1,22 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +rename.type = Rename type: +rename.type.typenumber = Type + Number (class_27, method_456,...) +rename.type.randomword = Random word (abada, kof, supo, kosuri,...) +dialog.title = Rename Identifiers + +button.ok = OK +button.cancel = Cancel \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/RenameDialog_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/RenameDialog_cs.properties new file mode 100644 index 000000000..f93aef9b8 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/RenameDialog_cs.properties @@ -0,0 +1,22 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +rename.type = Druh p\u0159ejmenov\u00e1n\u00ed: +rename.type.typenumber = Typ + \u010c\u00edslo (class_27, method_456,...) +rename.type.randomword = N\u00e1hodn\u00e9 slovo (abada, kof, supo, kosuri,...) +dialog.title = P\u0159ejmenovat identifik\u00e1tory + +button.ok = OK +button.cancel = Storno \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/SearchDialog.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/SearchDialog.properties new file mode 100644 index 000000000..5b5f53c39 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/SearchDialog.properties @@ -0,0 +1,23 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +checkbox.ignorecase = Ignore case +checkbox.regexp = Regular expression +button.ok = OK +button.cancel = Cancel +label.searchtext = Search text: +dialog.title = ActionScript search + +error = Error +error.invalidregexp = Invalid pattern \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/SearchDialog_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/SearchDialog_cs.properties new file mode 100644 index 000000000..5e9d41e1e --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/SearchDialog_cs.properties @@ -0,0 +1,23 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +checkbox.ignorecase = Nerozli\u0161ovat velikost p\u00edsmen +checkbox.regexp = Regul\u00e1rn\u00ed v\u00fdraz +button.ok = OK +button.cancel = Storno +label.searchtext = Hledat text: +dialog.title = Hledat v ActionScriptu + +error = Chyba +error.invalidregexp = Neplatn\u00fd regul\u00e1rn\u00ed v\u00fdraz \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/SelectLanguageDialog.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/SelectLanguageDialog.properties new file mode 100644 index 000000000..91c4a40c7 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/SelectLanguageDialog.properties @@ -0,0 +1,17 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +button.ok = OK +button.cancel = Cancel \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/SelectLanguageDialog_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/SelectLanguageDialog_cs.properties new file mode 100644 index 000000000..4470b4da8 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/SelectLanguageDialog_cs.properties @@ -0,0 +1,17 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +button.ok = OK +button.cancel = Storno \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/DeobfuscationDialog.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/DeobfuscationDialog.properties new file mode 100644 index 000000000..3428a4fee --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/DeobfuscationDialog.properties @@ -0,0 +1,24 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +processallclasses = Process all classes +dialog.title = PCode deobfuscation +deobfuscation.level = Code deobfuscation level: +deobfuscation.removedeadcode = Remove dead code +deobfuscation.removetraps = Remove traps +deobfuscation.restorecontrolflow = Restore control flow + +button.ok = OK +button.cancel = Cancel \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/DeobfuscationDialog_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/DeobfuscationDialog_cs.properties new file mode 100644 index 000000000..dca6cf449 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/DeobfuscationDialog_cs.properties @@ -0,0 +1,24 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +processallclasses = Proj\u00edt v\u0161echny t\u0159\u00eddy +dialog.title = Deobfuskace P-k\u00f3du +deobfuscation.level = \u00darove\u0148 deobfuskace k\u00f3du: +deobfuscation.removedeadcode = Odstranit nepou\u017eit\u00fd k\u00f3d +deobfuscation.removetraps = Odstranit pasti +deobfuscation.restorecontrolflow = Obnovit control flow + +button.ok = OK +button.cancel = Storno \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/UsageFrame.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/UsageFrame.properties new file mode 100644 index 000000000..9d07e04d6 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/UsageFrame.properties @@ -0,0 +1,18 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +button.goto = Go to +button.cancel = Cancel +dialog.title = Usages: \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/UsageFrame_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/UsageFrame_cs.properties new file mode 100644 index 000000000..88c3b7284 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/resources/abc/UsageFrame_cs.properties @@ -0,0 +1,18 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +button.goto = P\u0159ej\u00edt na +button.cancel = Storno +dialog.title = Pou\u017eit\u00ed: \ No newline at end of file