From 49d5470f93202cb46f86a2fe07f1790249d240fa Mon Sep 17 00:00:00 2001 From: Honfika Date: Sat, 18 Jan 2014 13:27:42 +0100 Subject: [PATCH] missing localizations --- .../com/jpexs/decompiler/flash/abc/types/MethodBody.java | 5 +++-- trunk/src/com/jpexs/decompiler/flash/action/Action.java | 2 +- .../jpexs/decompiler/flash/action/ActionListReader.java | 7 ++++--- .../flash/action/model/UnsupportedActionItem.java | 3 ++- trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java | 2 +- .../com/jpexs/decompiler/flash/gui/action/ActionPanel.java | 2 +- .../decompiler/flash/gui/locales/MainFrame.properties | 7 +++++++ .../decompiler/flash/gui/locales/MainFrame_hu.properties | 6 ++++++ trunk/src/com/jpexs/decompiler/graph/MarkItem.java | 3 ++- 9 files changed, 27 insertions(+), 10 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java index 7f0a74f5e..3487211cd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.flash.abc.types; +import com.jpexs.decompiler.flash.AppStrings; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.CodeStats; @@ -121,7 +122,7 @@ public class MethodBody implements Cloneable, Serializable { code.toASMSource(constants, trait, method_info[this.method_info], this, exportMode, writer); } else { if (!Configuration.decompile.get()) { - writer.appendNoHilight("//Decompilation skipped").newLine(); + writer.appendNoHilight("//" + AppStrings.translate("decompilation.skipped")).newLine(); return; } int timeout = Configuration.decompilationTimeoutSingleMethod.get(); @@ -162,7 +163,7 @@ public class MethodBody implements Cloneable, Serializable { if (!Configuration.decompile.get()) { writer.indent(); writer.startMethod(this.method_info); - writer.appendNoHilight("//Decompilation skipped").newLine(); + writer.appendNoHilight("//" + AppStrings.translate("decompilation.skipped")).newLine(); writer.endMethod(); writer.unindent(); return writer; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/Action.java b/trunk/src/com/jpexs/decompiler/flash/action/Action.java index 6b58d527a..9f56c31c0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/Action.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/Action.java @@ -435,7 +435,7 @@ public class Action implements GraphSourceItem { boolean lastPush = false; for (GraphSourceItem s : list) { for (int i = 0; i < listeners.size(); i++) { - listeners.get(i).progress("toString", pos + 2, list.size()); + listeners.get(i).progress(AppStrings.translate("disassemblingProgress.toString"), pos + 2, list.size()); } Action a = null; if (s instanceof Action) { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java b/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java index a8942ff28..a479e421a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.flash.action; +import com.jpexs.decompiler.flash.AppStrings; import com.jpexs.decompiler.flash.DisassemblyListener; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.action.model.ConstantPool; @@ -637,7 +638,7 @@ public class ActionListReader { long pos = sis.getPos(); long length = pos + sis.available(); for (int i = 0; i < listeners.size(); i++) { - listeners.get(i).progress("Reading", pos, length); + listeners.get(i).progress(AppStrings.translate("disassemblingProgress.reading"), pos, length); } a.containerSWFOffset = containerSWFOffset; @@ -724,7 +725,7 @@ public class ActionListReader { curVisited++; visited.put(ip, curVisited); for (int i = 0; i < listeners.size(); i++) { - listeners.get(i).progress("Deobfuscating", ip, actions.size()); + listeners.get(i).progress(AppStrings.translate("disassemblingProgress.deobfuscating"), ip, actions.size()); } int info = a.actionLength + 1 + ((a.actionCode >= 0x80) ? 2 : 0); @@ -947,7 +948,7 @@ public class ActionListReader { } } for (DisassemblyListener listener : listeners) { - listener.progress("Deobfuscating", ip, actions.size()); + listener.progress(AppStrings.translate("disassemblingProgress.deobfuscating"), ip, actions.size()); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java index b458d01ac..d422e56c6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.flash.action.model; +import com.jpexs.decompiler.flash.AppStrings; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -31,7 +32,7 @@ public class UnsupportedActionItem extends ActionItem { @Override protected GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("//Unsupported by decompiler:" + value); + return writer.append("//" + AppStrings.translate("decompilation.unsupported") + ":" + value); } @Override diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java index a1b8731e1..3e7eedb9a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -2147,7 +2147,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec } catch (CancellationException ex) { abcPanel.decompiledTextArea.setText("//" + AppStrings.translate("work.canceled")); } catch (Exception ex) { - abcPanel.decompiledTextArea.setText("//Decompilation error: " + ex); + abcPanel.decompiledTextArea.setText("//" + AppStrings.translate("decompilationError") + ": " + ex); } } }); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java index 1c5187702..32f51f783 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java @@ -438,7 +438,7 @@ public class ActionPanel extends JPanel implements ActionListener { } catch (CancellationException ex) { setEditorText("; " + AppStrings.translate("work.canceled"), "text/flasm"); } catch (Exception ex) { - setDecompiledText("//Decompilation error: " + ex); + setDecompiledText("//" + AppStrings.translate("decompilationError") + ": " + ex); } } }); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties index 06807443c..17da85a1b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties @@ -414,3 +414,10 @@ timeFormat.minute = minute timeFormat.minutes = minutes timeFormat.second = second timeFormat.seconds = seconds + +disassemblingProgress.toString = toString +disassemblingProgress.reading = Reading +disassemblingProgress.deobfuscating = Deobfuscating +decompilation.skipped = Decompilation skipped +decompilation.unsupported = Unsupported by decompiler +decompilerMark = decompiler mark diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties index 6d1f086a1..b2beb2d0a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties @@ -415,3 +415,9 @@ timeFormat.minutes = perc timeFormat.second = m\u00e1sodperc timeFormat.seconds = m\u00e1sodperc +disassemblingProgress.toString = Karakterl\u00e1ncc\u00e1 alak\u00edt\u00e1s +disassemblingProgress.reading = Olvas\u00e1s +disassemblingProgress.deobfuscating = Deobfuszk\u00e1l\u00e1s +decompilation.skipped = Visszaford\u00edt\u00e1s mell\u0151zve +decompilation.unsupported = Visszaford\u00edt\u00e1s nem t\u00e1mogatott +decompilerMark = visszaford\u00edt\u00e1si jel diff --git a/trunk/src/com/jpexs/decompiler/graph/MarkItem.java b/trunk/src/com/jpexs/decompiler/graph/MarkItem.java index ff49b506f..374775bf1 100644 --- a/trunk/src/com/jpexs/decompiler/graph/MarkItem.java +++ b/trunk/src/com/jpexs/decompiler/graph/MarkItem.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.graph; +import com.jpexs.decompiler.flash.AppStrings; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.model.LocalData; @@ -34,7 +35,7 @@ public class MarkItem extends GraphTargetItem { @Override protected GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("//decompiler mark:" + mark); + return writer.append("//" + AppStrings.translate("decompilerMark") + ":" + mark); } public String getMark() {