From e866a4ad3a61579e07306b9e8ab1331c5d69899b Mon Sep 17 00:00:00 2001
From: tpylak <tpylak>
Date: Tue, 7 Jun 2011 15:56:52 +0000
Subject: [PATCH] LMS-2268 change labels: assay -> experiment

SVN: 21625
---
 .../client/web/client/application/Dict.java    | 10 ++++++++++
 .../ExperimentAnalysisSummaryViewer.java       |  3 ++-
 ...ialFeaturesFromAllExperimentsComponent.java |  8 +++++---
 .../MaterialReplicaSummaryComponent.java       | 15 +++++++++------
 .../client/web/public/screening-dictionary.js  | 18 ++++++++++++------
 5 files changed, 38 insertions(+), 16 deletions(-)

diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java
index 8e214683d69..0e5d5541b0e 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java
@@ -106,6 +106,16 @@ public final class Dict extends ch.systemsx.cisd.openbis.generic.client.web.clie
     public static final String MATERIAL_DISAMBIGUATION_GRID_EXPLANATION =
             "MATERIAL_DISAMBIGUATION_GRID_EXPLANATION";
 
+    public static final String ASSAY_HEADER = "ASSAY_HEADER";
+
+    public static final String FIND_IN_ALL_ASSAYS = "FIND_IN_ALL_ASSAYS";
+
+    public static final String MATERIAL_IN_ASSAY = "MATERIAL_IN_ASSAY";
+
+    public static final String SHOW_ASSAY = "SHOW_ASSAY";
+
+    public static final String MATERIAL_IN_ALL_ASSAYS = "MATERIAL_IN_ALL_ASSAYS";
+
     private Dict()
     {
         // Can not be instantiated.
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ExperimentAnalysisSummaryViewer.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ExperimentAnalysisSummaryViewer.java
index 079d2cbe37d..5843e2e7454 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ExperimentAnalysisSummaryViewer.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ExperimentAnalysisSummaryViewer.java
@@ -30,6 +30,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.IScreeningClientServiceAsync;
+import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.Dict;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.ScreeningModule;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.utils.MaterialComponentUtils;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.ui.columns.specific.ScreeningLinkExtractor;
@@ -129,7 +130,7 @@ public class ExperimentAnalysisSummaryViewer
             IEntityInformationHolderWithProperties experiment,
             boolean restrictGlobalScopeLinkToProject)
     {
-        String headingText = "Assay " + experiment.getCode();
+        String headingText = viewContext.getMessage(Dict.ASSAY_HEADER, experiment.getCode());
         final IDisposableComponent gridComponent =
                 ExperimentAnalysisSummaryGrid.create(viewContext, experiment,
                         restrictGlobalScopeLinkToProject);
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/MaterialFeaturesFromAllExperimentsComponent.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/MaterialFeaturesFromAllExperimentsComponent.java
index 9826fc4b1cd..975a27c370c 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/MaterialFeaturesFromAllExperimentsComponent.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/MaterialFeaturesFromAllExperimentsComponent.java
@@ -20,6 +20,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewConte
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.IDisposableComponent;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Material;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.IScreeningClientServiceAsync;
+import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.Dict;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.utils.MaterialComponentUtils;
 import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria.ExperimentSearchByProjectCriteria;
 
@@ -36,8 +37,8 @@ public class MaterialFeaturesFromAllExperimentsComponent
             IViewContext<IScreeningClientServiceAsync> screeningViewContext, Material material,
             ExperimentSearchByProjectCriteria experimentSearchCriteria)
     {
-        return new MaterialFeaturesFromAllExperimentsComponent(screeningViewContext).createComponent(
-                material, experimentSearchCriteria);
+        return new MaterialFeaturesFromAllExperimentsComponent(screeningViewContext)
+                .createComponent(material, experimentSearchCriteria);
     }
 
     private final IViewContext<IScreeningClientServiceAsync> screeningViewContext;
@@ -55,7 +56,8 @@ public class MaterialFeaturesFromAllExperimentsComponent
                 MaterialFeaturesFromAllExperimentsGrid.create(screeningViewContext, material,
                         experimentSearchCriteria);
         String headingText =
-                MaterialComponentUtils.getMaterialFullName(material, true) + " in all assays";
+                screeningViewContext.getMessage(Dict.MATERIAL_IN_ALL_ASSAYS,
+                        MaterialComponentUtils.getMaterialFullName(material, true));
         return MaterialComponentUtils.createMaterialViewer(screeningViewContext, material,
                 headingText, gridComponent);
     }
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/MaterialReplicaSummaryComponent.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/MaterialReplicaSummaryComponent.java
index 3472dcfb3a5..5b55d9065bb 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/MaterialReplicaSummaryComponent.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/MaterialReplicaSummaryComponent.java
@@ -52,6 +52,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Material;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Project;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.IScreeningClientServiceAsync;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.ClientPluginFactory;
+import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.Dict;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.ScreeningDisplayTypeIDGenerator;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.ChannelWidgetWithListener.ISimpleChanneledViewerFactory;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.utils.MaterialComponentUtils;
@@ -376,7 +377,7 @@ public class MaterialReplicaSummaryComponent
         LayoutContainer headerPanel = new LayoutContainer();
         headerPanel.setLayout(new TableLayout(2));
 
-        Widget headingWidget = createHeaderTitle(experiment, material);
+        Widget headingWidget = createHeaderTitle(experiment, material, screeningViewContext);
         headerPanel.add(headingWidget);
 
         LayoutContainer rightLinksPanel = new LayoutContainer();
@@ -404,8 +405,8 @@ public class MaterialReplicaSummaryComponent
         String linkUrl =
                 ScreeningLinkExtractor.createMaterialDetailsLink(material, experimentCriteria);
         String linkText =
-                "Find " + MaterialComponentUtils.getMaterialFullName(material, false)
-                        + " in all assays";
+                screeningViewContext.getMessage(Dict.FIND_IN_ALL_ASSAYS,
+                        MaterialComponentUtils.getMaterialFullName(material, false));
         Widget linkWidget = LinkRenderer.getLinkWidget(linkText, new ClickHandler()
             {
                 public void onClick(ClickEvent event)
@@ -432,10 +433,12 @@ public class MaterialReplicaSummaryComponent
     }
 
     private static Html createHeaderTitle(final IEntityInformationHolderWithPermId experiment,
-            final Material material)
+            final Material material, IViewContext<IScreeningClientServiceAsync> screeningViewContext)
     {
         String materialDesc = MaterialComponentUtils.getMaterialFullName(material, true);
-        String headingText = materialDesc + " in assay " + experiment.getCode();
+        String headingText =
+                screeningViewContext.getMessage(Dict.MATERIAL_IN_ASSAY, materialDesc,
+                        experiment.getCode());
         return PropertiesUtil.createHeaderTitle(headingText);
     }
 
@@ -445,7 +448,7 @@ public class MaterialReplicaSummaryComponent
         String linkUrl =
                 ClientPluginFactory.createImagingExperimentViewerLink(experiment,
                         restrictGlobalScopeLinkToProject, screeningViewContext);
-        String linkText = "Show assay " + experiment.getCode();
+        String linkText = screeningViewContext.getMessage(Dict.SHOW_ASSAY, experiment.getCode());
         Widget linkWidget = LinkRenderer.getLinkWidget(linkText, new ClickHandler()
             {
                 public void onClick(ClickEvent event)
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js
index c5fbb9ed7d5..c746af97361 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js
@@ -32,7 +32,7 @@ WELLS_SEARCH_tab_label: "Wells Search",
 // Experiment Viewer
 //
 experiment_samples_selction_title: "Plates",
-no_samples_found: "There are no plates in this assay",
+no_samples_found: "There are no plates in this experiment",
 
 //
 // Sample Viewer
@@ -95,21 +95,27 @@ material_replica_feature_summary_RANK: "Rank",
 material_replica_feature_summary_MEDIAN: "Median",
 material_replica_feature_summary_DEVIATION: "Deviation",
 
-material_features_from_all_experiments_ASSAY: "Whole Assay",
+material_features_from_all_experiments_ASSAY: "Experiment",
 material_features_from_all_experiments_MATERIAL: "Details",
-MATERIAL_FEATURES_FROM_ALL_EXPERIMENTS_SECTION: "All Assays",
+MATERIAL_FEATURES_FROM_ALL_EXPERIMENTS_SECTION: "All Experiments",
 
 EXACT_MATCH_ONLY: "Exact Matches Only",
 WELLS_SEARCH_SHOW_COMBINED_RESULTS: "Show all matching results combined",
-WELL_SEARCH_NO_RESULTS_IN_ANY_EXP_FOUND: "All assays have been searched and no results match the query. Please check the spelling.",
-WELL_SEARCH_NO_RESULTS_IN_SELECTED_EXP_FOUND: "No results match the query in the selected assay.",
-WELL_SEARCH_PERFORM_IN_ALL_EXP: "Search in all assays",
+WELL_SEARCH_NO_RESULTS_IN_ANY_EXP_FOUND: "All experiments have been searched and no results match the query. Please check the spelling.",
+WELL_SEARCH_NO_RESULTS_IN_SELECTED_EXP_FOUND: "No results match the query in the selected experiment.",
+WELL_SEARCH_PERFORM_IN_ALL_EXP: "Search in all experiments",
 
 MATERIAL_DISAMBIGUATION_TITLE: "Material Disambiguation",
 MATERIAL_DISAMBIGUATION_GRID_EXPLANATION: "More than one result has been found. Click on it to see the details.",
 
 image_viewer_button: "Adjust Colors",
 
+ASSAY_HEADER: "Experiment {0}",
+FIND_IN_ALL_ASSAYS: "Find {0} in all experiments",
+MATERIAL_IN_ASSAY: "{0} in experiment {1}",
+SHOW_ASSAY: "Show experiment {0}",
+MATERIAL_IN_ALL_ASSAYS: "{0} in all experiments",
+
 // LAST LINE: KEEP IT AT THE END
 lastline: "" // we need a line without a comma
 };
\ No newline at end of file
-- 
GitLab