diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java index b8320409e..b7d80c6d6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java @@ -20,14 +20,21 @@ import com.jpexs.decompiler.flash.ApplicationInfo; import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.console.ContextMenuTools; +import com.jpexs.decompiler.flash.gui.helpers.CheckResources; import com.jpexs.decompiler.flash.tags.ABCContainerTag; import com.jpexs.helpers.Cache; +import com.jpexs.helpers.utf8.Utf8Helper; import com.jpexs.process.ProcessTools; import com.sun.jna.Platform; import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.ScrollPane; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.PrintStream; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.List; @@ -37,6 +44,8 @@ import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JCheckBox; import javax.swing.JCheckBoxMenuItem; +import javax.swing.JDialog; +import javax.swing.JEditorPane; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.SwingUtilities; @@ -104,6 +113,7 @@ public class MainFrameRibbonMenu implements MainFrameMenu, ActionListener { static final String ACTION_REMOVE_NON_SCRIPTS = "REMOVENONSCRIPTS"; static final String ACTION_REFRESH_DECOMPILED = "REFRESHDECOMPILED"; static final String ACTION_CLEAR_RECENT_FILES = "CLEARRECENTFILES"; + static final String ACTION_CHECK_RESOURCES = "CHECKRESOURCES"; private final MainFrameRibbon mainFrame; @@ -466,8 +476,12 @@ public class MainFrameRibbonMenu implements MainFrameMenu, ActionListener { JCommandButton refreshDecompiledCommandButton = new JCommandButton(fixCommandTitle("Refresh decompiled script"), View.getResizableIcon("update16")); assignListener(refreshDecompiledCommandButton, ACTION_REFRESH_DECOMPILED); + JCommandButton checkResourcesCommandButton = new JCommandButton(fixCommandTitle("Check resources"), View.getResizableIcon("update16")); + assignListener(checkResourcesCommandButton, ACTION_CHECK_RESOURCES); + debugBand.addCommandButton(removeNonScriptsCommandButton, RibbonElementPriority.MEDIUM); debugBand.addCommandButton(refreshDecompiledCommandButton, RibbonElementPriority.MEDIUM); + debugBand.addCommandButton(checkResourcesCommandButton, RibbonElementPriority.MEDIUM); return new RibbonTask("Debug", debugBand); } @@ -714,6 +728,31 @@ public class MainFrameRibbonMenu implements MainFrameMenu, ActionListener { case ACTION_REFRESH_DECOMPILED: mainFrame.panel.refreshDecompiled(); break; + case ACTION_CHECK_RESOURCES: + ByteArrayOutputStream os = new ByteArrayOutputStream(); + PrintStream stream = new PrintStream(os); + CheckResources.checkResources(stream); + final String str = new String(os.toByteArray(), Utf8Helper.charset); + JDialog dialog = new JDialog() { + + @Override + public void setVisible(boolean bln) { + setSize(new Dimension(800, 600)); + Container cnt = getContentPane(); + cnt.setLayout(new BorderLayout()); + ScrollPane scrollPane = new ScrollPane(); + JEditorPane editor = new JEditorPane(); + editor.setEditable(false); + editor.setText(str); + scrollPane.add(editor); + this.add(scrollPane, BorderLayout.CENTER); + this.setModal(true); + View.centerScreen(this); + super.setVisible(bln); + } + }; + dialog.setVisible(true); + break; } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/helpers/CheckResources.java b/trunk/src/com/jpexs/decompiler/flash/gui/helpers/CheckResources.java index c77a13b62..479d30e3d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/helpers/CheckResources.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/helpers/CheckResources.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.gui.AdvancedSettingsDialog; import com.jpexs.decompiler.flash.gui.ErrorLogFrame; import com.jpexs.decompiler.flash.gui.ExportDialog; import com.jpexs.decompiler.flash.gui.FontEmbedDialog; +import com.jpexs.decompiler.flash.gui.FontPreviewDialog; import com.jpexs.decompiler.flash.gui.GraphFrame; import com.jpexs.decompiler.flash.gui.LoadFromCacheFrame; import com.jpexs.decompiler.flash.gui.LoadFromMemoryFrame; @@ -38,6 +39,7 @@ import com.jpexs.decompiler.flash.gui.proxy.ProxyFrame; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; +import java.io.PrintStream; import java.util.Properties; import java.util.Set; import java.util.logging.Level; @@ -49,13 +51,14 @@ import java.util.logging.Logger; */ public class CheckResources { - public static void checkResources() { + public static void checkResources(PrintStream stream) { Class[] classes = new Class[]{ AboutDialog.class, AdvancedSettingsDialog.class, ErrorLogFrame.class, ExportDialog.class, FontEmbedDialog.class, + FontPreviewDialog.class, GraphFrame.class, // GraphTreeFrame.class, // empty LoadFromCacheFrame.class, @@ -72,19 +75,18 @@ public class CheckResources { NewTraitDialog.class, UsageFrame.class,}; for (Class clazz : classes) { - checkResources(clazz); + checkResources(clazz, stream); } - System.exit(0); } - public static void checkResources(Class clazz) { + public static void checkResources(Class clazz, PrintStream stream) { try { Properties prop = new Properties(); String[] languages = SelectLanguageDialog.getAvailableLanguages(); String resourcePath = getResourcePath(clazz, null); InputStream is = CheckResources.class.getResourceAsStream(resourcePath); if (is == null) { - System.out.println("Resource file not found: " + resourcePath); + stream.println("Resource file not found: " + resourcePath); return; } prop.load(is); @@ -98,7 +100,7 @@ public class CheckResources { resourcePath = getResourcePath(clazz, lang); is = CheckResources.class.getResourceAsStream(resourcePath); if (is == null) { - System.out.println(lang + ": Resource file not found: " + resourcePath); + stream.println(lang + ": Resource file not found: " + resourcePath); continue; } prop2.load(is); @@ -106,7 +108,7 @@ public class CheckResources { for (Object key : keys) { String value = prop2.getProperty((String) key); if (value == null) { - System.out.println(lang + ": Property not found in resource file: " + clazz.getSimpleName() + ", property: " + key); + stream.println(lang + ": Property not found in resource file: " + clazz.getSimpleName() + ", property: " + key); } } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_es.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_es.properties new file mode 100644 index 000000000..18f9349b5 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_es.properties @@ -0,0 +1,20 @@ +# 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 . + +advancedSettings.dialog.title = Configuraci\u00f3n avanzados +advancedSettings.columns.name = Nombre +advancedSettings.columns.value = Valor +advancedSettings.columns.description = Descripci\u00f3n +default = por defecto diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/LoadFromMemoryFrame_es.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/LoadFromMemoryFrame_es.properties index 8e0507542..795a8e2fc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/LoadFromMemoryFrame_es.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/LoadFromMemoryFrame_es.properties @@ -23,4 +23,9 @@ swfitem = [Versi\u00f3n del SWF %version% tama\u00f1o %size%] notfound = No se encontr\u00f3 ning\u00fan SWF #after version 1.7.1: -button.save = Guardar \ No newline at end of file +button.save = Guardar + +column.version = Versi\u00f3n +column.fileSize = Tama\u00f1o del archivo +column.pid = Identificador del proceso +column.processName = Nombre del proceso \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/LoadFromMemoryFrame_ru.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/LoadFromMemoryFrame_ru.properties index b6538c037..8b55a2187 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/LoadFromMemoryFrame_ru.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/LoadFromMemoryFrame_ru.properties @@ -23,4 +23,9 @@ swfitem = [\u0412\u0435\u0440\u0441\u0438\u044f SWF %version% \u0440\u0430\u0437 notfound = SWF \u0444\u0430\u0439\u043b\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b #after version 1.7.1: -button.save = \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \ No newline at end of file +button.save = \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c + +column.version = \u0412\u0435\u0440\u0441\u0438\u044f +column.fileSize = \u0420\u0430\u0437\u043c\u0435\u0440 +column.pid = PID +column.processName = \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_es.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_es.properties index 072f2b520..8d0a1761a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_es.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_es.properties @@ -374,3 +374,53 @@ work.canceled = Cancelado work.restoringControlFlow = Restaurando control de flujo menu.advancedsettings.advancedsettings = Opciones Avanzadas menu.recentFiles = Archivos recientes + +#after version 1.7.4 +work.restoringControlFlow.complete = Control de Flujo restaurado +message.confirm.recentFileNotFound = Archivo no encontrado. Desea removerlo de la lista de archivos recientes? +contextmenu.closeSwf = Cerrar SWF +menu.settings.autoRenameIdentifiers = Auto renombrar identificadores +menu.file.saveasexe = Guardar como ejecutable... +filter.exe = Archivos ejecutables (*.exe) + +#after version 1.8.0 +font.updateTexts = Actualizar textos + +#after version 1.8.0u1 +menu.file.close = Cerrar +menu.file.closeAll = Cerrar todos +menu.tools.otherTools = Otros +menu.tools.otherTools.clearRecentFiles = Limpiar archivos recientes +fontName.name = Nombre de fuentes para mostrar: +fontName.copyright = Derechos de autor de la fuente: +button.preview = Vista previa +button.reset = Reiniciar +errors.info = Hay INFORMATIONS en el log. Clickear para ver. +errors.warning = Hay WARNINGS en el log. Clickear para ver. + +decompilationError = Error de decompilaci\u00f3n +decompilationError.timeout = Tiempo de espera ({0}) alcanzado +decompilationError.timeout.description = No decompilado debido al tiempo de espera +decompilationError.obfuscated = El c\u00f3digo puede estar ofuscado +decompilationError.errorType = Tipo de error +decompilationError.error.description = No decompilado debido a un error + +#example: 1 hour and 2 minutes +timeFormat.and = y +timeFormat.hour = hora +timeFormat.hours = horas +timeFormat.minute = minuto +timeFormat.minutes = minutos +timeFormat.second = segundo +timeFormat.seconds = segundos + +disassemblingProgress.toString = toString +disassemblingProgress.reading = Leyendo +disassemblingProgress.deobfuscating = Desofuscando +decompilation.skipped = Decompilaci\u00f3n omitida +decompilation.unsupported = No soportado por el decompilador +decompilerMark = marca del decompilador + +open.error = Error +open.error.fileNotFound = Archivo no encontrado +open.error.cannotOpen = No se puede abrir el archivo \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties index 62cfe30fd..4b312906c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties @@ -422,3 +422,7 @@ disassemblingProgress.deobfuscating = \u0414\u0435\u043e\u0431\u0444\u0443\u0441 decompilation.skipped = \u0414\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u0430 decompilation.unsupported = \u041d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c decompilerMark = decompiler mark + +open.error = \u041e\u0448\u0438\u0431\u043a\u0430 +open.error.fileNotFound = \u0424\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d +open.error.cannotOpen = \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b \ No newline at end of file