Skip to content

Commit

Permalink
Fixing overlooked i18n translations
Browse files Browse the repository at this point in the history
  • Loading branch information
simianhacker committed May 14, 2020
1 parent 2100a2f commit fe12490
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ export const WaffleMetricControls = ({
}

const button = (
<DropdownButton onClick={handleToggle} label="Metric">
<DropdownButton
onClick={handleToggle}
label={i18n.translate('xpack.infra.waffle.metriclabel', { defaultMessage: 'Metric' })}
>
{currentLabel}
</DropdownButton>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ export const WaffleGroupByControls = class extends React.PureComponent<Props, St
);

const button = (
<DropdownButton label="Group By" onClick={this.handleToggle}>
<DropdownButton
label={i18n.translate('xpack.infra.waffle.groupByLabel', { defaultMessage: 'Group by' })}
onClick={this.handleToggle}
>
{buttonBody}
</DropdownButton>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import { EuiPopover, EuiContextMenu, EuiContextMenuPanelDescriptor } from '@elastic/eui';

import React, { useCallback, useState, useMemo } from 'react';
import { i18n } from '@kbn/i18n';
import { findInventoryModel } from '../../../../../../common/inventory_models';
import { InventoryItemType } from '../../../../../../common/inventory_models/types';
import { useWaffleOptionsContext } from '../../hooks/use_waffle_options';
Expand Down Expand Up @@ -115,7 +116,10 @@ export const WaffleInventorySwitcher: React.FC = () => {
}, [nodeType]);

const button = (
<DropdownButton onClick={openPopover} label="Show">
<DropdownButton
onClick={openPopover}
label={i18n.translate('xpack.infra.waffle.showLabel', { defaultMessage: 'Show' })}
>
{selectedText}
</DropdownButton>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export const WaffleRegionControls = (props: Props) => {
);

const button = (
<DropdownButton onClick={showPopover} label="Region">
<DropdownButton
onClick={showPopover}
label={i18n.translate('xpack.infra.waffle.regionLabel', { defaultMessage: 'Region' })}
>
{currentLabel ||
i18n.translate('xpack.infra.waffle.region', {
defaultMessage: 'All',
Expand Down

0 comments on commit fe12490

Please sign in to comment.