From 863d40a1c1f6591ef1ee8594b12ae4b0942fe810 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Thu, 5 Mar 2020 22:17:08 +0000 Subject: 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 --- src/main/java/cuchaz/enigma/gui/GuiController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/cuchaz/enigma/gui/GuiController.java') 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; import cuchaz.enigma.translation.representation.entry.Entry; import cuchaz.enigma.translation.representation.entry.FieldEntry; import cuchaz.enigma.translation.representation.entry.MethodEntry; +import cuchaz.enigma.utils.I18n; import cuchaz.enigma.utils.ReadableToken; import cuchaz.enigma.utils.Utils; import org.objectweb.asm.Opcodes; @@ -391,7 +392,7 @@ public class GuiController { boolean requiresDecompile = forceDecomp || currentSource == null || !currentSource.getEntry().equals(targetClass); if (requiresDecompile) { currentSource = null; // Or the GUI may try to find a nonexistent token - gui.setEditorText("(decompiling...)"); + gui.setEditorText(I18n.translate("info_panel.editor.class.decompiling")); } DECOMPILER_SERVICE.submit(() -> { @@ -413,7 +414,7 @@ public class GuiController { try { CompilationUnit sourceTree = (CompilationUnit) sourceProvider.getSources(targetClass.getFullName()).clone(); if (sourceTree == null) { - gui.setEditorText("Unable to find class: " + targetClass); + gui.setEditorText(I18n.translate("info_panel.editor.class.not_found") + " " + targetClass); return DecompiledClassSource.text(targetClass, "Unable to find class"); } -- cgit v1.2.3