Skip to content

Commit

Permalink
Internationalize de/activate button and timespan select in WatchList.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Apr 23, 2019
1 parent fbdc64f commit 8490b27
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,17 @@ const WatchHistoryUI = ({ intl, watchId }: { intl: InjectedIntl; watchId: string
);
}

const activationButtonText = isActivated ? 'Deactivate watch' : 'Activate watch';
const activationButtonText = isActivated ? (
<FormattedMessage
id="xpack.watcher.sections.watchHistory.watchTable.deactivateWatchLabel"
defaultMessage="Deactivate watch"
/>
) : (
<FormattedMessage
id="xpack.watcher.sections.watchHistory.watchTable.activateWatchLabel"
defaultMessage="Activate watch"
/>
);

return (
<Fragment>
Expand Down Expand Up @@ -281,7 +291,9 @@ const WatchHistoryUI = ({ intl, watchId }: { intl: InjectedIntl; watchId: string
options={watchHistoryTimeSpanOptions}
value={watchHistoryTimeSpan}
onChange={onTimespanChange}
aria-label="Change timespan of watch history"
aria-label={i18n.translate('xpack.watcher.sections.watchHistory.changeTimespanSelectAriaLabel', {
defaultMessage: 'Change timespan of watch history',
})}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
Expand Down

0 comments on commit 8490b27

Please sign in to comment.