[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`
This commit is contained in:
Patrick Mueller 2019-11-13 14:38:21 -05:00 committed by GitHub
parent 91587e23dc
commit 180d7fc5f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 84 additions and 74 deletions

View file

@ -51,7 +51,7 @@ export const LOCALSTORAGE_KEY = 'telemetry.data';
/**
* Link to the Elastic Telemetry privacy statement.
*/
export const PRIVACY_STATEMENT_URL = `https://www.elastic.co/legal/telemetry-privacy-statement`;
export const PRIVACY_STATEMENT_URL = `https://www.elastic.co/legal/privacy-statement`;
/**
* The type name used within the Monitoring index to publish localization stats.

View file

@ -0,0 +1,24 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`OptInMessage renders as expected 1`] = `
<Fragment>
<FormattedMessage
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."
id="telemetry.telemetryBannerDescription"
values={
Object {
"privacyStatementLink": <ForwardRef
href="https://www.elastic.co/legal/privacy-statement"
target="_blank"
>
<FormattedMessage
defaultMessage="Privacy Statement"
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.telemetryPrivacyStatementLinkText"
values={Object {}}
/>
</ForwardRef>,
}
}
/>
</Fragment>
`;

View file

@ -52,7 +52,7 @@ exports[`TelemetryForm renders as expected when allows to change optIn status 1`
</p>
<p>
<ForwardRef
href="https://www.elastic.co/legal/telemetry-privacy-statement"
href="https://www.elastic.co/legal/privacy-statement"
target="_blank"
>
<FormattedMessage

View file

@ -35,7 +35,7 @@ export class OptInBanner extends React.PureComponent<Props> {
const title = (
<FormattedMessage
id="telemetry.welcomeBanner.title"
defaultMessage="Help us improve the Elastic Stack!"
defaultMessage="Help us improve the Elastic Stack"
/>
);
return (
@ -45,12 +45,18 @@ export class OptInBanner extends React.PureComponent<Props> {
<EuiFlexGroup gutterSize="s" alignItems="center">
<EuiFlexItem grow={false}>
<EuiButton size="s" onClick={() => this.props.optInClick(true)}>
<FormattedMessage id="telemetry.welcomeBanner.yesButtonLabel" defaultMessage="Yes" />
<FormattedMessage
id="telemetry.welcomeBanner.enableButtonLabel"
defaultMessage="Enable"
/>
</EuiButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton size="s" onClick={() => this.props.optInClick(false)}>
<FormattedMessage id="telemetry.welcomeBanner.noButtonLabel" defaultMessage="No" />
<FormattedMessage
id="telemetry.welcomeBanner.disableButtonLabel"
defaultMessage="Disable"
/>
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>

View file

@ -0,0 +1,29 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import { OptInMessage } from './opt_in_message';
describe('OptInMessage', () => {
it('renders as expected', () => {
expect(
shallowWithIntl(<OptInMessage fetchTelemetry={jest.fn(async () => [])} />)
).toMatchSnapshot();
});
});

View file

@ -21,8 +21,7 @@ import * as React from 'react';
import { EuiLink } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { getConfigTelemetryDesc, PRIVACY_STATEMENT_URL } from '../../common/constants';
import { OptInExampleFlyout } from './opt_in_details_component';
import { PRIVACY_STATEMENT_URL } from '../../common/constants';
interface Props {
fetchTelemetry: () => Promise<any[]>;
@ -46,60 +45,22 @@ export class OptInMessage extends React.PureComponent<Props, State> {
};
render() {
const { showDetails, showExample } = this.state;
const getDetails = () => (
<FormattedMessage
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription"
defaultMessage="No information about the data you process or store will be sent. This feature
will periodically send basic feature usage statistics. See an {exampleLink} or read our {telemetryPrivacyStatementLink}.
You can disable this feature at any time."
values={{
exampleLink: (
<EuiLink onClick={this.toggleShowExample}>
<FormattedMessage
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.exampleLinkText"
defaultMessage="example"
/>
</EuiLink>
),
telemetryPrivacyStatementLink: (
<EuiLink href={PRIVACY_STATEMENT_URL} target="_blank">
<FormattedMessage
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.telemetryPrivacyStatementLinkText"
defaultMessage="telemetry privacy statement"
/>
</EuiLink>
),
}}
/>
);
const getFlyoutDetails = () => (
<OptInExampleFlyout
onClose={() => this.setState({ showExample: false })}
fetchTelemetry={this.props.fetchTelemetry}
/>
);
const getReadMore = () => (
<EuiLink onClick={() => this.setState({ showDetails: true })}>
<FormattedMessage
id="telemetry.welcomeBanner.telemetryConfigDescription.readMoreLinkText"
defaultMessage="Read more"
/>
</EuiLink>
);
return (
<React.Fragment>
{getConfigTelemetryDesc()} {!showDetails && getReadMore()}
{showDetails && (
<span style={{ display: 'block', paddingTop: '10px' }}>
{getDetails()}
{showExample && getFlyoutDetails()}
</span>
)}
<FormattedMessage
id="telemetry.telemetryBannerDescription"
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."
values={{
privacyStatementLink: (
<EuiLink href={PRIVACY_STATEMENT_URL} target="_blank">
<FormattedMessage
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.telemetryPrivacyStatementLinkText"
defaultMessage="Privacy Statement"
/>
</EuiLink>
),
}}
/>
</React.Fragment>
);
}

View file

@ -188,7 +188,7 @@ exports[`TelemetryOptIn should display when telemetry not opted in 1`] = `
/>
</ForwardRef>,
"telemetryPrivacyStatementLink": <ForwardRef
href="https://www.elastic.co/legal/telemetry-privacy-statement"
href="https://www.elastic.co/legal/privacy-statement"
target="_blank"
>
<FormattedMessage
@ -275,7 +275,7 @@ exports[`TelemetryOptIn should display when telemetry not opted in 1`] = `
/>
</ForwardRef>,
"telemetryPrivacyStatementLink": <ForwardRef
href="https://www.elastic.co/legal/telemetry-privacy-statement"
href="https://www.elastic.co/legal/privacy-statement"
target="_blank"
>
<FormattedMessage

View file

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

View file

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