Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Upgrade Assistant] Address copy feedback #99632

Merged
merged 8 commits into from
May 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -23917,7 +23917,6 @@
"xpack.upgradeAssistant.checkupTab.changeFiltersShowMoreLabel": "より多く表示させるにはフィルターを変更します。",
"xpack.upgradeAssistant.checkupTab.confirmationModal.removeButtonLabel": "削除",
"xpack.upgradeAssistant.checkupTab.controls.filterBar.criticalButtonLabel": "致命的",
"xpack.upgradeAssistant.checkupTab.controls.filterBar.warningButtonLabel": "警告",
"xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIndexLabel": "インデックス別",
"xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIssueLabel": "問題別",
"xpack.upgradeAssistant.checkupTab.deprecations.criticalActionTooltip": "アップグレード前にこの問題を解決してください。",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -24288,7 +24288,6 @@
"xpack.upgradeAssistant.checkupTab.changeFiltersShowMoreLabel": "更改筛选以显示更多内容。",
"xpack.upgradeAssistant.checkupTab.confirmationModal.removeButtonLabel": "移除",
"xpack.upgradeAssistant.checkupTab.controls.filterBar.criticalButtonLabel": "紧急",
"xpack.upgradeAssistant.checkupTab.controls.filterBar.warningButtonLabel": "警告",
"xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIndexLabel": "按索引",
"xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIssueLabel": "按问题",
"xpack.upgradeAssistant.checkupTab.deprecations.criticalActionTooltip": "请解决此问题后再升级。",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('Kibana deprecations', () => {
let modal = document.body.querySelector('[data-test-subj="stepsModal"]');

expect(modal).not.toBe(null);
expect(modal!.textContent).toContain(`Fix '${deprecation.domainId}'`);
expect(modal!.textContent).toContain(`Resolve deprecation in '${deprecation.domainId}'`);

const steps: NodeListOf<Element> | null = modal!.querySelectorAll(
'[data-test-subj="fixDeprecationSteps"] .euiStep'
Expand Down Expand Up @@ -127,7 +127,7 @@ describe('Kibana deprecations', () => {
let modal = document.body.querySelector('[data-test-subj="resolveModal"]');

expect(modal).not.toBe(null);
expect(modal!.textContent).toContain(`Resolve '${deprecation.domainId}'`);
expect(modal!.textContent).toContain(`Resolve deprecation in '${deprecation.domainId}'`);

const confirmButton: HTMLButtonElement | null = modal!.querySelector(
'[data-test-subj="confirmModalConfirmButton"]'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ const i18nTexts = {
defaultMessage: 'Kibana',
}),
pageDescription: i18n.translate('xpack.upgradeAssistant.kibanaDeprecations.pageDescription', {
defaultMessage: 'Some Kibana issues may require your attention. Resolve them before upgrading.',
defaultMessage:
'Review the issues listed here and make the necessary changes before upgrading. Critical issues must be resolved before you upgrade.',
}),
docLinkText: i18n.translate('xpack.upgradeAssistant.kibanaDeprecations.docLinkText', {
defaultMessage: 'Documentation',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const i18nTexts = {
i18n.translate(
'xpack.upgradeAssistant.kibanaDeprecations.resolveConfirmationModal.modalTitle',
{
defaultMessage: "Resolve '{domainId}'?",
defaultMessage: "Resolve deprecation in '{domainId}'?",
values: {
domainId,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { i18n } from '@kbn/i18n';
import {
EuiText,
EuiSteps,
EuiSpacer,
EuiButton,
EuiModal,
EuiModalBody,
Expand All @@ -38,7 +37,7 @@ interface Props {
const i18nTexts = {
getModalTitle: (domainId: string) =>
i18n.translate('xpack.upgradeAssistant.kibanaDeprecations.stepsModal.modalTitle', {
defaultMessage: "Fix '{domainId}'",
defaultMessage: "Resolve deprecation in '{domainId}'",
values: {
domainId,
},
Expand All @@ -50,12 +49,6 @@ const i18nTexts = {
step,
},
}),
modalDescription: i18n.translate(
'xpack.upgradeAssistant.kibanaDeprecations.stepsModal.modalDescription',
{
defaultMessage: 'Follow the steps below to address this deprecation.',
}
),
docLinkLabel: i18n.translate(
'xpack.upgradeAssistant.kibanaDeprecations.stepsModal.docLinkLabel',
{
Expand Down Expand Up @@ -84,28 +77,20 @@ export const StepsModal: FunctionComponent<Props> = ({ closeModal, modalContent
</EuiModalHeader>

<EuiModalBody>
<>
<EuiText>
<p>{i18nTexts.modalDescription}</p>
</EuiText>

<EuiSpacer />

<EuiSteps
titleSize="xs"
data-test-subj="fixDeprecationSteps"
steps={steps.map((step, index) => {
return {
title: i18nTexts.getStepTitle(index + 1),
children: (
<EuiText>
<p>{step}</p>
</EuiText>
),
};
})}
/>
</>
<EuiSteps
titleSize="xs"
data-test-subj="fixDeprecationSteps"
steps={steps.map((step, index) => {
return {
title: i18nTexts.getStepTitle(index + 1),
children: (
<EuiText>
<p>{step}</p>
</EuiText>
),
};
})}
/>
</EuiModalBody>

<EuiModalFooter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import { COLOR_MAP, REVERSE_LEVEL_MAP } from '../constants';

const LocalizedLevels: { [level: string]: string } = {
warning: i18n.translate('xpack.upgradeAssistant.checkupTab.deprecations.warningLabel', {
defaultMessage: 'warning',
defaultMessage: 'Warning',
}),
critical: i18n.translate('xpack.upgradeAssistant.checkupTab.deprecations.criticalLabel', {
defaultMessage: 'critical',
defaultMessage: 'Critical',
}),
};

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import { GroupByOption } from '../../types';

const LocalizedOptions: { [option: string]: string } = {
message: i18n.translate('xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIssueLabel', {
defaultMessage: 'by issue',
defaultMessage: 'By issue',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@debadair since you suggested capitalizing Critical and Warning, it seemed like we should also capitalize the By issue and By index filters on the ES deprecations page. Let me know if you disagree.

}),
index: i18n.translate('xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIndexLabel', {
defaultMessage: 'by index',
defaultMessage: 'By index',
}),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@ import { i18n } from '@kbn/i18n';
import { LevelFilterOption } from '../../types';

const LocalizedOptions: { [option: string]: string } = {
warning: i18n.translate(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not being used anymore

'xpack.upgradeAssistant.checkupTab.controls.filterBar.warningButtonLabel',
{
defaultMessage: 'warning',
}
),
critical: i18n.translate(
'xpack.upgradeAssistant.checkupTab.controls.filterBar.criticalButtonLabel',
{ defaultMessage: 'critical' }
{ defaultMessage: 'Critical' }
),
};
interface DeprecationLevelProps {
Expand Down