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/config/Config.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/cuchaz/enigma/config') diff --git a/src/main/java/cuchaz/enigma/config/Config.java b/src/main/java/cuchaz/enigma/config/Config.java index e2afb01..a00fe2d 100644 --- a/src/main/java/cuchaz/enigma/config/Config.java +++ b/src/main/java/cuchaz/enigma/config/Config.java @@ -4,6 +4,8 @@ import com.bulenkov.darcula.DarculaLaf; import com.google.common.io.Files; import com.google.gson.*; +import cuchaz.enigma.utils.I18n; + import javax.swing.*; import javax.swing.plaf.metal.MetalLookAndFeel; import java.awt.*; @@ -165,6 +167,8 @@ public class Config { public Integer lineNumbersBackground; public Integer lineNumbersSelected; public Integer lineNumbersForeground; + + public String language = I18n.DEFAULT_LANGUAGE; public LookAndFeel lookAndFeel = LookAndFeel.DEFAULT; @@ -213,6 +217,7 @@ public class Config { public void reset() throws IOException { this.lookAndFeel = LookAndFeel.DEFAULT; this.lookAndFeel.apply(this); + this.language = I18n.DEFAULT_LANGUAGE; this.saveConfig(); } -- cgit v1.2.3