From: BobHanson Date: Wed, 3 Jun 2020 20:54:57 +0000 (-0500) Subject: JAL-3664 support for new Locale(""), meaning "not actually a X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0997e594eb5903cc0235191b2d1cbf05fc4bd5ab;p=jalview.git JAL-3664 support for new Locale(""), meaning "not actually a ResourceBundle, just one file (MessageManager) --- diff --git a/src/jalview/util/MessageManager.java b/src/jalview/util/MessageManager.java index bb94566..43b6c9e 100644 --- a/src/jalview/util/MessageManager.java +++ b/src/jalview/util/MessageManager.java @@ -57,8 +57,9 @@ 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); + if (Platform.isJS() && loc.getLanguage().equals("en")) + loc = new Locale(""); // meaning no language properties are available + rb = ResourceBundle.getBundle("lang.Messages", 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