[8.12] Adjust wording in Set up KB message (#173814) (#173820)

# Backport

This will backport the following commits from `main` to `8.12`:
- [Adjust wording in Set up KB message
(#173814)](https://github.com/elastic/kibana/pull/173814)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Coen
Warmer","email":"coen.warmer@gmail.com"},"sourceCommit":{"committedDate":"2023-12-21T11:03:02Z","message":"Adjust
wording in Set up KB message
(#173814)","sha":"85df7c994930c9dccd30e8f30b81d703f5521d34","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","v8.12.0","v8.13.0"],"number":173814,"url":"https://github.com/elastic/kibana/pull/173814","mergeCommit":{"message":"Adjust
wording in Set up KB message
(#173814)","sha":"85df7c994930c9dccd30e8f30b81d703f5521d34"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173814","number":173814,"mergeCommit":{"message":"Adjust
wording in Set up KB message
(#173814)","sha":"85df7c994930c9dccd30e8f30b81d703f5521d34"}}]}]
BACKPORT-->

Co-authored-by: Coen Warmer <coen.warmer@gmail.com>
This commit is contained in:
Kibana Machine 2023-12-21 07:59:23 -05:00 committed by GitHub
parent a78512f504
commit a7e9015ced
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View file

@ -113,7 +113,7 @@ export function WelcomeMessageKnowledgeBase({
<EuiText color="subdued" size="s">
{i18n.translate(
'xpack.observabilityAiAssistant.welcomeMessageKnowledgeBase.yourKnowledgeBaseIsNotSetUpCorrectlyLabel',
{ defaultMessage: 'Your Knowledge base is not set up correctly' }
{ defaultMessage: `Your Knowledge base hasn't been set up.` }
)}
</EuiText>
@ -127,13 +127,13 @@ export function WelcomeMessageKnowledgeBase({
data-test-subj="observabilityAiAssistantWelcomeMessageSetUpKnowledgeBaseButton"
fill
isLoading={checkForInstallStatus}
iconType="refresh"
iconType="importAction"
onClick={handleRetryInstall}
>
{i18n.translate(
'xpack.observabilityAiAssistant.welcomeMessage.retryButtonLabel',
{
defaultMessage: 'Retry install',
defaultMessage: 'Install Knowledge base',
}
)}
</EuiButton>

View file

@ -16,6 +16,11 @@ interface FeedbackButtonsProps {
onClickFeedback: (feedback: Feedback) => void;
}
const THANK_YOU_MESSAGE = i18n.translate(
'xpack.observabilityAiAssistant.feedbackButtons.em.thanksForYourFeedbackLabel',
{ defaultMessage: 'Thanks for your feedback' }
);
export function FeedbackButtons({ onClickFeedback }: FeedbackButtonsProps) {
const { notifications } = useKibana().services;
@ -24,13 +29,13 @@ export function FeedbackButtons({ onClickFeedback }: FeedbackButtonsProps) {
const handleClickPositive = () => {
onClickFeedback('positive');
setHasBeenClicked(true);
notifications.toasts.addSuccess('Thanks for your feedback!');
notifications.toasts.addSuccess(THANK_YOU_MESSAGE);
};
const handleClickNegative = () => {
onClickFeedback('negative');
setHasBeenClicked(true);
notifications.toasts.addSuccess('Thanks for your feedback!');
notifications.toasts.addSuccess(THANK_YOU_MESSAGE);
};
return (