From 3a6e379d3c4a4cace7ac4204743b0c63fe257098 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sun, 27 May 2018 18:53:02 -0400 Subject: [PATCH] Minor refactoring --- src/main/java/com/rarchives/ripme/ui/MainWindow.java | 2 +- src/main/java/com/rarchives/ripme/utils/Utils.java | 8 ++++---- ...dle_id_ID.properties => LabelsBundle_in_ID.properties} | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename src/main/resources/{LabelsBundle_id_ID.properties => LabelsBundle_in_ID.properties} (100%) diff --git a/src/main/java/com/rarchives/ripme/ui/MainWindow.java b/src/main/java/com/rarchives/ripme/ui/MainWindow.java index d1f43f00..fddaba8a 100644 --- a/src/main/java/com/rarchives/ripme/ui/MainWindow.java +++ b/src/main/java/com/rarchives/ripme/ui/MainWindow.java @@ -496,7 +496,7 @@ public final class MainWindow implements Runnable, RipStatusHandler { configURLHistoryCheckbox = addNewCheckbox(rb.getString("remember.url.history"), "remember.url_history", true); configLogLevelCombobox = new JComboBox<>(new String[] {"Log level: Error", "Log level: Warn", "Log level: Info", "Log level: Debug"}); - configSelectLangComboBox = new JComboBox<>(new String[] {"en_US", "de_DE", "es_ES", "fr_CH", "kr_KR", "pt_PT"}); + configSelectLangComboBox = new JComboBox<>(new String[] {"en_US", "de_DE", "es_ES", "fr_CH", "kr_KR", "pt_PT", "fi_FI", "in_ID", "porrisavvo_FI"}); configLogLevelCombobox.setSelectedItem(Utils.getConfigString("log.level", "Log level: Debug")); setLogLevel(configLogLevelCombobox.getSelectedItem().toString()); configSaveDirLabel = new JLabel(); diff --git a/src/main/java/com/rarchives/ripme/utils/Utils.java b/src/main/java/com/rarchives/ripme/utils/Utils.java index 8b91e5cd..e773a305 100644 --- a/src/main/java/com/rarchives/ripme/utils/Utils.java +++ b/src/main/java/com/rarchives/ripme/utils/Utils.java @@ -699,11 +699,11 @@ public class Utils { return ResourceBundle.getBundle("LabelsBundle", new Locale(langCode[0], langCode[1]), new UTF8Control()); } try { - ResourceBundle rb = ResourceBundle.getBundle("LabelsBundle", Locale.getDefault(), new UTF8Control()); - return rb; + logger.info("Setting locale to default"); + return ResourceBundle.getBundle("LabelsBundle", Locale.getDefault(), new UTF8Control()); } catch (MissingResourceException e) { - ResourceBundle rb = ResourceBundle.getBundle("LabelsBundle", Locale.ROOT); - return rb; + logger.info("Setting locale to root"); + return ResourceBundle.getBundle("LabelsBundle", Locale.ROOT); } } } diff --git a/src/main/resources/LabelsBundle_id_ID.properties b/src/main/resources/LabelsBundle_in_ID.properties similarity index 100% rename from src/main/resources/LabelsBundle_id_ID.properties rename to src/main/resources/LabelsBundle_in_ID.properties