Skip to content

Commit 180d7fc

Browse files
authored
[7.5] update telemetry banner notice text (#50403) (#50479)
* remove exclamation from CN telemetry.welcomeBanner.title * remove unused i18n keys via `scripts/i18n_check.js --fix`
1 parent 91587e2 commit 180d7fc

File tree

9 files changed

+84
-74
lines changed

9 files changed

+84
-74
lines changed

src/legacy/core_plugins/telemetry/common/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const LOCALSTORAGE_KEY = 'telemetry.data';
5151
/**
5252
* Link to the Elastic Telemetry privacy statement.
5353
*/
54-
export const PRIVACY_STATEMENT_URL = `https://www.elastic.co/legal/telemetry-privacy-statement`;
54+
export const PRIVACY_STATEMENT_URL = `https://www.elastic.co/legal/privacy-statement`;
5555

5656
/**
5757
* The type name used within the Monitoring index to publish localization stats.

src/legacy/core_plugins/telemetry/public/components/__snapshots__/opt_in_message.test.tsx.snap

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/legacy/core_plugins/telemetry/public/components/__snapshots__/telemetry_form.test.js.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/legacy/core_plugins/telemetry/public/components/opt_in_banner_component.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class OptInBanner extends React.PureComponent<Props> {
3535
const title = (
3636
<FormattedMessage
3737
id="telemetry.welcomeBanner.title"
38-
defaultMessage="Help us improve the Elastic Stack!"
38+
defaultMessage="Help us improve the Elastic Stack"
3939
/>
4040
);
4141
return (
@@ -45,12 +45,18 @@ export class OptInBanner extends React.PureComponent<Props> {
4545
<EuiFlexGroup gutterSize="s" alignItems="center">
4646
<EuiFlexItem grow={false}>
4747
<EuiButton size="s" onClick={() => this.props.optInClick(true)}>
48-
<FormattedMessage id="telemetry.welcomeBanner.yesButtonLabel" defaultMessage="Yes" />
48+
<FormattedMessage
49+
id="telemetry.welcomeBanner.enableButtonLabel"
50+
defaultMessage="Enable"
51+
/>
4952
</EuiButton>
5053
</EuiFlexItem>
5154
<EuiFlexItem grow={false}>
5255
<EuiButton size="s" onClick={() => this.props.optInClick(false)}>
53-
<FormattedMessage id="telemetry.welcomeBanner.noButtonLabel" defaultMessage="No" />
56+
<FormattedMessage
57+
id="telemetry.welcomeBanner.disableButtonLabel"
58+
defaultMessage="Disable"
59+
/>
5460
</EuiButton>
5561
</EuiFlexItem>
5662
</EuiFlexGroup>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
import React from 'react';
20+
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
21+
import { OptInMessage } from './opt_in_message';
22+
23+
describe('OptInMessage', () => {
24+
it('renders as expected', () => {
25+
expect(
26+
shallowWithIntl(<OptInMessage fetchTelemetry={jest.fn(async () => [])} />)
27+
).toMatchSnapshot();
28+
});
29+
});

src/legacy/core_plugins/telemetry/public/components/opt_in_message.tsx

Lines changed: 15 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import * as React from 'react';
2121
import { EuiLink } from '@elastic/eui';
2222
import { FormattedMessage } from '@kbn/i18n/react';
2323

24-
import { getConfigTelemetryDesc, PRIVACY_STATEMENT_URL } from '../../common/constants';
25-
import { OptInExampleFlyout } from './opt_in_details_component';
24+
import { PRIVACY_STATEMENT_URL } from '../../common/constants';
2625

2726
interface Props {
2827
fetchTelemetry: () => Promise<any[]>;
@@ -46,60 +45,22 @@ export class OptInMessage extends React.PureComponent<Props, State> {
4645
};
4746

4847
render() {
49-
const { showDetails, showExample } = this.state;
50-
51-
const getDetails = () => (
52-
<FormattedMessage
53-
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription"
54-
defaultMessage="No information about the data you process or store will be sent. This feature
55-
will periodically send basic feature usage statistics. See an {exampleLink} or read our {telemetryPrivacyStatementLink}.
56-
You can disable this feature at any time."
57-
values={{
58-
exampleLink: (
59-
<EuiLink onClick={this.toggleShowExample}>
60-
<FormattedMessage
61-
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.exampleLinkText"
62-
defaultMessage="example"
63-
/>
64-
</EuiLink>
65-
),
66-
telemetryPrivacyStatementLink: (
67-
<EuiLink href={PRIVACY_STATEMENT_URL} target="_blank">
68-
<FormattedMessage
69-
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.telemetryPrivacyStatementLinkText"
70-
defaultMessage="telemetry privacy statement"
71-
/>
72-
</EuiLink>
73-
),
74-
}}
75-
/>
76-
);
77-
78-
const getFlyoutDetails = () => (
79-
<OptInExampleFlyout
80-
onClose={() => this.setState({ showExample: false })}
81-
fetchTelemetry={this.props.fetchTelemetry}
82-
/>
83-
);
84-
85-
const getReadMore = () => (
86-
<EuiLink onClick={() => this.setState({ showDetails: true })}>
87-
<FormattedMessage
88-
id="telemetry.welcomeBanner.telemetryConfigDescription.readMoreLinkText"
89-
defaultMessage="Read more"
90-
/>
91-
</EuiLink>
92-
);
93-
9448
return (
9549
<React.Fragment>
96-
{getConfigTelemetryDesc()} {!showDetails && getReadMore()}
97-
{showDetails && (
98-
<span style={{ display: 'block', paddingTop: '10px' }}>
99-
{getDetails()}
100-
{showExample && getFlyoutDetails()}
101-
</span>
102-
)}
50+
<FormattedMessage
51+
id="telemetry.telemetryBannerDescription"
52+
defaultMessage="Want to help us improve the Elastic Stack? Data usage collection is currently disabled. Enabling data usage collection helps us manage and improve our products and services. See our {privacyStatementLink} for more details."
53+
values={{
54+
privacyStatementLink: (
55+
<EuiLink href={PRIVACY_STATEMENT_URL} target="_blank">
56+
<FormattedMessage
57+
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.telemetryPrivacyStatementLinkText"
58+
defaultMessage="Privacy Statement"
59+
/>
60+
</EuiLink>
61+
),
62+
}}
63+
/>
10364
</React.Fragment>
10465
);
10566
}

x-pack/legacy/plugins/license_management/__jest__/__snapshots__/telemetry_opt_in.test.js.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/translations/translations/ja-JP.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11809,12 +11809,7 @@
1180911809
"telemetry.telemetryErrorNotificationMessageDescription.unableToSaveTelemetryPreferenceText": "遠隔測定設定を保存できません。",
1181011810
"telemetry.telemetryErrorNotificationMessageTitle": "遠隔測定エラー",
1181111811
"telemetry.usageDataTitle": "使用データ",
11812-
"telemetry.welcomeBanner.noButtonLabel": "いいえ",
11813-
"telemetry.welcomeBanner.telemetryConfigDescription.readMoreLinkText": "続きを読む",
11814-
"telemetry.welcomeBanner.telemetryConfigDetailsDescription": "ユーザーが処理したり保管したりするデータに関する情報は一切送信されません。この機能は定期的に基本的な機能の利用状況に関する統計情報を送信します。{exampleLink} をご覧いただくか、{telemetryPrivacyStatementLink} をお読みください。この機能はいつでも無効にできます。",
11815-
"telemetry.welcomeBanner.telemetryConfigDetailsDescription.exampleLinkText": "例",
1181611812
"telemetry.welcomeBanner.telemetryConfigDetailsDescription.telemetryPrivacyStatementLinkText": "遠隔測定に関するプライバシーステートメント",
11817-
"telemetry.welcomeBanner.yesButtonLabel": "はい",
1181811813
"telemetry.optInErrorToastText": "使用状況統計設定の設定中にエラーが発生しました。",
1181911814
"telemetry.optInErrorToastTitle": "エラー",
1182011815
"telemetry.welcomeBanner.title": "Elastic Stack の改善にご協力ください",

x-pack/plugins/translations/translations/zh-CN.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7681,7 +7681,7 @@
76817681
"xpack.ml.ruleEditor.scopeSection.noPermissionToViewFilterListsTitle": "您无权查看筛选列表",
76827682
"xpack.ml.ruleEditor.scopeSection.scopeTitle": "范围",
76837683
"xpack.ml.ruleEditor.selectRuleAction.createRuleLinkText": "创建规则",
7684-
"xpack.ml.ruleEditor.selectRuleAction.orText": "或 ",
7684+
"xpack.ml.ruleEditor.selectRuleAction.orText": "或 ",
76857685
"xpack.ml.ruleEditor.typicalAppliesTypeText": "典型",
76867686
"xpack.ml.sampleDataLinkLabel": "ML 作业",
76877687
"xpack.ml.settings.breadcrumbs.calendarManagement.createLabel": "创建",
@@ -8278,7 +8278,7 @@
82788278
"xpack.ml.overview.anomalyDetection.tableMaxScoreTooltip": "最近 24 小时期间组中所有作业的最大分数",
82798279
"xpack.ml.overview.anomalyDetection.tableNumJobs": "组中的作业",
82808280
"xpack.ml.overview.feedbackSectionLink": "在线反馈",
8281-
"xpack.ml.overview.feedbackSectionText": "如果您对 Machine Learning 体验有任何建议,请随时{feedbackLink}。",
8281+
"xpack.ml.overview.feedbackSectionText": "如果您对 Machine Learning 体验有任何建议,请随时{feedbackLink}。",
82828282
"xpack.ml.overview.feedbackSectionTitle": "反馈",
82838283
"xpack.ml.overview.gettingStartedSectionCreateJob": "创建新作业",
82848284
"xpack.ml.overview.gettingStartedSectionDocs": "文档",
@@ -11899,15 +11899,10 @@
1189911899
"telemetry.telemetryErrorNotificationMessageDescription.unableToSaveTelemetryPreferenceText": "无法保存遥测首选项。",
1190011900
"telemetry.telemetryErrorNotificationMessageTitle": "遥测错误",
1190111901
"telemetry.usageDataTitle": "使用情况数据",
11902-
"telemetry.welcomeBanner.noButtonLabel": "否",
11903-
"telemetry.welcomeBanner.telemetryConfigDescription.readMoreLinkText": "阅读更多内容",
11904-
"telemetry.welcomeBanner.telemetryConfigDetailsDescription": "不会发送有关所处理或存储数据的信息。此功能将定期发送基本功能使用情况统计信息。请参阅{exampleLink}或阅读我们的{telemetryPrivacyStatementLink}。您可以随时禁用此功能。",
11905-
"telemetry.welcomeBanner.telemetryConfigDetailsDescription.exampleLinkText": "示例",
1190611902
"telemetry.welcomeBanner.telemetryConfigDetailsDescription.telemetryPrivacyStatementLinkText": "遥测隐私声明",
11907-
"telemetry.welcomeBanner.yesButtonLabel": "是",
1190811903
"telemetry.optInErrorToastText": "尝试设置使用统计信息首选项时发生错误。",
1190911904
"telemetry.optInErrorToastTitle": "错误",
11910-
"telemetry.welcomeBanner.title": "帮助我们改进 Elastic Stack",
11905+
"telemetry.welcomeBanner.title": "帮助我们改进 Elastic Stack",
1191111906
"xpack.upgradeAssistant.appTitle": "{version} 升级助手",
1191211907
"xpack.upgradeAssistant.checkupTab.backUpCallout.calloutBody.calloutDetail": "使用 {snapshotRestoreDocsButton} 备份您的数据。",
1191311908
"xpack.upgradeAssistant.checkupTab.backUpCallout.calloutBody.snapshotRestoreDocsButtonLabel": "快照和还原 API",

0 commit comments

Comments
 (0)