From 3d93d9609114eb1da8b6e868dc32f12d2380b100 Mon Sep 17 00:00:00 2001 From: Advitya Gemawat Date: Fri, 17 Nov 2023 13:41:23 -0500 Subject: [PATCH] added localizations --- libs/core-ui/src/lib/Cohort/CohortList/CohortList.tsx | 2 +- .../src/lib/Cohort/CohortList/CohortListPanel.tsx | 2 +- .../lib/Cohort/ManualCohortManagement/CohortBar.tsx | 2 +- .../core-ui/src/lib/Cohort/ShiftCohort/ShiftCohort.tsx | 2 +- libs/counterfactuals/src/lib/CounterfactualList.tsx | 2 +- .../DataBalanceView/AggregateBalanceMeasuresTable.tsx | 4 ++-- .../VisionExplanationDashboard/Controls/TableList.tsx | 2 +- .../VisionExplanationDashboardCommon.tsx | 2 +- libs/localization/src/lib/en.json | 10 +++++++++- .../lib/ModelAssessmentDashboard/Cohort/CohortList.tsx | 2 +- .../ModelOverview/FeatureConfigurationFlyout.tsx | 4 ++-- .../ModelOverview/MetricConfigurationFlyout.tsx | 4 ++-- .../ModelOverview/ObjectDetectionModelOverview.tsx | 2 +- 13 files changed, 24 insertions(+), 16 deletions(-) diff --git a/libs/core-ui/src/lib/Cohort/CohortList/CohortList.tsx b/libs/core-ui/src/lib/Cohort/CohortList/CohortList.tsx index 4abba0a8a4..4c0027e9c9 100644 --- a/libs/core-ui/src/lib/Cohort/CohortList/CohortList.tsx +++ b/libs/core-ui/src/lib/Cohort/CohortList/CohortList.tsx @@ -120,7 +120,7 @@ export class CohortList extends React.Component< selectionPreservedOnEmptyClick checkboxVisibility={CheckboxVisibility.hidden} onRenderItemColumn={this.renderItemColumn} - ariaLabel="Cohort List" + ariaLabel={localization.Core.ShiftCohort.cohortList} /> diff --git a/libs/core-ui/src/lib/Cohort/CohortList/CohortListPanel.tsx b/libs/core-ui/src/lib/Cohort/CohortList/CohortListPanel.tsx index b859610400..e5faa62fb8 100644 --- a/libs/core-ui/src/lib/Cohort/CohortList/CohortListPanel.tsx +++ b/libs/core-ui/src/lib/Cohort/CohortList/CohortListPanel.tsx @@ -26,7 +26,7 @@ export class CohortListPanel extends React.Component { const classNames = cohortListStyles(); return ( ))} diff --git a/libs/core-ui/src/lib/Cohort/ShiftCohort/ShiftCohort.tsx b/libs/core-ui/src/lib/Cohort/ShiftCohort/ShiftCohort.tsx index 2d2ac61766..702b17c41b 100644 --- a/libs/core-ui/src/lib/Cohort/ShiftCohort/ShiftCohort.tsx +++ b/libs/core-ui/src/lib/Cohort/ShiftCohort/ShiftCohort.tsx @@ -111,7 +111,7 @@ export class ShiftCohort extends React.Component< > ); } diff --git a/libs/dataset-explorer/src/lib/DataBalanceView/AggregateBalanceMeasuresTable.tsx b/libs/dataset-explorer/src/lib/DataBalanceView/AggregateBalanceMeasuresTable.tsx index 47fc3699b2..5183d2764d 100644 --- a/libs/dataset-explorer/src/lib/DataBalanceView/AggregateBalanceMeasuresTable.tsx +++ b/libs/dataset-explorer/src/lib/DataBalanceView/AggregateBalanceMeasuresTable.tsx @@ -110,8 +110,8 @@ export class AggregateBalanceMeasuresTable extends React.PureComponent diff --git a/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/TableList.tsx b/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/TableList.tsx index 1950494e9c..7411979f55 100644 --- a/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/TableList.tsx +++ b/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/TableList.tsx @@ -163,7 +163,7 @@ export class TableList extends React.Component< selection={this._selection} setKey="set" onItemInvoked={this.props.selectItem} - ariaLabel="Table view list" + ariaLabel={localization.InterpretVision.Dashboard.tableListAriaLabel} /> diff --git a/libs/interpret-vision/src/lib/VisionExplanationDashboard/VisionExplanationDashboardCommon.tsx b/libs/interpret-vision/src/lib/VisionExplanationDashboard/VisionExplanationDashboardCommon.tsx index 01dd5f1e0b..1c3fe3faf9 100644 --- a/libs/interpret-vision/src/lib/VisionExplanationDashboard/VisionExplanationDashboardCommon.tsx +++ b/libs/interpret-vision/src/lib/VisionExplanationDashboard/VisionExplanationDashboardCommon.tsx @@ -71,7 +71,7 @@ export class VisionExplanationDashboardCommon extends React.Component< min={20} id="dataExplorerThumbnailSize" className={this.props.classNames.slider} - ariaLabel="Slider for image thumbnail size" + ariaLabel={localization.InterpretVision.Dashboard.thumbnailSizeAriaLabel} label={localization.InterpretVision.Dashboard.thumbnailSize} defaultValue={50} showValue={false} diff --git a/libs/localization/src/lib/en.json b/libs/localization/src/lib/en.json index 31d16c2aa0..9eb9f66620 100644 --- a/libs/localization/src/lib/en.json +++ b/libs/localization/src/lib/en.json @@ -129,6 +129,7 @@ } }, "Counterfactuals": { + "AriaLabel": "Counterfactual list", "CurrentTreatment": "Current treatment", "EffectLowerBound": "CI lower", "EffectOfTreatment": "Effect of recommendation", @@ -1470,7 +1471,9 @@ "tabOptionFirst": "Image explorer view", "tabOptionSecond": "Table view", "tabOptionThird": "Class view", + "tableListAriaLabel": "Table view list", "thumbnailSize": "Thumbnail size", + "thumbnailSizeAriaLabel": "Slider for image thumbnail size", "titleBarError": "Error instances", "titleBarSuccess": "Success instances", "trueY": "Ground truth: " @@ -1839,7 +1842,8 @@ "name": "IoU Threshold", "description": "Intersection over Union quantifies the degree of overlap between the prediction and ground truth bounding box of a detected object in an image. For example, setting an IoU threshold of 70% means that a prediction with greater than 70% overlap with ground truth is True, thus influencing the definition of prediction correctness and calculation of other performance metrics.", "iconId": "iouThresholdIconId", - "title": "Learn about the IoU threshold" + "title": "Learn about the IoU threshold", + "AriaLabel": "Slider for IoU threshold" }, "notAvailable": "N/A", "countColumnHeader": "Sample size", @@ -1908,7 +1912,11 @@ "flyoutHeader": "Choose your features", "flyoutSubHeader": "Along which features would you like to evaluate your model's fairness?", "flyoutDescription": "Fairness is evaluated in terms of disparities in your model's behavior. We will split your data according to values of each selected feature, and evaluate how your model's performance metrics differ across these splits.", + "selectAllRowsAriaLabel": "Select all rows", + "flyoutAriaLabel": "Aggregate balance measures list", "featureColumnHeader": "Features", + "featureSelectionAriaLabel": "Feature selection table", + "metricSelectionAriaLabel": "Metric selection table", "groupsColumnHeader": "Groups", "categoricalGroupsCountRemark": "This feature has {0} unique values.", "continuousGroupsCountRemark": "This feature is continuous and split into {0} bins.", diff --git a/libs/model-assessment/src/lib/ModelAssessmentDashboard/Cohort/CohortList.tsx b/libs/model-assessment/src/lib/ModelAssessmentDashboard/Cohort/CohortList.tsx index 5b1527c734..fc1015ebea 100644 --- a/libs/model-assessment/src/lib/ModelAssessmentDashboard/Cohort/CohortList.tsx +++ b/libs/model-assessment/src/lib/ModelAssessmentDashboard/Cohort/CohortList.tsx @@ -84,7 +84,7 @@ export class CohortList extends React.Component< selectionMode={SelectionMode.none} checkboxVisibility={CheckboxVisibility.hidden} onRenderItemColumn={this.renderItemColumn} - ariaLabel="Cohort list" + ariaLabel={localization.Core.ShiftCohort.cohortList} /> {this.state.currentEditCohort && ( diff --git a/libs/model-assessment/src/lib/ModelAssessmentDashboard/Controls/ModelOverview/MetricConfigurationFlyout.tsx b/libs/model-assessment/src/lib/ModelAssessmentDashboard/Controls/ModelOverview/MetricConfigurationFlyout.tsx index a9bbda308e..fe4d331764 100644 --- a/libs/model-assessment/src/lib/ModelAssessmentDashboard/Controls/ModelOverview/MetricConfigurationFlyout.tsx +++ b/libs/model-assessment/src/lib/ModelAssessmentDashboard/Controls/ModelOverview/MetricConfigurationFlyout.tsx @@ -146,8 +146,8 @@ export class MetricConfigurationFlyout extends React.Component< selectionMode={SelectionMode.multiple} selection={this._selection} checkboxVisibility={CheckboxVisibility.always} - ariaLabelForSelectAllCheckbox="Select all rows" - ariaLabel="Metric selection table" + ariaLabelForSelectAllCheckbox={localization.ModelAssessment.ModelOverview.featureConfiguration.selectAllRowsAriaLabel} + ariaLabel={localization.ModelAssessment.ModelOverview.featureConfiguration.metricSelectionAriaLabel} /> diff --git a/libs/model-assessment/src/lib/ModelAssessmentDashboard/Controls/ModelOverview/ObjectDetectionModelOverview.tsx b/libs/model-assessment/src/lib/ModelAssessmentDashboard/Controls/ModelOverview/ObjectDetectionModelOverview.tsx index 23c618b163..0e017fd5ff 100644 --- a/libs/model-assessment/src/lib/ModelAssessmentDashboard/Controls/ModelOverview/ObjectDetectionModelOverview.tsx +++ b/libs/model-assessment/src/lib/ModelAssessmentDashboard/Controls/ModelOverview/ObjectDetectionModelOverview.tsx @@ -88,7 +88,7 @@ export class ObjectDetectionWidgets extends React.PureComponent