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/config/Config.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/config/Config.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/config/Config.java | 5 |
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; | |||
| 4 | import com.google.common.io.Files; | 4 | import com.google.common.io.Files; |
| 5 | import com.google.gson.*; | 5 | import com.google.gson.*; |
| 6 | 6 | ||
| 7 | import cuchaz.enigma.utils.I18n; | ||
| 8 | |||
| 7 | import javax.swing.*; | 9 | import javax.swing.*; |
| 8 | import javax.swing.plaf.metal.MetalLookAndFeel; | 10 | import javax.swing.plaf.metal.MetalLookAndFeel; |
| 9 | import java.awt.*; | 11 | import 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 | ||