From f1698a3cc3dbeb218b63b157ff46bd092882537d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 19 Feb 2020 18:46:25 +0000 Subject: [PATCH] JAL-3187 i18n for titles in windows/tabs --- resources/lang/Messages.properties | 1 + src/jalview/gui/SplitFrame.java | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 042ce28..3d2ffb1 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -768,6 +768,7 @@ label.varna_params = VARNA - {0} label.sequence_feature_settings = Sequence Feature Settings label.sequence_feature_settings_for = Sequence Feature Settings for {0} label.sequence_feature_settings_for_view = Sequence Feature Settings for view "{0}" +label.sequence_feature_settings_for_CDS_and_Protein = Sequence Feature Settings for CDS and Protein label.pairwise_aligned_sequences = Pairwise Aligned Sequences label.original_data_for_params = Original Data for {0} label.points_for_params = Points for {0} diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index 77d8a96..948b73b 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -865,8 +865,8 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI { showInternalFrame = true; featureSettingsPanels = new JTabbedPane(); - featureSettingsUI = new JInternalFrame( - "Feature Settings for CDS and Protein Views"); + featureSettingsUI = new JInternalFrame(MessageManager.getString( + "label.sequence_feature_settings_for_CDS_and_Protein")); featureSettingsPanels.setOpaque(true); featureSettingsUI.setContentPane(featureSettingsPanels); createDummyTabs(); @@ -885,15 +885,19 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI if (pos == 0) { featureSettingsPanels.removeTabAt(0); - featureSettingsPanels.insertTab("CDS", null, - (Component) featureSettings, "Feature Settings for DNA CDS", + featureSettingsPanels.insertTab(tabName[0], null, + (Component) featureSettings, + MessageManager.formatMessage( + "label.sequence_feature_settings_for", tabName[0]), 0); } if (pos == 1) { featureSettingsPanels.removeTabAt(1); - featureSettingsPanels.insertTab("Protein", null, - (Component) featureSettings, "Feature Settings for Protein", + featureSettingsPanels.insertTab(tabName[1], null, + (Component) featureSettings, + MessageManager.formatMessage( + "label.sequence_feature_settings_for", tabName[1]), 1); } featureSettingsPanels.setSelectedComponent((Component) featureSettings); @@ -907,14 +911,14 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI { Desktop.addInternalFrame(featureSettingsUI, MessageManager.getString( - "Feature Settings for CDS and Protein Views"), + "label.sequence_feature_settings_for_CDS_and_Protein"), 600, 480); } else { Desktop.addInternalFrame(featureSettingsUI, MessageManager.getString( - "Feature Settings for CDS and Protein Views"), + "label.sequence_feature_settings_for_CDS_and_Protein"), 600, 450); } featureSettingsUI @@ -975,7 +979,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI */ private String[] tabName = new String[] { MessageManager.getString("label.CDS"), - MessageManager.getString("label.Protein") }; + MessageManager.getString("label.protein") }; /** * create placeholder tabs which materialise the feature settings for a given -- 1.7.10.2