diff options
| author | 2020-03-05 22:17:08 +0000 | |
|---|---|---|
| committer | 2020-03-05 22:17:08 +0000 | |
| commit | 863d40a1c1f6591ef1ee8594b12ae4b0942fe810 (patch) | |
| tree | 614c0e3bc842e1ab50413dcc18b450c96224db10 /src/main/java/cuchaz/enigma/gui/GuiController.java | |
| parent | Fix drop mappings not checking localVars (diff) | |
| download | enigma-fork-863d40a1c1f6591ef1ee8594b12ae4b0942fe810.tar.gz enigma-fork-863d40a1c1f6591ef1ee8594b12ae4b0942fe810.tar.xz enigma-fork-863d40a1c1f6591ef1ee8594b12ae4b0942fe810.zip | |
Made Enigma gui translatable (#193)
* made enigma gui translatable
* key renamings
* missed strings
* string.format() & another missed string
* cached content (thanks @liach)
* added a dialog when changing language
* better sentence
* more %s
* liach's requests
* empty map
* the last (?) missed strings
* IT WORKS
* French translation
* Update fr_fr.json
Diffstat (limited to 'src/main/java/cuchaz/enigma/gui/GuiController.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/gui/GuiController.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/GuiController.java b/src/main/java/cuchaz/enigma/gui/GuiController.java index 0b2fe27..dc5010c 100644 --- a/src/main/java/cuchaz/enigma/gui/GuiController.java +++ b/src/main/java/cuchaz/enigma/gui/GuiController.java | |||
| @@ -32,6 +32,7 @@ import cuchaz.enigma.translation.representation.entry.ClassEntry; | |||
| 32 | import cuchaz.enigma.translation.representation.entry.Entry; | 32 | import cuchaz.enigma.translation.representation.entry.Entry; |
| 33 | import cuchaz.enigma.translation.representation.entry.FieldEntry; | 33 | import cuchaz.enigma.translation.representation.entry.FieldEntry; |
| 34 | import cuchaz.enigma.translation.representation.entry.MethodEntry; | 34 | import cuchaz.enigma.translation.representation.entry.MethodEntry; |
| 35 | import cuchaz.enigma.utils.I18n; | ||
| 35 | import cuchaz.enigma.utils.ReadableToken; | 36 | import cuchaz.enigma.utils.ReadableToken; |
| 36 | import cuchaz.enigma.utils.Utils; | 37 | import cuchaz.enigma.utils.Utils; |
| 37 | import org.objectweb.asm.Opcodes; | 38 | import org.objectweb.asm.Opcodes; |
| @@ -391,7 +392,7 @@ public class GuiController { | |||
| 391 | boolean requiresDecompile = forceDecomp || currentSource == null || !currentSource.getEntry().equals(targetClass); | 392 | boolean requiresDecompile = forceDecomp || currentSource == null || !currentSource.getEntry().equals(targetClass); |
| 392 | if (requiresDecompile) { | 393 | if (requiresDecompile) { |
| 393 | currentSource = null; // Or the GUI may try to find a nonexistent token | 394 | currentSource = null; // Or the GUI may try to find a nonexistent token |
| 394 | gui.setEditorText("(decompiling...)"); | 395 | gui.setEditorText(I18n.translate("info_panel.editor.class.decompiling")); |
| 395 | } | 396 | } |
| 396 | 397 | ||
| 397 | DECOMPILER_SERVICE.submit(() -> { | 398 | DECOMPILER_SERVICE.submit(() -> { |
| @@ -413,7 +414,7 @@ public class GuiController { | |||
| 413 | try { | 414 | try { |
| 414 | CompilationUnit sourceTree = (CompilationUnit) sourceProvider.getSources(targetClass.getFullName()).clone(); | 415 | CompilationUnit sourceTree = (CompilationUnit) sourceProvider.getSources(targetClass.getFullName()).clone(); |
| 415 | if (sourceTree == null) { | 416 | if (sourceTree == null) { |
| 416 | gui.setEditorText("Unable to find class: " + targetClass); | 417 | gui.setEditorText(I18n.translate("info_panel.editor.class.not_found") + " " + targetClass); |
| 417 | return DecompiledClassSource.text(targetClass, "Unable to find class"); | 418 | return DecompiledClassSource.text(targetClass, "Unable to find class"); |
| 418 | } | 419 | } |
| 419 | 420 | ||