Skip to content

Commit

Permalink
added localizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Advitya17 committed Nov 17, 2023
1 parent 7abeb6a commit 3d93d96
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion libs/core-ui/src/lib/Cohort/CohortList/CohortList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion libs/core-ui/src/lib/Cohort/CohortList/CohortListPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class CohortListPanel extends React.Component<ICohortListPanelProps> {
const classNames = cohortListStyles();
return (
<Panel
headerText="Cohort List"
headerText={localization.Core.ShiftCohort.cohortList}

Check failure on line 29 in libs/core-ui/src/lib/Cohort/CohortList/CohortListPanel.tsx

View workflow job for this annotation

GitHub Actions / ci-typescript (12.x)

'localization' is not defined

Check failure on line 29 in libs/core-ui/src/lib/Cohort/CohortList/CohortListPanel.tsx

View workflow job for this annotation

GitHub Actions / ci-typescript (14.x)

'localization' is not defined

Check failure on line 29 in libs/core-ui/src/lib/Cohort/CohortList/CohortListPanel.tsx

View workflow job for this annotation

GitHub Actions / ci-typescript (16.x)

'localization' is not defined
isOpen={this.props.isOpen}
focusTrapZoneProps={focusTrapZoneProps}
// You MUST provide this prop! Otherwise screen readers will just say "button" with no label.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class CohortBar extends React.Component<
items={this.props.cohorts}
selectionMode={SelectionMode.none}
columns={columns}
ariaLabel="Cohort list"
ariaLabel={localization.Core.ShiftCohort.cohortList}
/>
</Panel>
))}
Expand Down
2 changes: 1 addition & 1 deletion libs/core-ui/src/lib/Cohort/ShiftCohort/ShiftCohort.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class ShiftCohort extends React.Component<
>
<Dropdown
placeholder="Select a cohort"
label="Cohort list"
label={localization.Core.ShiftCohort.cohortList}
selectedKey={this.state.selectedCohort}
options={this.state.options}
styles={dropdownStyles}
Expand Down
2 changes: 1 addition & 1 deletion libs/counterfactuals/src/lib/CounterfactualList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class CounterfactualList extends React.Component<
onRenderItemColumn={this.renderItemColumn}
onRenderRow={this.renderRow}
onRenderDetailsFooter={this.onRenderDetailsFooter}
ariaLabel="Counterfactual list"
ariaLabel={localization.Counterfactuals.AriaLabel}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ export class AggregateBalanceMeasuresTable extends React.PureComponent<IAggregat
selectionMode={SelectionMode.none}
layoutMode={DetailsListLayoutMode.justified}
checkboxVisibility={CheckboxVisibility.hidden}
ariaLabelForSelectAllCheckbox="Select all rows"
ariaLabel="Aggregate balance measures list"
ariaLabelForSelectAllCheckbox={localization.ModelAssessment.ModelOverview.featureConfiguration.selectAllRowsAriaLabel}
ariaLabel={localization.ModelAssessment.ModelOverview.featureConfiguration.flyoutAriaLabel}
/>
</Stack.Item>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
</MarqueeSelection>
</Stack.Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
10 changes: 9 additions & 1 deletion libs/localization/src/lib/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
}
},
"Counterfactuals": {
"AriaLabel": "Counterfactual list",
"CurrentTreatment": "Current treatment",
"EffectLowerBound": "CI lower",
"EffectOfTreatment": "Effect of recommendation",
Expand Down Expand Up @@ -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: "
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 && (
<CohortEditor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ export class FeatureConfigurationFlyout extends React.Component<
selectionMode={SelectionMode.multiple}
selection={this._selection}
checkboxVisibility={CheckboxVisibility.always}
ariaLabelForSelectAllCheckbox="Select all rows"
ariaLabel="Feature selection table"
ariaLabelForSelectAllCheckbox={localization.ModelAssessment.ModelOverview.featureConfiguration.selectAllRowsAriaLabel}
ariaLabel={localization.ModelAssessment.ModelOverview.featureConfiguration.featureSelectionAriaLabel}
/>
</Stack>
</Panel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
</Stack>
</Panel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class ObjectDetectionWidgets extends React.PureComponent<IObjectDetection
/>
<Slider
id="modelOverviewIoUThreshold"
ariaLabel="Slider for IoU threshold"
ariaLabel={localization.ModelAssessment.ModelOverview.iouThresholdDropdown.AriaLabel}
label={
localization.ModelAssessment.ModelOverview.iouThresholdDropdown.name
}
Expand Down

0 comments on commit 3d93d96

Please sign in to comment.