From: darolmar Date: Fri, 19 Sep 2014 15:12:06 +0000 (+0200) Subject: JAL-1355 X-Git-Tag: Release_2_8_2b1^2~50^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2b34ad8d6c224117ca2a3199c237fd74d8137da6;p=jalview.git JAL-1355 --- diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 3827c7d..8727627 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -531,6 +531,7 @@ label.collect_garbage = Collect Garbage label.show_memory_usage = Show Memory Usage label.show_java_console = Show Java Console label.show_jalview_news = Show Jalview News +label.take_snapshot = Take snapshot label.monospaced_fonts_faster_to_render = Monospaced fonts are faster to render label.anti_alias_fonts = Anti-alias Fonts (Slower to render) label.monospaced_font= Monospaced @@ -785,3 +786,27 @@ label.sheet = Sheet label.rna_helix = RNA Helix label.remove_annotation = Remove Annotation label.colour_by = Colour by... +label.muscle_multiple_protein_sequence_alignment = Muscle Multiple Protein Sequence Alignment +label.mafft_multiple_sequence_alignment = MAFFT Multiple Sequence Alignment +label.clustalw_multiple_sequence_alignment = ClustalW Multiple Sequence Alignment +label.jnet_secondary_structure_prediction = JNet Secondary Structure Prediction +label.multiharmony = Multi-Harmony +label.unable_start_web_service_analysis = Unable to start web service analysis +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. +label.prompt_each_time = Prompt each time +label.use_source = Use Source +label.couldnt_save_project = Couldn't save project +label.error_whilst_saving_current_state_to = Error whilst saving current state to {0} +label.error_whilst_loading_project_from = Error whilst loading project from {0} +label.couldnt_load_project = Couldn't load project +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. +label.invalid_name_preset_exists = Invalid name - preset already exists. +label.invalid_name = Invalid name +label.set_proxy_settings = Please set up your proxy settings in the 'Connections' tab of the Preferences window +label.proxy_authorization_failed = Proxy Authorization Failed +label.internal_jalview_error = Internal Jalview Error +label.secondary_structure_prediction_service_couldnt_be_located = The Secondary Structure Prediction Service named {0} at {1} couldn't be located. +label.service_called_is_not_msa_service = The Service called \n{0}\nis not a \nMultiple Sequence Alignment Service! +label.msa_service_is_unknown = The Multiple Sequence Alignment Service named {0} is unknown +label.service_called_is_not_seq_search_service = The Service called \n{0}\nis not a \nSequence Search Service! +label.seq_search_service_is_unknown = The Sequence Search Service named {0} is unknown diff --git a/src/jalview/gui/DasSourceBrowser.java b/src/jalview/gui/DasSourceBrowser.java index b8dd645..779e82f 100644 --- a/src/jalview/gui/DasSourceBrowser.java +++ b/src/jalview/gui/DasSourceBrowser.java @@ -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; diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index b7057d1..772a5d7 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -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()); } diff --git a/src/jalview/gui/PCAPanel.java b/src/jalview/gui/PCAPanel.java index f07993c..04e8556 100644 --- a/src/jalview/gui/PCAPanel.java +++ b/src/jalview/gui/PCAPanel.java @@ -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; } diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 4f52f52..b5c27c6 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -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()); diff --git a/src/jalview/gui/WsJobParameters.java b/src/jalview/gui/WsJobParameters.java index b09d7a5..c81e8c8 100644 --- a/src/jalview/gui/WsJobParameters.java +++ b/src/jalview/gui/WsJobParameters.java @@ -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); } }); diff --git a/src/jalview/ws/jws1/Discoverer.java b/src/jalview/ws/jws1/Discoverer.java index 3229cdc..629b3d6 100644 --- a/src/jalview/ws/jws1/Discoverer.java +++ b/src/jalview/ws/jws1/Discoverer.java @@ -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); } } diff --git a/src/jalview/ws/jws1/JPredClient.java b/src/jalview/ws/jws1/JPredClient.java index e96ae34..f1d3e43 100644 --- a/src/jalview/ws/jws1/JPredClient.java +++ b/src/jalview/ws/jws1/JPredClient.java @@ -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); diff --git a/src/jalview/ws/jws1/MsaWSClient.java b/src/jalview/ws/jws1/MsaWSClient.java index 7285639..5d84286 100644 --- a/src/jalview/ws/jws1/MsaWSClient.java +++ b/src/jalview/ws/jws1/MsaWSClient.java @@ -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; } diff --git a/src/jalview/ws/jws1/SeqSearchWSClient.java b/src/jalview/ws/jws1/SeqSearchWSClient.java index c2e23db..3a4bbd4 100644 --- a/src/jalview/ws/jws1/SeqSearchWSClient.java +++ b/src/jalview/ws/jws1/SeqSearchWSClient.java @@ -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; diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index d1c0a32..59915bc 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -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; } diff --git a/src/jalview/ws/rest/RestClient.java b/src/jalview/ws/rest/RestClient.java index 470c96f..46b8a64 100644 --- a/src/jalview/ws/rest/RestClient.java +++ b/src/jalview/ws/rest/RestClient.java @@ -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 iparams = new Hashtable(); jalview.ws.rest.params.JobConstant toolp; // toolp = new jalview.ws.rest.JobConstant("tool","jalview");