Merge remote-tracking branch 'origin/merge/Jalview-JS/develop_feature/JAL-3690_callba...
[jalview.git] / src / jalview / util / MessageManager.java
index bb94566..2a07616 100644 (file)
@@ -57,8 +57,7 @@ public class MessageManager
       // Locale.setDefault(loc);
       /* Getting messages for GV */
       log.info("Getting messages for lang: " + loc);
-      Control control = Control.getControl(Control.FORMAT_PROPERTIES);
-      rb = ResourceBundle.getBundle("lang.Messages", loc, control);
+      rb = ResourceBundle.getBundle("lang.Messages", Platform.getLocaleOrNone(loc), Control.getControl(Control.FORMAT_PROPERTIES));
       // if (log.isLoggable(Level.FINEST))
       // {
       // // this might take a while, so we only do it if it will be shown
@@ -94,7 +93,7 @@ public class MessageManager
     } catch (Exception e)
     {
       String msg = "I18N missing: " + loc + "\t" + key;
-         logWarning(key, msg);
+    logWarning(key, msg);
     }
     return value;
   }
@@ -169,8 +168,8 @@ public class MessageManager
     } catch (Exception x)
     {
       String msg = "I18N missing key with root " + keyroot + ": " + loc + "\t"
-                         + smkey;
-         logWarning(smkey, msg);
+              + smkey;
+    logWarning(smkey, msg);
     }
     return name;
   }
@@ -183,10 +182,10 @@ public class MessageManager
    */
   private static void logWarning(String key, String msg) 
   {
-       if (!reportedMissing.contains(key))
-       {
+  if (!reportedMissing.contains(key))
+  {
       reportedMissing.add(key);
-         log.info(msg);
-       }
+    log.info(msg);
+  }
   }
 }