JAL-1355
authordarolmar <darolmar@gmail.com>
Fri, 19 Sep 2014 15:12:06 +0000 (17:12 +0200)
committerdarolmar <darolmar@gmail.com>
Fri, 19 Sep 2014 15:12:06 +0000 (17:12 +0200)
12 files changed:
resources/lang/Messages.properties
src/jalview/gui/DasSourceBrowser.java
src/jalview/gui/Desktop.java
src/jalview/gui/PCAPanel.java
src/jalview/gui/Preferences.java
src/jalview/gui/WsJobParameters.java
src/jalview/ws/jws1/Discoverer.java
src/jalview/ws/jws1/JPredClient.java
src/jalview/ws/jws1/MsaWSClient.java
src/jalview/ws/jws1/SeqSearchWSClient.java
src/jalview/ws/jws2/MsaWSClient.java
src/jalview/ws/rest/RestClient.java

index 3827c7d..8727627 100644 (file)
@@ -531,6 +531,7 @@ label.collect_garbage = Collect Garbage
 label.show_memory_usage = Show Memory Usage\r
 label.show_java_console = Show Java Console\r
 label.show_jalview_news = Show Jalview News\r
+label.take_snapshot = Take snapshot\r
 label.monospaced_fonts_faster_to_render = Monospaced fonts are faster to render\r
 label.anti_alias_fonts = Anti-alias Fonts (Slower to render)\r
 label.monospaced_font= Monospaced\r
@@ -785,3 +786,27 @@ label.sheet = Sheet
 label.rna_helix = RNA Helix\r
 label.remove_annotation = Remove Annotation\r
 label.colour_by = Colour by...\r
+label.muscle_multiple_protein_sequence_alignment = Muscle Multiple Protein Sequence Alignment\r
+label.mafft_multiple_sequence_alignment = MAFFT Multiple Sequence Alignment\r
+label.clustalw_multiple_sequence_alignment = ClustalW Multiple Sequence Alignment\r
+label.jnet_secondary_structure_prediction = JNet Secondary Structure Prediction\r
+label.multiharmony = Multi-Harmony\r
+label.unable_start_web_service_analysis = Unable to start web service analysis\r
+label.job_couldnt_be_started_check_input = The Job couldn't be started. Please check your input, and the Jalview console for any warning messages.\r
+label.prompt_each_time = Prompt each time\r
+label.use_source = Use Source\r
+label.couldnt_save_project = Couldn't save project\r
+label.error_whilst_saving_current_state_to = Error whilst saving current state to {0}\r
+label.error_whilst_loading_project_from = Error whilst loading project from {0}\r
+label.couldnt_load_project = Couldn't load project\r
+label.pca_sequences_not_aligned = The sequences must be aligned before calculating PCA.\nTry using the Pad function in the edit menu,\nor one of the multiple sequence alignment web services.\r
+label.invalid_name_preset_exists = Invalid name - preset already exists.\r
+label.invalid_name = Invalid name\r
+label.set_proxy_settings = Please set up your proxy settings in the 'Connections' tab of the Preferences window\r
+label.proxy_authorization_failed = Proxy Authorization Failed\r
+label.internal_jalview_error = Internal Jalview Error\r
+label.secondary_structure_prediction_service_couldnt_be_located = The Secondary Structure Prediction Service named {0} at {1} couldn't be located.\r
+label.service_called_is_not_msa_service = The Service called \n{0}\nis not a \nMultiple Sequence Alignment Service!\r
+label.msa_service_is_unknown = The Multiple Sequence Alignment Service named {0} is unknown\r
+label.service_called_is_not_seq_search_service = The Service called \n{0}\nis not a \nSequence Search Service!\r
+label.seq_search_service_is_unknown = The Sequence Search Service named {0} is unknown\r
index b8dd645..779e82f 100644 (file)
@@ -741,7 +741,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements
     }
 
     private String[] columnNames = new String[]
-    { "Nickname", "Use Source" };
+    { MessageManager.getString("label.nickname"), MessageManager.getString("label.use_source") };
 
     private Object[][] data;
 
index b7057d1..772a5d7 100644 (file)
@@ -1419,8 +1419,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
                     ex);
             JOptionPane.showMessageDialog(
                     me,
-                    "Error whilst saving current state to "
-                            + choice.getName(), "Couldn't save project",
+                    MessageManager.formatMessage("label.error_whilst_saving_current_state_to", new String[]{ choice.getName()}),
+                    MessageManager.getString("label.couldnt_save_project"),
                     JOptionPane.WARNING_MESSAGE);
           }
           setProgressBar(null, choice.hashCode());
@@ -1469,8 +1469,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
             Cache.log.error("Problems whilst loading project from "
                     + choice, ex);
             JOptionPane.showMessageDialog(Desktop.desktop,
-                    "Error whilst loading project from " + choice,
-                    "Couldn't load project", JOptionPane.WARNING_MESSAGE);
+                       MessageManager.formatMessage("label.error_whilst_loading_project_from", new String[]{choice}),
+                    MessageManager.getString("label.couldnt_load_project"), JOptionPane.WARNING_MESSAGE);
           }
           setProgressBar(null, choice.hashCode());
         }
index f07993c..04e8556 100644 (file)
@@ -97,10 +97,8 @@ public class PCAPanel extends GPCAPanel implements Runnable,
       JOptionPane
               .showMessageDialog(
                       Desktop.desktop,
-                      "The sequences must be aligned before calculating PCA.\n"
-                              + "Try using the Pad function in the edit menu,\n"
-                              + "or one of the multiple sequence alignment web services.",
-                      "Sequences not aligned", JOptionPane.WARNING_MESSAGE);
+                      MessageManager.getString("label.pca_sequences_not_aligned"),
+                      MessageManager.getString("label.sequences_not_aligned"), JOptionPane.WARNING_MESSAGE);
 
       return;
     }
index 4f52f52..b5c27c6 100755 (executable)
@@ -213,11 +213,10 @@ public class Preferences extends GPreferences
     sortby.addItem("Pairwise Identity");
     sortby.setSelectedItem(Cache.getDefault("SORT_ALIGNMENT", "No sort"));
 
-    epsRendering.addItem("Prompt each time");
-    epsRendering.addItem("Lineart");
-    epsRendering.addItem("Text");
-    epsRendering.setSelectedItem(Cache.getDefault("EPS_RENDERING",
-            "Prompt each time"));
+    epsRendering.addItem(MessageManager.getString("label.prompt_each_time"));
+    epsRendering.addItem(MessageManager.getString("label.lineart"));
+    epsRendering.addItem(MessageManager.getString("action.text"));
+    epsRendering.setSelectedIndex(0);
     autoIdWidth.setSelected(Cache.getDefault("FIGURE_AUTOIDWIDTH", false));
     userIdWidth.setEnabled(autoIdWidth.isSelected());
     userIdWidthlabel.setEnabled(autoIdWidth.isSelected());
index b09d7a5..c81e8c8 100644 (file)
@@ -1416,8 +1416,8 @@ public class WsJobParameters extends JPanel implements ItemListener,
             public void run()
             {
               JOptionPane.showMessageDialog(ourframe,
-                      "Invalid name - preset already exists.",
-                      "Invalid name", JOptionPane.WARNING_MESSAGE);
+                      MessageManager.getString("label.invalid_name_preset_exists"),
+                      MessageManager.getString("label.invalid_name"), JOptionPane.WARNING_MESSAGE);
             }
           });
 
index 3229cdc..629b3d6 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.ws.jws1;
 
+import jalview.util.MessageManager;
+
 import java.util.*;
 
 import javax.swing.*;
@@ -192,21 +194,21 @@ public class Discoverer implements Runnable
                     "Edgar, Robert C. (2004), MUSCLE: multiple sequence alignment "
                             + "with high accuracy and high throughput, Nucleic Acids Research 32(5), 1792-97.",
                     "http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS",
-                    "Muscle Multiple Protein Sequence Alignment"),
+                    MessageManager.getString("label.muscle_multiple_protein_sequence_alignment")),
             new ServiceHandle(
                     "MsaWS",
                     "Katoh, K., K. Kuma, K., Toh, H.,  and Miyata, T. (2005) "
                             + "\"MAFFT version 5: improvement in accuracy of multiple sequence alignment.\""
                             + " Nucleic Acids Research, 33 511-518",
                     "http://www.compbio.dundee.ac.uk/JalviewWS/services/MafftWS",
-                    "MAFFT Multiple Sequence Alignment"),
+                    MessageManager.getString("label.mafft_multiple_sequence_alignment")),
             new ServiceHandle(
                     "MsaWS",
                     "Thompson, J.D., Higgins, D.G. and Gibson, T.J. (1994) CLUSTAL W: improving the sensitivity of progressive multiple"
                             + " sequence alignment through sequence weighting, position specific gap penalties and weight matrix choice."
                             + " Nucleic Acids Research, 22 4673-4680",
                     "http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS",
-                    "ClustalW Multiple Sequence Alignment"),
+                    MessageManager.getString("label.clustalw_multiple_sequence_alignment")),
             new ServiceHandle(
                     "SecStrPred",
                     "Cole C., Barber J. D., Barton G.J (2008) "
@@ -248,8 +250,8 @@ public class Discoverer implements Runnable
           JOptionPane
                   .showMessageDialog(
                           jalview.gui.Desktop.desktop,
-                          "Please set up your proxy settings in the 'Connections' tab of the Preferences window",
-                          "Proxy Authorization Failed",
+                          MessageManager.getString("label.set_proxy_settings"),
+                          MessageManager.getString("label.proxy_authorization_failed"),
                           JOptionPane.WARNING_MESSAGE);
         }
       }
index e96ae34..f1d3e43 100644 (file)
@@ -31,6 +31,7 @@ import jalview.analysis.*;
 import jalview.bin.*;
 import jalview.datamodel.*;
 import jalview.gui.*;
+import jalview.util.MessageManager;
 
 public class JPredClient extends WS1Client
 {
@@ -311,12 +312,11 @@ public class JPredClient extends WS1Client
     } catch (Exception ex)
     {
       JOptionPane.showMessageDialog(Desktop.desktop,
-              "The Secondary Structure Prediction Service named "
-                      + WebServiceName + " at " + WsURL
-                      + " couldn't be located.", "Internal Jalview Error",
+                 MessageManager.formatMessage("label.secondary_structure_prediction_service_couldnt_be_located", new String[]{WebServiceName,WsURL}),
+                 MessageManager.getString("label.internal_jalview_error"),
               JOptionPane.WARNING_MESSAGE);
-      wsInfo.setProgressText("Serious! " + WebServiceName
-              + " Service location failed\nfor URL :" + WsURL + "\n"
+      wsInfo.setProgressText(MessageManager.formatMessage("label.secondary_structure_prediction_service_couldnt_be_located", new String[]{WebServiceName,WsURL})
+                 + "\n"
               + ex.getMessage());
       wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR);
 
index 7285639..5d84286 100644 (file)
@@ -28,6 +28,7 @@ import javax.swing.*;
 import ext.vamsas.*;
 import jalview.datamodel.*;
 import jalview.gui.*;
+import jalview.util.MessageManager;
 
 /**
  * DOCUMENT ME!
@@ -72,10 +73,8 @@ public class MsaWSClient extends WS1Client
       JOptionPane
               .showMessageDialog(
                       Desktop.desktop,
-                      "The Service called \n"
-                              + sh.getName()
-                              + "\nis not a \nMultiple Sequence Alignment Service !",
-                      "Internal Jalview Error", JOptionPane.WARNING_MESSAGE);
+                      MessageManager.formatMessage("label.service_called_is_not_msa_service", new String[]{sh.getName()}),
+                      MessageManager.getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE);
 
       return;
     }
@@ -84,9 +83,8 @@ public class MsaWSClient extends WS1Client
     {
       JOptionPane.showMessageDialog(
               Desktop.desktop,
-              "The Multiple Sequence Alignment Service named "
-                      + sh.getName() + " is unknown",
-              "Internal Jalview Error", JOptionPane.WARNING_MESSAGE);
+              MessageManager.formatMessage("label.msa_service_is_unknown", new String[]{sh.getName()}),
+              MessageManager.getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE);
 
       return;
     }
index c2e23db..3a4bbd4 100644 (file)
@@ -33,6 +33,7 @@ import javax.swing.*;
 import ext.vamsas.*;
 import jalview.datamodel.*;
 import jalview.gui.*;
+import jalview.util.MessageManager;
 
 /**
  * DOCUMENT ME!
@@ -76,9 +77,8 @@ public class SeqSearchWSClient extends WS1Client
     if (!sh.getAbstractName().equals(this.getServiceActionKey()))
     {
       JOptionPane.showMessageDialog(Desktop.desktop,
-              "The Service called \n" + sh.getName()
-                      + "\nis not a \nSequence Search Service !",
-              "Internal Jalview Error", JOptionPane.WARNING_MESSAGE);
+                 MessageManager.formatMessage("label.service_called_is_not_seq_search_service", new String[]{sh.getName()}),
+              MessageManager.getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE);
 
       return;
     }
@@ -86,8 +86,8 @@ public class SeqSearchWSClient extends WS1Client
     if ((wsInfo = setWebService(sh)) == null)
     {
       JOptionPane.showMessageDialog(Desktop.desktop,
-              "The Sequence Search Service named " + sh.getName()
-                      + " is unknown", "Internal Jalview Error",
+                 MessageManager.formatMessage("label.seq_search_service_is_unknown", new String[]{sh.getName()}),
+              MessageManager.getString("label.internal_jalview_error"),
               JOptionPane.WARNING_MESSAGE);
 
       return;
index d1c0a32..59915bc 100644 (file)
@@ -101,10 +101,8 @@ public class MsaWSClient extends Jws2Client
       JOptionPane
               .showMessageDialog(
                       Desktop.desktop,
-                      "The Service called \n"
-                              + sh.serviceType
-                              + "\nis not a \nMultiple Sequence Alignment Service !",
-                      "Internal Jalview Error", JOptionPane.WARNING_MESSAGE);
+                      MessageManager.formatMessage("label.service_called_is_not_msa_service", new String[]{sh.serviceType}),
+                      MessageManager.getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE);
 
       return;
     }
@@ -112,9 +110,8 @@ public class MsaWSClient extends Jws2Client
     if ((wsInfo = setWebService(sh, false)) == null)
     {
       JOptionPane.showMessageDialog(Desktop.desktop,
-              "The Multiple Sequence Alignment Service named "
-                      + sh.serviceType + " is unknown",
-              "Internal Jalview Error", JOptionPane.WARNING_MESSAGE);
+                 MessageManager.formatMessage("label.msa_service_is_unknown", new String[]{sh.serviceType}),
+                 MessageManager.getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE);
 
       return;
     }
index 470c96f..46b8a64 100644 (file)
@@ -312,15 +312,15 @@ public class RestClient extends WSClient implements WSClientI,
               .showMessageDialog(
                       Desktop.desktop,
                       (jobsthread.hasWarnings() ? jobsthread.getWarnings()
-                              : "The Job couldn't be started. Please check your input, and the Jalview console for any warning messages."),
-                      "Unable to start web service analysis",
+                              : MessageManager.getString("label.job_couldnt_be_started_check_input")),
+                      MessageManager.getString("label.unable_start_web_service_analysis"),
                       JOptionPane.WARNING_MESSAGE);
     }
   }
 
   public static RestClient makeShmmrRestClient()
   {
-    String action = "Analysis", description = "Sequence Harmony and Multi-Relief (Brandt et al. 2010)", name = "Multi-Harmony";
+    String action = "Analysis", description = "Sequence Harmony and Multi-Relief (Brandt et al. 2010)", name = MessageManager.getString("label.multiharmony");
     Hashtable<String, InputType> iparams = new Hashtable<String, InputType>();
     jalview.ws.rest.params.JobConstant toolp;
     // toolp = new jalview.ws.rest.JobConstant("tool","jalview");