-public class MessageManager {
-
- private static ResourceBundle rb;
-
- private static Logger log=Logger.getLogger(MessageManager.class.getCanonicalName());
-
- private static Locale loc;
-
-
-
- static{
- try {
- /* Localize Java dialogs */
- loc = Locale.getDefault();
- // Locale.setDefault(loc);
- /* Getting messages for GV */
- log.info("Getting messages for lang: "+loc);
- rb = ResourceBundle.getBundle("lang.Messages", loc);
- if (log.isLoggable(Level.FINEST)) {
- // this might take a while, so we only do it if it will be shown
- log.finest("Language keys: "+rb.keySet());
- }
- } catch (Exception q) {
- log.warning("Exception when initting Locale for i18n messages\n"+q.getMessage());
- q.printStackTrace();
- }
- catch (Error v)
- {
- log.warning("Error when initting Locale for i18n messages\n"+v.getMessage());
- v.printStackTrace();
- }
-
-
+public class MessageManager
+{
+
+ // BH 2018 switched to org.apache.llog4j.Logger
+
+ private static ResourceBundle rb;
+
+ private static Logger log = Logger
+ .getLogger(MessageManager.class.getCanonicalName());
+
+ private static Locale loc;
+
+ private static Set<String> reportedMissing = new HashSet<>();
+
+ static
+ {
+ try
+ {
+ /* Localize Java dialogs */
+ loc = Locale.getDefault();
+ // 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 (log.isLoggable(Level.FINEST))
+ // {
+ // // this might take a while, so we only do it if it will be shown
+ // log.info("Language keys: " + rb.keySet()); // was FINEST
+ // }
+ } catch (Exception q)
+ {
+ log.warn("Exception when initting Locale for i18n messages\n"
+ + q.getMessage());
+ q.printStackTrace();
+ } catch (Error v)
+ {
+ log.warn("Error when initting Locale for i18n messages\n"
+ + v.getMessage());
+ v.printStackTrace();