i18n
[jalview.git] / src / jalview / gui / AlignFrame.java
index 0a4f4b8..d188d61 100644 (file)
@@ -988,8 +988,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       if (currentFileFormat == null)
       {
         JOptionPane.showInternalMessageDialog(Desktop.desktop,
-                "You must select a file format before saving!",
-                "File format not specified", JOptionPane.WARNING_MESSAGE);
+                MessageManager.getString("label.select_file_format_before_saving"),
+                MessageManager.getString("label.file_format_not_specified"), JOptionPane.WARNING_MESSAGE);
         value = chooser.showSaveDialog(this);
         return;
       }
@@ -1047,9 +1047,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
         int reply = JOptionPane
                 .showInternalConfirmDialog(
                         Desktop.desktop,
-                        "The Alignment contains hidden columns."
-                                + "\nDo you want to save only the visible alignment?",
-                        "Save / Omit Hidden Columns",
+                        MessageManager.getString("label.alignment_contains_hidden_columns"),
+                        MessageManager.getString("action.save_omit_hidden_columns"),
                         JOptionPane.YES_NO_OPTION,
                         JOptionPane.QUESTION_MESSAGE);
 
@@ -1090,8 +1089,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
     if (!success)
     {
-      JOptionPane.showInternalMessageDialog(this, "Couldn't save file: "
-              + fileName, "Error Saving File", JOptionPane.WARNING_MESSAGE);
+      JOptionPane.showInternalMessageDialog(this, MessageManager.formatMessage("label.couldnt_save_file", new String[]{fileName}),
+              MessageManager.getString("label.error_saving_file"), JOptionPane.WARNING_MESSAGE);
     }
 
     return success;
@@ -1128,9 +1127,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       int reply = JOptionPane
               .showInternalConfirmDialog(
                       Desktop.desktop,
-                      "The Alignment contains hidden columns."
-                              + "\nDo you want to output only the visible alignment?",
-                      "Save / Omit Hidden Columns",
+                      MessageManager.getString("label.alignment_contains_hidden_columns"),
+                      MessageManager.getString("action.save_omit_hidden_columns"),
                       JOptionPane.YES_NO_OPTION,
                       JOptionPane.QUESTION_MESSAGE);
 
@@ -3409,8 +3407,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
               int option = JOptionPane.showInternalConfirmDialog(
                       jalview.gui.Desktop.desktop,
-                      "Remove from default list?",
-                      "Remove user defined colour",
+                      MessageManager.getString("label.remove_from_default_list"),
+                      MessageManager.getString("label.remove_user_defined_colour"),
                       JOptionPane.YES_NO_OPTION);
               if (option == JOptionPane.YES_OPTION)
               {
@@ -3562,7 +3560,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
             || (viewport.getSelectionGroup().getSize() < 2))
     {
       JOptionPane.showInternalMessageDialog(this,
-              "You must select at least 2 sequences.", "Invalid Selection",
+              MessageManager.getString("label.you_must_select_least_two_sequences"), MessageManager.getString("label.invalid_selection"),
               JOptionPane.WARNING_MESSAGE);
     }
     else
@@ -3588,9 +3586,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
             || (viewport.getAlignment().getHeight() < 4))
     {
       JOptionPane.showInternalMessageDialog(this,
-              "Principal component analysis must take\n"
-                      + "at least 4 input sequences.",
-              "Sequence selection insufficient",
+              MessageManager.getString("label.principal_component_analysis_must_take_least_four_input_sequences"),
+              MessageManager.getString("label.sequence_selection_insufficient"),
               JOptionPane.WARNING_MESSAGE);
 
       return;
@@ -3692,8 +3689,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
         JOptionPane
                 .showMessageDialog(
                         Desktop.desktop,
-                        "You need to have more than two sequences selected to build a tree!",
-                        "Not enough sequences", JOptionPane.WARNING_MESSAGE);
+                        MessageManager.getString("label.you_need_more_two_sequences_selected_build_tree"),
+                        MessageManager.getString("label.not_enough_sequences"), JOptionPane.WARNING_MESSAGE);
         return;
       }
 
@@ -3707,10 +3704,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
           JOptionPane
                   .showMessageDialog(
                           Desktop.desktop,
-                          "The selected region to create a tree may\nonly contain residues or gaps.\n"
-                                  + "Try using the Pad function in the edit menu,\n"
-                                  + "or one of the multiple sequence alignment web services.",
-                          "Sequences in selection are not aligned",
+                          MessageManager.getString("label.selected_region_to_tree_may_only_contain_residues_or_gaps"),
+                          MessageManager.getString("label.sequences_selection_not_aligned"),
                           JOptionPane.WARNING_MESSAGE);
 
           return;
@@ -3728,10 +3723,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
         JOptionPane
                 .showMessageDialog(
                         Desktop.desktop,
-                        "The sequences must be aligned before creating a tree.\n"
-                                + "Try using the Pad function in the edit menu,\n"
-                                + "or one of the multiple sequence alignment web services.",
-                        "Sequences not aligned",
+                        MessageManager.getString("label.sequences_must_be_aligned_before_creating_tree"),
+                        MessageManager.getString("label.sequences_not_aligned"),
                         JOptionPane.WARNING_MESSAGE);
 
         return;
@@ -4045,13 +4038,13 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       } catch (Exception ex)
       {
         JOptionPane.showMessageDialog(Desktop.desktop, ex.getMessage(),
-                "Problem reading tree file", JOptionPane.WARNING_MESSAGE);
+                MessageManager.getString("label.problem_reading_tree_file"), JOptionPane.WARNING_MESSAGE);
         ex.printStackTrace();
       }
       if (fin != null && fin.hasWarningMessage())
       {
         JOptionPane.showMessageDialog(Desktop.desktop,
-                fin.getWarningMessage(), "Possible problem with tree file",
+                fin.getWarningMessage(), MessageManager.getString("label.possible_problem_with_tree_file"),
                 JOptionPane.WARNING_MESSAGE);
       }
     }
@@ -4571,8 +4564,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       JOptionPane
               .showMessageDialog(
                       Desktop.desktop,
-                      "Please select at least three bases in at least one sequence in order to perform a cDNA translation.",
-                      "Translation Failed", JOptionPane.WARNING_MESSAGE);
+                      MessageManager.getString("label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation"),
+                      MessageManager.getString("label.translation_failed"), JOptionPane.WARNING_MESSAGE);
     }
     else
     {
@@ -4605,8 +4598,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       JOptionPane
       .showMessageDialog(
               Desktop.desktop,
-              "Unfortunately, something went wrong when translating your sequences.\nPlease take a look in the Jalview java console\nand submit a bug report including the stacktrace.",
-              "Implementation error: Translation Failed", JOptionPane.ERROR_MESSAGE);
+              MessageManager.getString("label.error_when_translating_sequences_submit_bug_report"),
+              MessageManager.getString("label.implementation_error") + MessageManager.getString("translation_failed"), JOptionPane.ERROR_MESSAGE);
       return;
     }
     if (al == null)
@@ -4614,8 +4607,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       JOptionPane
               .showMessageDialog(
                       Desktop.desktop,
-                      "Please select at least three bases in at least one sequence in order to perform a cDNA translation.",
-                      "Translation Failed", JOptionPane.WARNING_MESSAGE);
+                      MessageManager.getString("label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation"),
+                      MessageManager.getString("label.translation_failed"), JOptionPane.WARNING_MESSAGE);
     }
     else
     {
@@ -4814,10 +4807,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
                   || JOptionPane
                           .showConfirmDialog(
                                   this,
-                                  "Do you want to automatically associate the "
-                                          + filesmatched.size()
-                                          + " PDB files with sequences in the alignment that have the same name ?",
-                                  "Automatically Associate PDB files by name",
+                                  MessageManager.formatMessage("label.automatically_associate_pdb_files_with_sequences_same_name",
+                                                 new String[]{Integer.valueOf(filesmatched.size()).toString()}),
+                                  MessageManager.getString("label.automatically_associate_pdb_files_by_name"),
                                   JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
 
           {
@@ -4850,10 +4842,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
                           "AUTOASSOCIATE_PDBANDSEQS_IGNOREOTHERS", false) || JOptionPane
                           .showConfirmDialog(
                                   this,
-                                  "<html>Do you want to <em>ignore</em> the "
-                                          + filesnotmatched.size()
-                                          + " files whose names did not match any sequence IDs ?</html>",
-                                  "Ignore unmatched dropped files ?",
+                                  MessageManager.formatMessage("label.ignore_unmatched_dropped_files_info", new String[]{Integer.valueOf(filesnotmatched.size()).toString()}),
+                                  MessageManager.getString("label.ignore_unmatched_dropped_files"),
                                   JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION))
           {
             return;
@@ -5040,7 +5030,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     if (SwingUtilities.isRightMouseButton(e))
     {
       String reply = JOptionPane.showInternalInputDialog(this,
-              "Enter View Name", "Edit View Name",
+              MessageManager.getString("label.enter_view_name"), MessageManager.getString("label.enter_view_name,
               JOptionPane.QUESTION_MESSAGE);
 
       if (reply != null)