From: darolmar Date: Thu, 29 Aug 2013 11:34:24 +0000 (+0200) Subject: i18n X-Git-Tag: Jalview_2_9~200^2~17^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=21c29b20790ac555b2e2a124a034f6c6b4486270;p=jalview.git i18n --- diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 7a92aa0..f6831a0 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -69,7 +69,16 @@ action.close = Close action.add = Add action.save_as_default = Save as default action.cancel_fetch = Cancel Fetch - +action.save_omit_hidden_columns = Save / Omit Hidden Columns +action.change_font = Change Font +action.colour = Colour +action.calculate = Calculate +action.select_all = Select all +action.deselect_all = Deselect all +action.invert_selection = Invert selection +action.using_jmol = Using Jmol +action.link = Link +action.show_chain = Show Chain label.str = Str: label.seq = Seq: label.structures_manager = Structures Manager @@ -196,7 +205,7 @@ label.successfully_pasted_annotation_to_alignment= Successfully pasted annotatio label.successfully_pasted_alignment_file = Successfully pasted alignment file label.paste_your_alignment_file = Paste your alignment file here label.paste_your = Paste your -label.finished_searching = Finished searching. +label.finished_searching = Finished searching label.search_results= Search results {0} : {1} label.found_match_for = Found match for {0} label.font = Font: @@ -239,3 +248,139 @@ label.fetch_das_features = Fetch DAS Features label.selected_database_to_fetch_from = Selected {0} database {1} to fetch from {2} label.database_param = Database: {0} label.example_param = Example: {0} +label.select_file_format_before_saving = You must select a file format before saving! +label.file_format_not_specified = File format not specified +label.alignment_contains_hidden_columns = The Alignment contains hidden columns.\nDo you want to save only the visible alignment? +label.couldnt_save_file = Couldn't save file: {0} +label.error_saving_file = Error Saving File +label.remove_from_default_list = Remove from default list? +label.remove_user_defined_colour = Remove user defined colour +label.you_must_select_least_two_sequences = You must select at least 2 sequences. +label.invalid_selection = Invalid Selection +label.principal_component_analysis_must_take_least_four_input_sequences = Principal component analysis must take\nat least 4 input sequences. +label.sequence_selection_insufficient = Sequence selection insufficient +label.you_need_more_two_sequences_selected_build_tree = You need to have more than two sequences selected to build a tree! +label.not_enough_sequences = Not enough sequences +label.selected_region_to_tree_may_only_contain_residues_or_gaps = The selected region to create a tree may\nonly contain residues or gaps.\nTry using the Pad function in the edit menu,\nor one of the multiple sequence alignment web services. +label.sequences_selection_not_aligned = Sequences in selection are not aligned +label.sequences_must_be_aligned_before_creating_tree = The sequences must be aligned before creating a tree.\nTry using the Pad function in the edit menu,\n or one of the multiple sequence alignment web services. +label.sequences_not_aligned = Sequences not aligned +label.problem_reading_tree_file = Problem reading tree file +label.possible_problem_with_tree_file = Possible problem with tree file +label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = Please select at least three bases in at least one sequence in order to perform a cDNA translation. +label.translation_failed = Translation Failed +label.error_when_translating_sequences_submit_bug_report = 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. +label.implementation_error = Implementation error: +label.automatically_associate_pdb_files_with_sequences_same_name = Do you want to automatically associate the {0} PDB files with sequences in the alignment that have the same name? +label.automatically_associate_pdb_files_by_name = Automatically Associate PDB files by name +label.ignore_unmatched_dropped_files_info = Do you want to ignore the {0} files whose names did not match any sequence IDs ? +label.ignore_unmatched_dropped_files = Ignore unmatched dropped files? +label.enter_view_name = Enter View Name +label.enter_label = Enter label +label.enter_label_for_the_structure = Enter a label for the structure? +label.pdb_entry_is_already_displayed = {0} is already displayed.\nDo you want to re-use this viewer ? +label.map_sequences_to_visible_window = Map Sequences to Visible Window: {0} +label.add_pdbentry_to_view = Do you want to add {0} to the view called\n'{1}'\n +label.align_to_existing_structure_view = Align to existing structure view +label.pdb_entries_couldnt_be_retrieved = The following pdb entries could not be retrieved from the PDB\:\n{0}\nPlease try downloading them manually. +label.couldnt_load_file = Couldn't load file +label.couldnt_find_pdb_id_in_file = Couldn't find a PDB id in the file supplied. Please enter an Id to identify this structure. +label.no_pdb_id_in_file = No PDB Id in File +label.couldnt_read_pasted_text = Couldn't read the pasted text {0} +label.error_parsing_text = Error parsing text +label.enter_local_das_source = Enter Nickname & URL of Local DAS Source +label.you_can_only_edit_or_remove_local_das_sources = You can only edit or remove local DAS Sources! +label.public_das_source = Public DAS source - not editable +label.input_alignment_from_url = Input Alignment From URL +label.couldnt_import_as_vamsas_session = Couldn't import '{0}' as a new vamsas session. +label.vamsas_document_import_failed = Vamsas Document Import Failed +label.couldnt_locate = Couldn't locate {0} +label.url_not_found = URL not found +label.no_link_selected = No link selected +label.new_sequence_url_link = New sequence URL link +label.cannot_edit_annotations_in_wrapped_view = Cannot edit annotations in wrapped view +label.wrapped_view_no_edit = Wrapped view - no edit +label.error_retrieving_data = Error Retrieving Data +label.user_colour_scheme_must_have_name = User colour scheme must have a name +label.no_name_colour_scheme = No name for colour scheme +label.invalid_url = Invalid URL ! +label.error_loading_file = Error loading file +label.problems_opening_file = Encountered problems opening {0}!! +label.file_open_error = File open error +label.no_das_sources_selected_warn = No das sources were selected.\nPlease select some sources and\ntry again. +label.no_das_sources_selected_title = No DAS Sources Selected +label.colour_scheme_exists_overwrite = Colour scheme {0} exists.\nContinue saving colour scheme as {1}?" +label.duplicate_scheme_name = Duplicate scheme name +label.jalview_new_questionnaire = There is a new Questionnaire available. Would you like to complete it now ?\n +label.jalview_user_survey = Jalview User Survey +label.alignment_properties = Alignment Properties: {0} +label.alignment_props = Alignment Properties +label.input_cut_paste = Cut & Paste Input +label.alignment_output_command = Alignment output - {0} +label.annotations = Annotations +label.features = Features +label.overview_params = Overview {0} +label.paste_newick_file = Paste Newick file +label.load_tree_from_file = From File - +label.colour_by_annotation = Colour by Annotation +label.selection_output_command = Selection output - {0} +label.annotation_for_displayid =

Annotation for {0}

+label.pdb_sequence_mapping = PDB - Sequence Mapping +label.pca_details = PCA details +label.redundancy_threshold_selection = Redundancy threshold selection +label.user_defined_colours = User defined colours +label.jalviewLite_release = JalviewLite - Release {0} +label.jaview_build_date = Build date: {0} +label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Jan Engelhardt, Lauren Lui, +label.jalview_authors_2 = Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton. +label.jalview_dev_managers = Development managed by The Barton Group, University of Dundee, Scotland, UK. +label.jalview_distribution_lists = For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list +label.jalview_please_cite = If you use Jalview, please cite: +label.jalview_cite_1_authors = Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009) +label.jalview_cite_1_title = Jalview Version 2 - a multiple sequence alignment editor and analysis workbench +label.jalview_cite_1_ref = Bioinformatics doi: 10.1093/bioinformatics/btp033 +label.right_click = Right click +label.to_add_annotation = to add annotation +label.alignment_has_no_annotations = Alignment has no annotations +label.retrieving_pdb_data = Retrieving PDB data... +label.label = Label +label.no_features_added_to_this_alignment = No Features added to this alignment!! +label.features_can_be_added_from_searches_1 = (Features can be added from searches or +label.features_can_be_added_from_searches_2 = from Jalview / GFF features files) +label.calculating_pca= Calculating PCA +label.reveal_columns = Reveal Columns +label.jalview_cannot_open_file = Jalview can't open file +label.jalview_applet = Jalview applet +label.loading_data = Loading data +label.memory_stats = Total Free Memory: {0} MB; Max Memory: {1} MB; {2} % +label.calculating_tree = Calculating tree +label.state_queueing = queuing +label.state_running = running +label.state_complete = complete +label.state_job_cancelled = job cancelled!! +label.state_job_error = job error! +label.server_error_try_later = Server Error! (try later) +label.error_loading_pdb_data = Error loading PDB data!! +label.fetching_pdb_data = Fetching PDB data... +label.structure_type = Structure_type +label.settings_for_type = Settings for {0} +label.view_full_application = View in Full Application +label.load_associated_tree = Load Associated Tree ... +label.load_features_annotations = Load Features/Annotations ... +label.export_features = Export Features ... +label.export_annotations = Export Annotations ... +label.jalview_copy = Copy (Jalview Only) +label.jalview_cut = Cut (Jalview Only) +label.to_upper_case = To Upper Case +label.to_lower_case = To Lower Case +label.toggle_case = Toggle Case +label.edit_name_description = Edit Name/Description +label.create_sequence_feature = Create Sequence Feature +label.edit_sequence = Edit Sequence +label.sequence_details = Sequence Details +label.jmol_help = Jmol Help +label.all = All +label.sort_by_score = Sort by Score +label.sort_by_density = Sort by Density +label.reveal = Reveal +label.hide_columns = Hide Columns diff --git a/src/MCview/AppletPDBCanvas.java b/src/MCview/AppletPDBCanvas.java index 714c33f..40e99db 100644 --- a/src/MCview/AppletPDBCanvas.java +++ b/src/MCview/AppletPDBCanvas.java @@ -29,6 +29,7 @@ import jalview.datamodel.*; import jalview.appletgui.*; import jalview.structure.*; +import jalview.util.MessageManager; public class AppletPDBCanvas extends Panel implements MouseListener, MouseMotionListener, StructureListener @@ -468,7 +469,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, g.fillRect(0, 0, getSize().width, getSize().height); g.setColor(Color.black); g.setFont(new Font("Verdana", Font.BOLD, 14)); - g.drawString("Error loading PDB data!!", 50, getSize().height / 2); + g.drawString(MessageManager.getString("label.error_loading_pdb_data"), 50, getSize().height / 2); return; } @@ -476,7 +477,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, { g.setColor(Color.black); g.setFont(new Font("Verdana", Font.BOLD, 14)); - g.drawString("Fetching PDB data...", 50, getSize().height / 2); + g.drawString(MessageManager.getString("label.fetching_pdb_data"), 50, getSize().height / 2); return; } diff --git a/src/MCview/AppletPDBViewer.java b/src/MCview/AppletPDBViewer.java index e8bfc28..b2e1187 100644 --- a/src/MCview/AppletPDBViewer.java +++ b/src/MCview/AppletPDBViewer.java @@ -61,7 +61,7 @@ public class AppletPDBViewer extends EmbmenuFrame implements false, null); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "PDB - Sequence Mapping", + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.pdb_sequence_mapping"), 500, 600); cap.setText(pdbcanvas.mappingDetails.toString()); diff --git a/src/MCview/PDBViewer.java b/src/MCview/PDBViewer.java index 8bfd7b5..b9cdaea 100755 --- a/src/MCview/PDBViewer.java +++ b/src/MCview/PDBViewer.java @@ -26,6 +26,7 @@ import jalview.datamodel.*; import jalview.gui.*; import jalview.io.*; import jalview.schemes.*; +import jalview.util.MessageManager; import jalview.ws.ebi.EBIFetchClient; public class PDBViewer extends JInternalFrame implements Runnable @@ -362,8 +363,8 @@ public class PDBViewer extends JInternalFrame implements Runnable 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) { diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java index 453e642..ce1bae2 100644 --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -82,17 +82,17 @@ public class APopupMenu extends java.awt.PopupMenu implements CheckboxMenuItem displayNonconserved = new CheckboxMenuItem(); - Menu editMenu = new Menu("Edit"); + Menu editMenu = new Menu(MessageManager.getString("action.edit")); - MenuItem copy = new MenuItem("Copy (Jalview Only)"); + MenuItem copy = new MenuItem(MessageManager.getString("label.jalview_copy")); - MenuItem cut = new MenuItem("Cut (Jalview Only)"); + MenuItem cut = new MenuItem(MessageManager.getString("label.jalview_cut")); - MenuItem toUpper = new MenuItem("To Upper Case"); + MenuItem toUpper = new MenuItem(MessageManager.getString("label.to_upper_case")); - MenuItem toLower = new MenuItem("To Lower Case"); + MenuItem toLower = new MenuItem(MessageManager.getString("label.to_lower_case")); - MenuItem toggleCase = new MenuItem("Toggle Case"); + MenuItem toggleCase = new MenuItem(MessageManager.getString("label.toggle_case")); Menu outputmenu = new Menu(); @@ -104,15 +104,15 @@ public class APopupMenu extends java.awt.PopupMenu implements MenuItem repGroup = new MenuItem(); - MenuItem sequenceName = new MenuItem("Edit Name/Description"); + MenuItem sequenceName = new MenuItem(MessageManager.getString("label.edit_name_description")); - MenuItem sequenceFeature = new MenuItem("Create Sequence Feature"); + MenuItem sequenceFeature = new MenuItem(MessageManager.getString("label.create_sequence_feature")); - MenuItem editSequence = new MenuItem("Edit Sequence"); + MenuItem editSequence = new MenuItem(MessageManager.getString("label.edit_sequence")); - MenuItem sequenceDetails = new MenuItem("Sequence Details ..."); + MenuItem sequenceDetails = new MenuItem(MessageManager.getString("label.sequence_details") + "..."); - MenuItem selSeqDetails = new MenuItem("Sequence Details ..."); + MenuItem selSeqDetails = new MenuItem(MessageManager.getString("label.sequence_details") + "..."); Sequence seq; @@ -179,7 +179,7 @@ public class APopupMenu extends java.awt.PopupMenu implements if (links != null && links.size() > 0) { - Menu linkMenu = new Menu("Link"); + Menu linkMenu = new Menu(MessageManager.getString("action.link")); String link; for (int i = 0; i < links.size(); i++) { @@ -636,7 +636,7 @@ public class APopupMenu extends java.awt.PopupMenu implements Frame frame = new Frame(); frame.add(cap); jalview.bin.JalviewLite.addFrame(frame, - "Selection output - " + e.getActionCommand(), 600, 500); + MessageManager.formatMessage("label.selection_output_command", new String[]{e.getActionCommand()}),600, 500); // JBPNote: getSelectionAsNewSequence behaviour has changed - this method // now returns a full copy of sequence data // TODO consider using getSequenceSelection instead here @@ -667,8 +667,7 @@ public class APopupMenu extends java.awt.PopupMenu implements StringBuffer contents = new StringBuffer(); for (SequenceI seq : sequences) { - contents.append("

Annotation for " + seq.getDisplayId(true) - + "

"); + contents.append(MessageManager.formatMessage("label.annotation_for_displayid",new String[]{seq.getDisplayId(true)})); new SequenceAnnotationReport(null) .createSequenceAnnotationReport( contents, diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index f55bb6c..865f0d4 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -970,8 +970,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, cap.setText(contents.toString()); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Alignment Properties: " - + getTitle(), 400, 250); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage("label.alignment_properties", new String[]{getTitle()}), + 400, 250); } else if (source == overviewMenuItem) { @@ -1114,7 +1114,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, CutAndPasteTransfer cap = new CutAndPasteTransfer(true, this); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Cut & Paste Input", 500, 500); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.input_cut_paste"), 500, 500); } protected void outputText_actionPerformed(ActionEvent e) @@ -1123,7 +1123,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, Frame frame = new Frame(); frame.add(cap); jalview.bin.JalviewLite.addFrame(frame, - "Alignment output - " + e.getActionCommand(), 600, 500); + MessageManager.formatMessage("label.alignment_output_command", new String[]{e.getActionCommand()}),600, 500); cap.setText(new AppletFormatAdapter().formatSequences( e.getActionCommand(), viewport.getAlignment(), viewport.showJVSuffix)); @@ -1153,7 +1153,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Annotations", 600, 500); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.annotations"), 600, 500); cap.setText(annotation); } @@ -1209,7 +1209,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Features", 600, 500); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.features"), 600, 500); cap.setText(features); } else @@ -2286,7 +2286,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, OverviewPanel overview = new OverviewPanel(alignPanel); frame.add(overview); // +50 must allow for applet frame window - jalview.bin.JalviewLite.addFrame(frame, "Overview " + this.getTitle(), + jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage("label.overview_params", new String[]{this.getTitle()}), overview.getPreferredSize().width, overview.getPreferredSize().height + 50); @@ -2464,7 +2464,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { Frame frame = new Frame(); frame.add(new PairwiseAlignPanel(alignPanel)); - jalview.bin.JalviewLite.addFrame(frame, "Pairwise Alignment", 600, + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("action.pairwise_alignment"), 600, 500); } } @@ -2566,12 +2566,12 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, cap.setTreeImport(); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Paste Newick file ", 400, 300); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.paste_newick_file"), 400, 300); } public void loadTree(jalview.io.NewickFile tree, String treeFile) { - TreePanel tp = new TreePanel(alignPanel, treeFile, "From File - ", tree); + TreePanel tp = new TreePanel(alignPanel, treeFile, MessageManager.getString("label.load_tree_from_file"), tree); jalview.bin.JalviewLite.addFrame(tp, treeFile, 600, 500); addTreeMenuItem(tp, treeFile); } @@ -2688,28 +2688,28 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, // TODO: update this text for each release or centrally store it for // lite and application g.setFont(new Font("Helvetica", Font.BOLD, 14)); - g.drawString("JalviewLite - Release " + version, x, y += fh); + g.drawString(MessageManager.formatMessage("label.jalviewLite_release", new String[]{version}), x, y += fh); g.setFont(new Font("Helvetica", Font.BOLD, 12)); - g.drawString("Build date: " + builddate, x, y += fh); + g.drawString(MessageManager.formatMessage("label.jaview_build_date", new String[]{builddate}), x, y += fh); g.setFont(new Font("Helvetica", Font.PLAIN, 12)); g.drawString( - "Authors: Jim Procter, Andrew Waterhouse, Jan Engelhardt, Lauren Lui,", + MessageManager.getString("label.jalview_authors_1"), x, y += fh * 1.5); - g.drawString("Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton.", x + 50, y += fh+8); + g.drawString(MessageManager.getString("label.jalview_authors_2"), x + 50, y += fh+8); g.drawString( - "Development managed by The Barton Group, University of Dundee, Scotland, UK.", + MessageManager.getString("label.jalview_dev_managers"), x, y += fh); g.drawString( - "For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list", + MessageManager.getString("label.jalview_distribution_lists"), x, y += fh); - g.drawString("If you use Jalview, please cite:", x, y += fh + 8); + g.drawString(MessageManager.getString("label.jalview_please_cite"), x, y += fh + 8); g.drawString( - "Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)", + MessageManager.getString("label.jalview_cite_1_authors"), x, y += fh); g.drawString( - "Jalview Version 2 - a multiple sequence alignment editor and analysis workbench", + MessageManager.getString("label.jalview_cite_1_title"), x, y += fh); - g.drawString("Bioinformatics doi: 10.1093/bioinformatics/btp033", + g.drawString(MessageManager.getString("label.jalview_cite_1_ref"), x, y += fh); } } @@ -2717,7 +2717,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, Frame frame = new Frame(); frame.add(new AboutPanel(JalviewLite.getVersion(), JalviewLite .getBuildDate())); - jalview.bin.JalviewLite.addFrame(frame, "Jalview", 580, 220); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.jalview"), 580, 220); } @@ -2738,33 +2738,33 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, MenuBar alignFrameMenuBar = new MenuBar(); - Menu fileMenu = new Menu("File"); + Menu fileMenu = new Menu(MessageManager.getString("action.file")); - MenuItem loadApplication = new MenuItem("View in Full Application"); + MenuItem loadApplication = new MenuItem(MessageManager.getString("label.view_full_application")); - MenuItem loadTree = new MenuItem("Load Associated Tree ..."); + MenuItem loadTree = new MenuItem(MessageManager.getString("label.load_associated_tree")); - MenuItem loadAnnotations = new MenuItem("Load Features/Annotations ..."); + MenuItem loadAnnotations = new MenuItem(MessageManager.getString("label.load_features_annotations")); - MenuItem outputFeatures = new MenuItem("Export Features ..."); + MenuItem outputFeatures = new MenuItem(MessageManager.getString("label.export_features")); - MenuItem outputAnnotations = new MenuItem("Export Annotations ..."); + MenuItem outputAnnotations = new MenuItem(MessageManager.getString("label.export_annotations")); - MenuItem closeMenuItem = new MenuItem("Close"); + MenuItem closeMenuItem = new MenuItem(MessageManager.getString("action.close")); - Menu editMenu = new Menu("Edit"); + Menu editMenu = new Menu(MessageManager.getString("action.edit")); - Menu viewMenu = new Menu("View"); + Menu viewMenu = new Menu(MessageManager.getString("action.view")); - Menu colourMenu = new Menu("Colour"); + Menu colourMenu = new Menu(MessageManager.getString("action.colour")); - Menu calculateMenu = new Menu("Calculate"); + Menu calculateMenu = new Menu(MessageManager.getString("action.calculate")); - MenuItem selectAllSequenceMenuItem = new MenuItem("Select all"); + MenuItem selectAllSequenceMenuItem = new MenuItem(MessageManager.getString("action.select_all")); - MenuItem deselectAllSequenceMenuItem = new MenuItem("Deselect All"); + MenuItem deselectAllSequenceMenuItem = new MenuItem(MessageManager.getString("action.deselect_all")); - MenuItem invertSequenceMenuItem = new MenuItem("Invert Selection"); + MenuItem invertSequenceMenuItem = new MenuItem(MessageManager.getString("action.invert_selection")); MenuItem remove2LeftMenuItem = new MenuItem(); @@ -2840,7 +2840,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, CheckboxMenuItem displayNonconservedMenuItem = new CheckboxMenuItem(); - MenuItem alProperties = new MenuItem("Alignment Properties..."); + MenuItem alProperties = new MenuItem(MessageManager.getString("label.alignment_props")); MenuItem overviewMenuItem = new MenuItem(); diff --git a/src/jalview/appletgui/AnnotationColourChooser.java b/src/jalview/appletgui/AnnotationColourChooser.java index 769e068..5f61ead 100644 --- a/src/jalview/appletgui/AnnotationColourChooser.java +++ b/src/jalview/appletgui/AnnotationColourChooser.java @@ -143,7 +143,7 @@ public class AnnotationColourChooser extends Panel implements frame = new Frame(); frame.add(this); - jalview.bin.JalviewLite.addFrame(frame, "Colour by Annotation", 560, + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.colour_by_annotation"), 560, 175); validate(); } diff --git a/src/jalview/appletgui/AnnotationLabels.java b/src/jalview/appletgui/AnnotationLabels.java index 3d54ae1..a4b7af2 100755 --- a/src/jalview/appletgui/AnnotationLabels.java +++ b/src/jalview/appletgui/AnnotationLabels.java @@ -23,6 +23,7 @@ import java.awt.*; import java.awt.event.*; import jalview.datamodel.*; +import jalview.util.MessageManager; import jalview.util.ParseHtmlBodyAndLinks; public class AnnotationLabels extends Panel implements ActionListener, @@ -405,7 +406,7 @@ public class AnnotationLabels extends Panel implements ActionListener, if ((evt.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) { - PopupMenu popup = new PopupMenu("Annotations"); + PopupMenu popup = new PopupMenu(MessageManager.getString("label.annotations")); MenuItem item = new MenuItem(ADDNEW); item.addActionListener(this); @@ -765,8 +766,8 @@ public class AnnotationLabels extends Panel implements ActionListener, if (!av.wrapAlignment && ((aa == null) || (aa.length < 1))) { g.setColor(Color.black); - g.drawString("Right click", 2, 8); - g.drawString("to add annotation", 2, 18); + g.drawString(MessageManager.getString("label.right_click"), 2, 8); + g.drawString(MessageManager.getString("label.to_add_annotation"), 2, 18); } } } diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index 154652d..7129eee 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -25,6 +25,7 @@ import java.awt.event.*; import jalview.datamodel.*; import jalview.renderer.AnnotationRenderer; import jalview.renderer.AwtRenderPanelI; +import jalview.util.MessageManager; public class AnnotationPanel extends Panel implements AwtRenderPanelI, AdjustmentListener, ActionListener, MouseListener, @@ -317,7 +318,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, return; } - PopupMenu pop = new PopupMenu("Structure type"); + PopupMenu pop = new PopupMenu(MessageManager.getString("label.structure_type")); MenuItem item; /* * Just display the needed structure options @@ -618,7 +619,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, g.setColor(Color.black); if (av.validCharWidth) { - g.drawString("Alignment has no annotations", 20, 15); + g.drawString(MessageManager.getString("label.alignment_has_no_annotations"), 20, 15); } return; diff --git a/src/jalview/appletgui/AppletJmol.java b/src/jalview/appletgui/AppletJmol.java index a3dbe22..e109ae8 100644 --- a/src/jalview/appletgui/AppletJmol.java +++ b/src/jalview/appletgui/AppletJmol.java @@ -27,51 +27,52 @@ import jalview.structure.*; import jalview.io.*; import jalview.schemes.*; +import jalview.util.MessageManager; public class AppletJmol extends EmbmenuFrame implements // StructureListener, KeyListener, ActionListener, ItemListener, SequenceStructureBinding { - Menu fileMenu = new Menu("File"); + Menu fileMenu = new Menu(MessageManager.getString("action.file")); - Menu viewMenu = new Menu("View"); + Menu viewMenu = new Menu(MessageManager.getString("action.view")); - Menu coloursMenu = new Menu("Colours"); + Menu coloursMenu = new Menu(MessageManager.getString("action.colour")); - Menu chainMenu = new Menu("Show Chain"); + Menu chainMenu = new Menu(MessageManager.getString("action.show_chain")); - Menu helpMenu = new Menu("Help"); + Menu helpMenu = new Menu(MessageManager.getString("action.help")); - MenuItem mappingMenuItem = new MenuItem("View Mapping"); + MenuItem mappingMenuItem = new MenuItem(MessageManager.getString("label.view_mapping")); - CheckboxMenuItem seqColour = new CheckboxMenuItem("By Sequence", true); + CheckboxMenuItem seqColour = new CheckboxMenuItem(MessageManager.getString("action.by_sequence"), true); - CheckboxMenuItem jmolColour = new CheckboxMenuItem("Using Jmol", false); + CheckboxMenuItem jmolColour = new CheckboxMenuItem(MessageManager.getString("action.using_jmol"), false); - MenuItem chain = new MenuItem("By Chain"); + MenuItem chain = new MenuItem(MessageManager.getString("action.by_chain")); - MenuItem charge = new MenuItem("Charge & Cysteine"); + MenuItem charge = new MenuItem(MessageManager.getString("label.charge_cysteine")); - MenuItem zappo = new MenuItem("Zappo"); + MenuItem zappo = new MenuItem(MessageManager.getString("label.zappo")); - MenuItem taylor = new MenuItem("Taylor"); + MenuItem taylor = new MenuItem(MessageManager.getString("label.taylor")); - MenuItem hydro = new MenuItem("Hydrophobicity"); + MenuItem hydro = new MenuItem(MessageManager.getString("label.hydrophobicity")); - MenuItem helix = new MenuItem("Helix Propensity"); + MenuItem helix = new MenuItem(MessageManager.getString("label.helix_propensity")); - MenuItem strand = new MenuItem("Strand Propensity"); + MenuItem strand = new MenuItem(MessageManager.getString("label.strand_propensity")); - MenuItem turn = new MenuItem("Turn Propensity"); + MenuItem turn = new MenuItem(MessageManager.getString("label.turn_propensity")); - MenuItem buried = new MenuItem("Buried Index"); + MenuItem buried = new MenuItem(MessageManager.getString("label.buried_index")); - MenuItem purinepyrimidine = new MenuItem("Purine/Pyrimidine"); + MenuItem purinepyrimidine = new MenuItem(MessageManager.getString("label.purine_pyrimidine")); - MenuItem user = new MenuItem("User Defined Colours"); + MenuItem user = new MenuItem(MessageManager.getString("label.user_defined_colours")); - MenuItem jmolHelp = new MenuItem("Jmol Help"); + MenuItem jmolHelp = new MenuItem(MessageManager.getString("label.jmol_help")); Panel scriptWindow; @@ -328,7 +329,7 @@ public class AppletJmol extends EmbmenuFrame implements { chainMenu.removeAll(); - MenuItem menuItem = new MenuItem("All"); + MenuItem menuItem = new MenuItem(MessageManager.getString("label.all")); menuItem.addActionListener(this); chainMenu.add(menuItem); @@ -396,7 +397,7 @@ public class AppletJmol extends EmbmenuFrame implements .println("Out of memory when trying to create dialog box with sequence-structure mapping."); return; } - jalview.bin.JalviewLite.addFrame(frame, "PDB - Sequence Mapping", + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.pdb_sequence_mapping"), 550, 600); } else if (evt.getSource() == charge) @@ -615,7 +616,7 @@ public class AppletJmol extends EmbmenuFrame implements g.fillRect(0, 0, currentSize.width, currentSize.height); g.setColor(Color.white); g.setFont(new Font("Verdana", Font.BOLD, 14)); - g.drawString("Retrieving PDB data....", 20, currentSize.height / 2); + g.drawString(MessageManager.getString("label.retrieving_pdb_data"), 20, currentSize.height / 2); } else { diff --git a/src/jalview/appletgui/FeatureRenderer.java b/src/jalview/appletgui/FeatureRenderer.java index 2067c7e..a14c321 100644 --- a/src/jalview/appletgui/FeatureRenderer.java +++ b/src/jalview/appletgui/FeatureRenderer.java @@ -195,7 +195,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer g.setColor(Color.black); Font f = new Font("Verdana", Font.PLAIN, 10); g.setFont(f); - g.drawString("Label", 0, 0); + g.drawString(MessageManager.getString("label.label"), 0, 0); } else { diff --git a/src/jalview/appletgui/FeatureSettings.java b/src/jalview/appletgui/FeatureSettings.java index db7d9b3..267a251 100755 --- a/src/jalview/appletgui/FeatureSettings.java +++ b/src/jalview/appletgui/FeatureSettings.java @@ -27,6 +27,7 @@ import jalview.commands.OrderCommand; import jalview.datamodel.*; import jalview.schemes.AnnotationColourGradient; import jalview.schemes.GraduatedColor; +import jalview.util.MessageManager; public class FeatureSettings extends Panel implements ItemListener, MouseListener, MouseMotionListener, ActionListener, @@ -146,16 +147,16 @@ public class FeatureSettings extends Panel implements ItemListener, height = Math.max(200, height); height = Math.min(400, height); int width = 300; - jalview.bin.JalviewLite.addFrame(frame, "Feature Settings", width, + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.feature_settings"), width, height); } public void paint(Graphics g) { g.setColor(Color.black); - g.drawString("No Features added to this alignment!!", 10, 20); - g.drawString("(Features can be added from searches or", 10, 40); - g.drawString("from Jalview / GFF features files)", 10, 60); + g.drawString(MessageManager.getString("label.no_features_added_to_this_alignment"), 10, 20); + g.drawString(MessageManager.getString("label.features_can_be_added_from_searches_1"), 10, 40); + g.drawString(MessageManager.getString("label.features_can_be_added_from_searches_2"), 10, 60); } protected void popupSort(final MyCheckbox check, final Hashtable minmax, @@ -163,8 +164,8 @@ public class FeatureSettings extends Panel implements ItemListener, { final String type = check.type; final Object typeCol = fr.getFeatureStyle(type); - java.awt.PopupMenu men = new PopupMenu("Settings for " + type); - java.awt.MenuItem scr = new MenuItem("Sort by Score"); + java.awt.PopupMenu men = new PopupMenu(MessageManager.formatMessage("label.settings_for_type", new String[]{type})); + java.awt.MenuItem scr = new MenuItem(MessageManager.getString("label.sort_by_score")); men.add(scr); final FeatureSettings me = this; scr.addActionListener(new ActionListener() @@ -177,7 +178,7 @@ public class FeatureSettings extends Panel implements ItemListener, } }); - MenuItem dens = new MenuItem("Sort by Density"); + MenuItem dens = new MenuItem(MessageManager.getString("label.sort_by_density")); dens.addActionListener(new ActionListener() { diff --git a/src/jalview/appletgui/Finder.java b/src/jalview/appletgui/Finder.java index eb2a554..93ab314 100644 --- a/src/jalview/appletgui/Finder.java +++ b/src/jalview/appletgui/Finder.java @@ -54,7 +54,7 @@ public class Finder extends Panel implements ActionListener this.ap = ap; frame = new Frame(); frame.add(this); - jalview.bin.JalviewLite.addFrame(frame, "Find", 340, 120); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("action.find"), 340, 120); frame.repaint(); frame.addWindowListener(new WindowAdapter() { diff --git a/src/jalview/appletgui/FontChooser.java b/src/jalview/appletgui/FontChooser.java index 9edea23..7de8789 100644 --- a/src/jalview/appletgui/FontChooser.java +++ b/src/jalview/appletgui/FontChooser.java @@ -89,7 +89,7 @@ public class FontChooser extends Panel implements ActionListener, Frame frame = new Frame(); this.frame = frame; frame.add(this); - jalview.bin.JalviewLite.addFrame(frame, "Change Font", 440, 115); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("action.change_font"), 440, 115); init = false; } diff --git a/src/jalview/appletgui/PCAPanel.java b/src/jalview/appletgui/PCAPanel.java index 80365e9..bcd3634 100644 --- a/src/jalview/appletgui/PCAPanel.java +++ b/src/jalview/appletgui/PCAPanel.java @@ -84,7 +84,7 @@ public class PCAPanel extends EmbmenuFrame implements Runnable, embedMenuIfNeeded(rc); add(rc, BorderLayout.CENTER); - jalview.bin.JalviewLite.addFrame(this, "Principal component analysis", + jalview.bin.JalviewLite.addFrame(this, MessageManager.getString("label.principal_component_analysis"), 475, 400); Thread worker = new Thread(this); @@ -218,7 +218,7 @@ public class PCAPanel extends EmbmenuFrame implements Runnable, CutAndPasteTransfer cap = new CutAndPasteTransfer(false, null); Frame frame = new Frame(); frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "PCA details", 500, 500); + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.pca_details"), 500, 500); cap.setText(pcaModel.getDetails()); } diff --git a/src/jalview/appletgui/RedundancyPanel.java b/src/jalview/appletgui/RedundancyPanel.java index 83febfc..d91e53b 100644 --- a/src/jalview/appletgui/RedundancyPanel.java +++ b/src/jalview/appletgui/RedundancyPanel.java @@ -70,7 +70,7 @@ public class RedundancyPanel extends SliderPanel implements Runnable, frame = new Frame(); frame.add(this); jalview.bin.JalviewLite.addFrame(frame, - "Redundancy threshold selection", 400, 100); + MessageManager.getString("label.redundancy_threshold_selection"), 400, 100); frame.addWindowListener(this); diff --git a/src/jalview/appletgui/RotatableCanvas.java b/src/jalview/appletgui/RotatableCanvas.java index e8294ba..86d06d9 100755 --- a/src/jalview/appletgui/RotatableCanvas.java +++ b/src/jalview/appletgui/RotatableCanvas.java @@ -316,7 +316,7 @@ public class RotatableCanvas extends Panel implements MouseListener, if (points == null) { g.setFont(new Font("Verdana", Font.PLAIN, 18)); - g.drawString("Calculating PCA....", 20, getSize().height / 2); + g.drawString(MessageManager.getString("label.calculating_pca") + "....", 20, getSize().height / 2); } else { diff --git a/src/jalview/appletgui/ScalePanel.java b/src/jalview/appletgui/ScalePanel.java index baa4165..cd78fab 100755 --- a/src/jalview/appletgui/ScalePanel.java +++ b/src/jalview/appletgui/ScalePanel.java @@ -21,6 +21,7 @@ import java.awt.*; import java.awt.event.*; import jalview.datamodel.*; +import jalview.util.MessageManager; public class ScalePanel extends Panel implements MouseMotionListener, MouseListener @@ -76,7 +77,7 @@ public class ScalePanel extends Panel implements MouseMotionListener, PopupMenu pop = new PopupMenu(); if (reveal != null) { - MenuItem item = new MenuItem("Reveal"); + MenuItem item = new MenuItem(MessageManager.getString("label.reveal")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -94,7 +95,7 @@ public class ScalePanel extends Panel implements MouseMotionListener, if (av.getColumnSelection().getHiddenColumns().size() > 1) { - item = new MenuItem("Reveal All"); + item = new MenuItem(MessageManager.getString("action.reveal_all")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -115,7 +116,7 @@ public class ScalePanel extends Panel implements MouseMotionListener, } else if (av.getColumnSelection().contains(res)) { - MenuItem item = new MenuItem("Hide Columns"); + MenuItem item = new MenuItem(MessageManager.getString("label.hide_columns")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -447,7 +448,7 @@ public class ScalePanel extends Panel implements MouseMotionListener, if (reveal != null && reveal[0] > startx && reveal[0] < endx) { - gg.drawString("Reveal Columns", reveal[0] * av.charWidth, 0); + gg.drawString(MessageManager.getString("label.reveal_columns"), reveal[0] * av.charWidth, 0); } } diff --git a/src/jalview/appletgui/UserDefinedColours.java b/src/jalview/appletgui/UserDefinedColours.java index a81e831..55f7c65 100644 --- a/src/jalview/appletgui/UserDefinedColours.java +++ b/src/jalview/appletgui/UserDefinedColours.java @@ -275,7 +275,7 @@ public class UserDefinedColours extends Panel implements ActionListener, } frame = new Frame(); frame.add(this); - jalview.bin.JalviewLite.addFrame(frame, "User defined colours", 420, + jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.user_defined_colours"), 420, 345); if (seqGroup != null) diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index b1f16ac..c3e56c6 100644 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -1611,15 +1611,15 @@ public class JalviewLite extends Applet implements g.setColor(Color.cyan); g.fillRect(0, 0, getSize().width, getSize().height); g.setColor(Color.red); - g.drawString("Jalview can't open file", 5, 15); + g.drawString(MessageManager.getString("label.jalview_cannot_open_file"), 5, 15); g.drawString("\"" + file + "\"", 5, 30); } else if (embedded) { g.setColor(Color.black); g.setFont(new Font("Arial", Font.BOLD, 24)); - g.drawString("Jalview Applet", 50, getSize().height / 2 - 30); - g.drawString("Loading Data...", 50, getSize().height / 2); + g.drawString(MessageManager.getString("label.jalview_applet"), 50, getSize().height / 2 - 30); + g.drawString(MessageManager.getString("label.loading_data") + "...", 50, getSize().height / 2); } } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 0a4f4b8..d188d61 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -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, - "Do you want to ignore the " - + filesnotmatched.size() - + " files whose names did not match any sequence IDs ?", - "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) diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 8566e57..c7fd4fe 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -29,6 +29,7 @@ import javax.swing.*; import jalview.datamodel.*; import jalview.io.*; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -1009,8 +1010,8 @@ public class AnnotationLabels extends JPanel implements MouseListener, if (!av.wrapAlignment && ((aa == null) || (aa.length < 1))) { - g.drawString("Right click", 2, 8); - g.drawString("to add annotation", 2, 18); + g.drawString(MessageManager.getString("label.right_click"), 2, 8); + g.drawString(MessageManager.getString("label.to_add_annotation"), 2, 18); } } } diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index ed899b1..20abcc7 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -266,7 +266,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, else if (evt.getActionCommand().equals(LABEL)) { String exMesg = collectAnnotVals(anot, av.getColumnSelection(), LABEL); - String label = JOptionPane.showInputDialog(this, "Enter label", + String label = JOptionPane.showInputDialog(this, MessageManager.getString("label.enter_label"), exMesg); if (label == null) @@ -348,7 +348,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, } String label = JOptionPane.showInputDialog( - "Enter a label for the structure?", symbol); + MessageManager.getString("label.enter_label_for_the_structure"), symbol); if (label == null) { @@ -922,7 +922,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, g.setColor(Color.black); if (av.validCharWidth) { - g.drawString("Alignment has no annotations", 20, 15); + g.drawString(MessageManager.getString("label.alignment_has_no_annotations"), 20, 15); } return; diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index b1f7e4c..3b4b738 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -33,6 +33,7 @@ import jalview.gui.ViewSelectionMenu.ViewSetProvider; import jalview.datamodel.PDBEntry; import jalview.io.*; import jalview.schemes.*; +import jalview.util.MessageManager; import jalview.util.Platform; public class AppJmol extends GStructureViewer implements Runnable, @@ -251,9 +252,8 @@ public class AppJmol extends GStructureViewer implements Runnable, if (alreadyMapped != null) { int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop, - pdbentry.getId() + " is already displayed." - + "\nDo you want to re-use this viewer ?", - "Map Sequences to Visible Window: " + pdbentry.getId(), + MessageManager.formatMessage("label.pdb_entry_is_already_displayed", new String[]{pdbentry.getId()}), + MessageManager.formatMessage("label.map_sequences_to_visible_window", new String[]{pdbentry.getId()}), JOptionPane.YES_NO_OPTION); if (option == JOptionPane.YES_OPTION) @@ -310,9 +310,8 @@ public class AppJmol extends GStructureViewer implements Runnable, AppJmol topJmol = (AppJmol) jm.nextElement(); // TODO: highlight topJmol in view somehow int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop, - "Do you want to add " + pdbentry.getId() - + " to the view called\n'" + topJmol.getTitle() - + "'\n", "Align to existing structure view", + MessageManager.formatMessage("label.add_pdbentry_to_view", new String[]{pdbentry.getId(),topJmol.getTitle()}), + MessageManager.getString("label.align_to_existing_structure_view"), JOptionPane.YES_NO_OPTION); if (option == JOptionPane.YES_OPTION) { @@ -781,10 +780,8 @@ public class AppJmol extends GStructureViewer implements Runnable, { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "The following pdb entries could not be retrieved from the PDB:\n" - + errormsgs.toString() - + "\nPlease try downloading them manually.", - "Couldn't load file", JOptionPane.ERROR_MESSAGE); + MessageManager.formatMessage("label.pdb_entries_couldnt_be_retrieved", new String[]{errormsgs.toString()}), + MessageManager.getString("label.couldnt_load_file"), JOptionPane.ERROR_MESSAGE); } long lastnotify = jmb.getLoadNotifiesHandled(); @@ -1145,7 +1142,7 @@ public class AppJmol extends GStructureViewer implements Runnable, g.fillRect(0, 0, currentSize.width, currentSize.height); g.setColor(Color.white); g.setFont(new Font("Verdana", Font.BOLD, 14)); - g.drawString("Error loading file...", 20, currentSize.height / 2); + g.drawString(MessageManager.getString("label.error_loading_file") + "...", 20, currentSize.height / 2); StringBuffer sb = new StringBuffer(); int lines = 0; for (int e = 0; e < jmb.pdbentry.length; e++) @@ -1170,7 +1167,7 @@ public class AppJmol extends GStructureViewer implements Runnable, g.fillRect(0, 0, currentSize.width, currentSize.height); g.setColor(Color.white); g.setFont(new Font("Verdana", Font.BOLD, 14)); - g.drawString("Retrieving PDB data....", 20, currentSize.height / 2); + g.drawString(MessageManager.getString("label.retrieving_pdb_data"), 20, currentSize.height / 2); } else { diff --git a/src/jalview/gui/AssociatePdbFileWithSeq.java b/src/jalview/gui/AssociatePdbFileWithSeq.java index 6896863..bf0957e 100644 --- a/src/jalview/gui/AssociatePdbFileWithSeq.java +++ b/src/jalview/gui/AssociatePdbFileWithSeq.java @@ -21,6 +21,7 @@ import javax.swing.JOptionPane; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; +import jalview.util.MessageManager; /** * GUI related routines for associating PDB files with sequences @@ -54,9 +55,8 @@ public class AssociatePdbFileWithSeq reply = JOptionPane .showInternalInputDialog( Desktop.desktop, - "Couldn't find a PDB id in the file supplied." - + "Please enter an Id to identify this structure.", - "No PDB Id in File", JOptionPane.QUESTION_MESSAGE); + MessageManager.getString("label.couldnt_find_pdb_id_in_file"), + MessageManager.getString("label.no_pdb_id_in_file"), JOptionPane.QUESTION_MESSAGE); } if (reply == null) { diff --git a/src/jalview/gui/CutAndPasteTransfer.java b/src/jalview/gui/CutAndPasteTransfer.java index b5d45f7..2a555d0 100644 --- a/src/jalview/gui/CutAndPasteTransfer.java +++ b/src/jalview/gui/CutAndPasteTransfer.java @@ -177,8 +177,8 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer } catch (java.io.IOException ex) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Couldn't read the pasted text.\n" + ex.toString(), - "Error parsing text", JOptionPane.WARNING_MESSAGE); + MessageManager.formatMessage("label.couldnt_read_pasted_text", new String[]{ex.toString()}), + MessageManager.getString("label.error_parsing_text"), JOptionPane.WARNING_MESSAGE); } } diff --git a/src/jalview/gui/DasSourceBrowser.java b/src/jalview/gui/DasSourceBrowser.java index 5f071d0..293f9db 100644 --- a/src/jalview/gui/DasSourceBrowser.java +++ b/src/jalview/gui/DasSourceBrowser.java @@ -444,7 +444,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements panel.add(pane12, BorderLayout.SOUTH); int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop, - panel, "Enter Nickname & URL of Local DAS Source", + panel, MessageManager.getString("label.enter_local_das_source"), JOptionPane.OK_CANCEL_OPTION); if (reply != JOptionPane.OK_OPTION) @@ -517,8 +517,8 @@ public class DasSourceBrowser extends GDasSourceBrowser implements if (!sourceRegistry.getSource(nickname).isLocal()) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "You can only edit or remove local DAS Sources!", - "Public DAS source - not editable", + MessageManager.getString("label.you_can_only_edit_or_remove_local_das_sources"), + MessageManager.getString("label.public_das_source"), JOptionPane.WARNING_MESSAGE); return; } diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 6dede64..f77e64d 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -969,7 +969,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements } int reply = JOptionPane.showInternalConfirmDialog(desktop, panel, - "Input Alignment From URL", JOptionPane.OK_CANCEL_OPTION); + MessageManager.getString("label.input_alignment_from_url"), JOptionPane.OK_CANCEL_OPTION); if (reply != JOptionPane.OK_OPTION) { @@ -1722,8 +1722,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements if (!vamsasImport(chooser.getSelectedFile())) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Couldn't import '" + fle + "' as a new vamsas session.", - "Vamsas Document Import Failed", + MessageManager.formatMessage("label.couldnt_import_as_vamsas_session", new String[]{fle}), + MessageManager.getString("label.vamsas_document_import_failed"), JOptionPane.ERROR_MESSAGE); } } @@ -2137,9 +2137,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements if (fm != null) { g.drawString( - "Total Free Memory: " + df.format(totalFreeMemory) - + "MB; Max Memory: " + df.format(maxMemory) - + "MB; " + df.format(percentUsage) + "%", 10, + MessageManager.formatMessage("label.memory_stats", new String[]{df.format(totalFreeMemory),df.format(maxMemory),df.format(percentUsage)}), 10, getHeight() - fm.getHeight()); } } diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 04a70ef..106ced9 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -1312,9 +1312,8 @@ public class FeatureSettings extends JPanel { complete(); JOptionPane.showInternalConfirmDialog(Desktop.desktop, - "No das sources were selected.\n" - + "Please select some sources and\n" + " try again.", - "No Sources Selected", JOptionPane.DEFAULT_OPTION, + MessageManager.getString("label.no_das_sources_selected_warn"), + MessageManager.getString("label.no_das_sources_selected_title"), JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE); } @@ -1594,7 +1593,7 @@ class FeatureIcon implements Icon // width/g.getFontMetrics().stringWidth("Label"), // height/g.getFontMetrics().getHeight()))); - g.drawString("Label", 0, 0); + g.drawString(MessageManager.getString("label.label"), 0, 0); } else diff --git a/src/jalview/gui/Finder.java b/src/jalview/gui/Finder.java index 069c1f9..ce71f18 100755 --- a/src/jalview/gui/Finder.java +++ b/src/jalview/gui/Finder.java @@ -235,7 +235,7 @@ public class Finder extends GFinder // 'SelectRegion' selection if (!haveResults) { - JOptionPane.showInternalMessageDialog(this, "Finished searching", + JOptionPane.showInternalMessageDialog(this, MessageManager.getString("label.finished_searching"), null, JOptionPane.INFORMATION_MESSAGE); resIndex = -1; seqIndex = 0; diff --git a/src/jalview/gui/Jalview2XML_V1.java b/src/jalview/gui/Jalview2XML_V1.java index 639b9b2..3b6678d 100755 --- a/src/jalview/gui/Jalview2XML_V1.java +++ b/src/jalview/gui/Jalview2XML_V1.java @@ -26,6 +26,7 @@ import javax.swing.*; import org.exolab.castor.xml.*; import jalview.binding.*; import jalview.schemes.*; +import jalview.util.MessageManager; import jalview.util.jarInputStreamProvider; /** @@ -135,7 +136,8 @@ public class Jalview2XML_V1 System.err.println("Couldn't locate Jalview XML file : " + ex + "\n"); JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Couldn't locate " + file, "URL not found", + MessageManager.formatMessage("label.couldnt_locate", new String[]{file}), + MessageManager.getString("label.url_not_found"), JOptionPane.WARNING_MESSAGE); } }); diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index a0fa216..f8932d1 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -28,6 +28,7 @@ import jalview.bin.*; import jalview.io.*; import jalview.jbgui.*; import jalview.schemes.*; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -553,7 +554,7 @@ public class Preferences extends GPreferences while (!valid) { if (JOptionPane.showInternalConfirmDialog(Desktop.desktop, link, - "New sequence URL link", JOptionPane.OK_CANCEL_OPTION, -1, + MessageManager.getString("label.new_sequence_url_link"), JOptionPane.OK_CANCEL_OPTION, -1, null) == JOptionPane.OK_OPTION) { if (link.checkValid()) @@ -579,7 +580,7 @@ public class Preferences extends GPreferences if (index == -1) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "No link selected!", "No link selected", + MessageManager.getString("label.no_link_selected"), MessageManager.getString("label.no_link_selected"), JOptionPane.WARNING_MESSAGE); return; } @@ -592,7 +593,7 @@ public class Preferences extends GPreferences { if (JOptionPane.showInternalConfirmDialog(Desktop.desktop, link, - "New sequence URL link", JOptionPane.OK_CANCEL_OPTION, -1, + MessageManager.getString("label.new_sequence_url_link"), JOptionPane.OK_CANCEL_OPTION, -1, null) == JOptionPane.OK_OPTION) { if (link.checkValid()) @@ -617,7 +618,7 @@ public class Preferences extends GPreferences if (index == -1) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "No link selected!", "No link selected", + MessageManager.getString("label.no_link_selected"), MessageManager.getString("label.no_link_selected"), JOptionPane.WARNING_MESSAGE); return; } diff --git a/src/jalview/gui/RotatableCanvas.java b/src/jalview/gui/RotatableCanvas.java index 9f9f39c..1146f93 100755 --- a/src/jalview/gui/RotatableCanvas.java +++ b/src/jalview/gui/RotatableCanvas.java @@ -369,7 +369,7 @@ public class RotatableCanvas extends JPanel implements MouseListener, if (points == null) { g.setFont(new Font("Verdana", Font.PLAIN, 18)); - g.drawString("Calculating PCA....", 20, getHeight() / 2); + g.drawString(MessageManager.getString("label.calculating_pca")+ "....", 20, getHeight() / 2); } else { diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index 89d315c..da34561 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -503,7 +503,7 @@ public class ScalePanel extends JPanel implements MouseMotionListener, if (reveal != null && reveal[0] > startx && reveal[0] < endx) { - gg.drawString("Reveal Columns", reveal[0] * av.charWidth, 0); + gg.drawString(MessageManager.getString("label.reveal_columns"), reveal[0] * av.charWidth, 0); } } diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 86c52b3..fbf6a91 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -31,6 +31,7 @@ import jalview.datamodel.*; import jalview.io.SequenceAnnotationReport; import jalview.schemes.*; import jalview.structure.*; +import jalview.util.MessageManager; /** * DOCUMENT ME! @@ -1431,8 +1432,8 @@ public class SeqPanel extends JPanel implements MouseListener, if (av.wrapAlignment && seq > av.getAlignment().getHeight()) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Cannot edit annotations in wrapped view.", - "Wrapped view - no edit", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.cannot_edit_annotations_in_wrapped_view"), + MessageManager.getString("label.wrapped_view_no_edit"), JOptionPane.WARNING_MESSAGE); return; } diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index faebb1a..c069adb 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -31,6 +31,7 @@ import com.stevesoft.pat.Regex; import jalview.datamodel.*; import jalview.io.*; import jalview.util.DBRefUtils; +import jalview.util.MessageManager; import jalview.ws.dbsources.das.api.DasSourceRegistryI; import jalview.ws.seqfetcher.DbSourceProxy; import java.awt.BorderLayout; @@ -843,7 +844,7 @@ public class SequenceFetcher extends JPanel implements Runnable public void run() { JOptionPane.showInternalMessageDialog(Desktop.desktop, error, - "Error Retrieving Data", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.error_retrieving_data"), JOptionPane.WARNING_MESSAGE); } }); } diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index d1003e5..ce44054 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -608,7 +608,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, if (tree == null) { - g.drawString("Calculating tree....", 20, getHeight() / 2); + g.drawString(MessageManager.getString("label.calculating_tree") + "....", 20, getHeight() / 2); } else { diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 60c45c5..a104ad9 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -23,6 +23,7 @@ import jalview.jbgui.GUserDefinedColours; import jalview.schemes.ColourSchemeI; import jalview.schemes.ResidueProperties; import jalview.schemes.UserColourScheme; +import jalview.util.MessageManager; import java.awt.Color; import java.awt.Font; @@ -710,8 +711,8 @@ public class UserDefinedColours extends GUserDefinedColours implements if (schemeName.getText().trim().length() < 1) { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "User colour scheme must have a name!", - "No name for colour scheme", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.user_colour_scheme_must_have_name"), + MessageManager.getString("label.no_name_colour_scheme"), JOptionPane.WARNING_MESSAGE); return; } @@ -720,10 +721,8 @@ public class UserDefinedColours extends GUserDefinedColours implements { int reply = JOptionPane.showInternalConfirmDialog( Desktop.desktop, - "Colour scheme " + schemeName.getText() + " exists." - + "\nContinue saving colour scheme as " - + schemeName.getText() + "?", - "Duplicate scheme name", JOptionPane.YES_NO_OPTION); + MessageManager.formatMessage("label.colour_scheme_exists_overwrite", new String[]{schemeName.getText(),schemeName.getText()}), + MessageManager.getString("label.duplicate_scheme_name"), JOptionPane.YES_NO_OPTION); if (reply != JOptionPane.YES_OPTION) { return; diff --git a/src/jalview/gui/UserQuestionnaireCheck.java b/src/jalview/gui/UserQuestionnaireCheck.java index a232987..92dd354 100644 --- a/src/jalview/gui/UserQuestionnaireCheck.java +++ b/src/jalview/gui/UserQuestionnaireCheck.java @@ -17,6 +17,8 @@ */ package jalview.gui; +import jalview.util.MessageManager; + import java.io.*; import java.net.*; @@ -137,9 +139,8 @@ public class UserQuestionnaireCheck implements Runnable jalview.bin.Cache.log.info("Prompting user for questionnaire at " + qurl); int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop, - "There is a new Questionnaire available." - + "Would you like to complete it now ?\n", - "Jalview User Survey", JOptionPane.YES_NO_OPTION, + MessageManager.getString("label.jalview_new_questionnaire"), + MessageManager.getString("label.jalview_user_survey"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (reply == JOptionPane.YES_OPTION) diff --git a/src/jalview/gui/WebserviceInfo.java b/src/jalview/gui/WebserviceInfo.java index d733345..ea2bacb 100644 --- a/src/jalview/gui/WebserviceInfo.java +++ b/src/jalview/gui/WebserviceInfo.java @@ -767,32 +767,32 @@ public class WebserviceInfo extends GWebserviceInfo implements switch (currentStatus) { case STATE_QUEUING: - g.drawString(title.concat(" - queuing"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_queueing")), 60, 30); break; case STATE_RUNNING: - g.drawString(title.concat(" - running"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_running")), 60, 30); break; case STATE_STOPPED_OK: - g.drawString(title.concat(" - complete"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_completed")), 60, 30); break; case STATE_CANCELLED_OK: - g.drawString(title.concat(" - job cancelled!"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_job_cancelled")), 60, 30); break; case STATE_STOPPED_ERROR: - g.drawString(title.concat(" - job error!"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_job_error")), 60, 30); break; case STATE_STOPPED_SERVERERROR: - g.drawString(title.concat(" - Server Error! (try later)"), 60, 30); + g.drawString(title.concat(" - ").concat(MessageManager.getString("label.server_error_try_later")), 60, 30); break; } diff --git a/src/jalview/gui/WsPreferences.java b/src/jalview/gui/WsPreferences.java index 9a65e5a..744cd8f 100644 --- a/src/jalview/gui/WsPreferences.java +++ b/src/jalview/gui/WsPreferences.java @@ -472,7 +472,7 @@ public class WsPreferences extends GWsPreferences { valid = false; JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Invalid URL !"); + MessageManager.getString("label.invalid_url")); } } if (valid && resp == JOptionPane.OK_OPTION) diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 6f07b69..a8c60fd 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -23,6 +23,7 @@ import javax.swing.*; import jalview.datamodel.*; import jalview.gui.*; +import jalview.util.MessageManager; public class FileLoader implements Runnable { @@ -356,7 +357,7 @@ public class FileLoader implements Runnable public void run() { JOptionPane.showInternalMessageDialog(Desktop.desktop, - errorMessage, "Error loading file", + errorMessage, MessageManager.getString("label.error_loading_file"), JOptionPane.WARNING_MESSAGE); } }); @@ -381,8 +382,8 @@ public class FileLoader implements Runnable public void run() { javax.swing.JOptionPane.showInternalMessageDialog( - Desktop.desktop, "Encountered problems opening " + file - + "!!", "File open error", + Desktop.desktop, MessageManager.formatMessage("label.problems_opening_file", new String[]{file}), + MessageManager.getString("label.file_open_error"), javax.swing.JOptionPane.WARNING_MESSAGE); } }); diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index b523763..de1487a 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -18,6 +18,7 @@ package jalview.jbgui; import jalview.schemes.ColourSchemeProperty; +import jalview.util.MessageManager; import java.awt.BorderLayout; import java.awt.Color; @@ -404,8 +405,8 @@ public class GAlignFrame extends JInternalFrame 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) {