Revision: 20435
          http://sourceforge.net/p/jmol/code/20435
Author:   hansonr
Date:     2015-04-06 01:13:49 +0000 (Mon, 06 Apr 2015)
Log Message:
-----------
Jmol.___JmolVersion="14.3.13_2015.04.05b" 

bug fix: language switching not working from popup menu;
bug fix: language bundles not processed in the correct order for variants 

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/console/JmolConsole.java
    trunk/Jmol/src/org/jmol/i18n/GT.java
    trunk/Jmol/src/org/jmol/i18n/Language.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/jmol/console/JmolConsole.java
===================================================================
--- trunk/Jmol/src/org/jmol/console/JmolConsole.java    2015-04-05 03:38:11 UTC 
(rev 20434)
+++ trunk/Jmol/src/org/jmol/console/JmolConsole.java    2015-04-06 01:13:49 UTC 
(rev 20435)
@@ -87,6 +87,7 @@
   protected void updateLabels() {
     labels = null;
     boolean doTranslate = GT.setDoTranslate(true);
+    setViewer(vwr);
     defaultMessage = getLabel("default");
     setAbstractButtonLabels(menuMap, labels);
     setTitle();

Modified: trunk/Jmol/src/org/jmol/i18n/GT.java
===================================================================
--- trunk/Jmol/src/org/jmol/i18n/GT.java        2015-04-05 03:38:11 UTC (rev 
20434)
+++ trunk/Jmol/src/org/jmol/i18n/GT.java        2015-04-06 01:13:49 UTC (rev 
20435)
@@ -161,8 +161,14 @@
           + " using files for language:" + la + " country:" + la_co
           + " variant:" + la_co_va);
     if (!ignoreApplicationBundle)
-      addBundles(vwr, "Jmol", la_co_va, la_co, la);
-    addBundles(vwr, "JmolApplet", la_co_va, la_co, la);
+      addBundles(vwr, "Jmol", la_co_va, null, null);
+    addBundles(vwr, "JmolApplet", la_co_va, null, null);
+    if (!ignoreApplicationBundle)
+      addBundles(vwr, "Jmol", null, la_co, null);
+    addBundles(vwr, "JmolApplet", null, la_co, null);
+    if (!ignoreApplicationBundle)
+      addBundles(vwr, "Jmol", null, null, la);
+    addBundles(vwr, "JmolApplet", null, null, la);
   }
 
   public static Language[] getLanguageList(GT gt) {
@@ -283,7 +289,9 @@
   private String getString(String s) {
     String trans = null;
     if (doTranslate) {
-      for (int bundle = resourceCount; --bundle >= 0;) {
+      // order was incorrect -- should be:
+      // la_co_va(app)  la_co_va(applet)  la_co(app)  la_co(applet) la(app)  
la(applet)
+      for (int bundle = 0; bundle < resourceCount; bundle++) {
         trans = resources[bundle].getString(s);
         if (trans != null) {
           s = trans;

Modified: trunk/Jmol/src/org/jmol/i18n/Language.java
===================================================================
--- trunk/Jmol/src/org/jmol/i18n/Language.java  2015-04-05 03:38:11 UTC (rev 
20434)
+++ trunk/Jmol/src/org/jmol/i18n/Language.java  2015-04-06 01:13:49 UTC (rev 
20435)
@@ -25,6 +25,8 @@
 
 package org.jmol.i18n;
 
+import javajs.util.PT;
+
 public class Language {
 
   /**
@@ -148,10 +150,10 @@
     for (int i = list.length; --i >= 0;)
       if (list[i].code.equalsIgnoreCase(code))
         return list[i].code;
-    for (int i = list.length; --i >= 0;)
-      if (list[i].code.startsWith(code))
-        return list[i].code;
+      for (int i = list.length; --i >= 0;)
+        if (list[i].code.startsWith(code))
+          return list[i].code;
     return null;
   }
-  
+
 }
\ No newline at end of file

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-04-05 03:38:11 UTC 
(rev 20434)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-04-06 01:13:49 UTC 
(rev 20435)
@@ -14,8 +14,14 @@
 
 TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT 
command for problems)
 
-Jmol.___JmolVersion="14.3.13_2015.04.05" 
 
+Jmol.___JmolVersion="14.3.13_2015.04.05b" 
+
+bug fix: language switching not working from popup menu;
+bug fix: language bundles not processed in the correct order for variants 
+
+JmolVersion="14.3.13_2015.04.05" 
+
 code: rewriting FOR loop code to enhance performance
 
 new feature: set showScript -1 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to