JAL-1424 tidy / recode MessageManager calls to support code analysis
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 24 Aug 2016 13:27:22 +0000 (14:27 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 24 Aug 2016 13:27:22 +0000 (14:27 +0100)
src/jalview/gui/AlignFrame.java

index bfaedd0..f6268c0 100644 (file)
@@ -849,8 +849,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     showGroupConservation.setEnabled(!nucleotide);
     rnahelicesColour.setEnabled(nucleotide);
     purinePyrimidineColour.setEnabled(nucleotide);
-    showComplementMenuItem.setText(MessageManager
-            .getString(nucleotide ? "label.protein" : "label.nucleotide"));
+    showComplementMenuItem.setText(nucleotide ? MessageManager
+            .getString("label.protein") : MessageManager
+            .getString("label.nucleotide"));
     setColourSelected(jalview.bin.Cache.getDefault(
             nucleotide ? Preferences.DEFAULT_COLOUR_NUC
                     : Preferences.DEFAULT_COLOUR_PROT, "None"));
@@ -4443,22 +4444,18 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
           // object broker mechanism.
           final Vector<JMenu> wsmenu = new Vector<JMenu>();
           final IProgressIndicator af = me;
+
+          /*
+           * do not i18n these strings - they are hard-coded in class
+           * compbio.data.msa.Category, Jws2Discoverer.isRecalculable() and
+           * SequenceAnnotationWSClient.initSequenceAnnotationWSClient()
+           */
           final JMenu msawsmenu = new JMenu("Alignment");
           final JMenu secstrmenu = new JMenu(
                   "Secondary Structure Prediction");
           final JMenu seqsrchmenu = new JMenu("Sequence Database Search");
           final JMenu analymenu = new JMenu("Analysis");
           final JMenu dismenu = new JMenu("Protein Disorder");
-          // final JMenu msawsmenu = new
-          // JMenu(MessageManager.getString("label.alignment"));
-          // final JMenu secstrmenu = new
-          // JMenu(MessageManager.getString("label.secondary_structure_prediction"));
-          // final JMenu seqsrchmenu = new
-          // JMenu(MessageManager.getString("label.sequence_database_search"));
-          // final JMenu analymenu = new
-          // JMenu(MessageManager.getString("label.analysis"));
-          // final JMenu dismenu = new
-          // JMenu(MessageManager.getString("label.protein_disorder"));
           // JAL-940 - only show secondary structure prediction services from
           // the legacy server
           if (// Cache.getDefault("SHOW_JWS1_SERVICES", true)
@@ -4812,8 +4809,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
           {
             newFrame.hideFeatureColumns(SequenceOntologyI.EXON, false);
           }
-          String newtitle = String.format("%s %s %s", MessageManager
-                  .getString(dna ? "label.proteins" : "label.nucleotides"),
+          String newtitle = String.format("%s %s %s",
+                  dna ? MessageManager.getString("label.proteins")
+                          : MessageManager.getString("label.nucleotides"),
                   MessageManager.getString("label.for"), getTitle());
           newFrame.setTitle(newtitle);