summaryrefslogtreecommitdiff
path: root/src/main/java/cuchaz/enigma/config/Config.java
diff options
context:
space:
mode:
authorGravatar modmuss502020-03-05 22:17:08 +0000
committerGravatar GitHub2020-03-05 22:17:08 +0000
commit863d40a1c1f6591ef1ee8594b12ae4b0942fe810 (patch)
tree614c0e3bc842e1ab50413dcc18b450c96224db10 /src/main/java/cuchaz/enigma/config/Config.java
parentFix drop mappings not checking localVars (diff)
downloadenigma-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/config/Config.java')
-rw-r--r--src/main/java/cuchaz/enigma/config/Config.java5
1 files changed, 5 insertions, 0 deletions
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;
4import com.google.common.io.Files; 4import com.google.common.io.Files;
5import com.google.gson.*; 5import com.google.gson.*;
6 6
7import cuchaz.enigma.utils.I18n;
8
7import javax.swing.*; 9import javax.swing.*;
8import javax.swing.plaf.metal.MetalLookAndFeel; 10import javax.swing.plaf.metal.MetalLookAndFeel;
9import java.awt.*; 11import java.awt.*;
@@ -165,6 +167,8 @@ public class Config {
165 public Integer lineNumbersBackground; 167 public Integer lineNumbersBackground;
166 public Integer lineNumbersSelected; 168 public Integer lineNumbersSelected;
167 public Integer lineNumbersForeground; 169 public Integer lineNumbersForeground;
170
171 public String language = I18n.DEFAULT_LANGUAGE;
168 172
169 public LookAndFeel lookAndFeel = LookAndFeel.DEFAULT; 173 public LookAndFeel lookAndFeel = LookAndFeel.DEFAULT;
170 174
@@ -213,6 +217,7 @@ public class Config {
213 public void reset() throws IOException { 217 public void reset() throws IOException {
214 this.lookAndFeel = LookAndFeel.DEFAULT; 218 this.lookAndFeel = LookAndFeel.DEFAULT;
215 this.lookAndFeel.apply(this); 219 this.lookAndFeel.apply(this);
220 this.language = I18n.DEFAULT_LANGUAGE;
216 this.saveConfig(); 221 this.saveConfig();
217 } 222 }
218 223