Skip to content

Commit

Permalink
[Workplace Search] Connect button now displays correct copy
Browse files Browse the repository at this point in the history
  • Loading branch information
sphilipse committed Mar 9, 2022
1 parent b7f3271 commit 31247b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import {
EuiToolTip,
} from '@elastic/eui';

import { i18n } from '@kbn/i18n';

import { EuiButtonEmptyTo } from '../../../../../shared/react_router_helpers';
import { SourceIcon } from '../../../../components/shared/source_icon';
import { getAddPath, getSourcesPath } from '../../../../routes';
Expand Down Expand Up @@ -112,7 +114,19 @@ export const ConfiguredSourcesList: React.FC<ConfiguredSourcesProps> = ({
hasMultipleConnectorOptions(sourceData) ? '' : 'connect'
}`}
>
{CONFIGURED_SOURCES_CONNECT_BUTTON}
{!connected
? i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.contentSource.configuredSources.connectButton',
{
defaultMessage: 'Connect',
}
)
: i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.contentSource.configuredSources.connectAnotherButton',
{
defaultMessage: 'Connect another',
}
)}
</EuiButtonEmptyTo>
)) || (
<EuiButtonEmpty className="eui-fullWidth" isDisabled>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,6 @@ export const CONFIGURED_SOURCES_LIST_ACCOUNT_ONLY_TOOLTIP = i18n.translate(
}
);

export const CONFIGURED_SOURCES_CONNECT_BUTTON = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.contentSource.configuredSources.connectButton',
{
defaultMessage: 'Connect another',
}
);

export const CONFIGURED_SOURCES_EMPTY_STATE = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.contentSource.configuredSources.emptyState',
{
Expand Down

0 comments on commit 31247b3

Please sign in to comment.