Skip to content

Commit

Permalink
[Lens] Adjust new copy for 7.12 (#90413)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Feb 15, 2021
1 parent bac1d13 commit 5a5b8ad
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 60 deletions.

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 @@ -152,14 +152,14 @@ export const createGridColumns = (
? false
: {
label: i18n.translate('xpack.lens.table.sort.ascLabel', {
defaultMessage: 'Sort asc',
defaultMessage: 'Sort ascending',
}),
},
showSortDesc: isReadOnly
? false
: {
label: i18n.translate('xpack.lens.table.sort.descLabel', {
defaultMessage: 'Sort desc',
defaultMessage: 'Sort descending',
}),
},
additional: isReadOnly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,7 @@ import classNames from 'classnames';
import { FormattedMessage } from '@kbn/i18n/react';
import { Ast } from '@kbn/interpreter/common';
import { i18n } from '@kbn/i18n';
import {
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiText,
EuiTextColor,
EuiButtonEmpty,
EuiLink,
EuiTitle,
} from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiButtonEmpty, EuiLink } from '@elastic/eui';
import { CoreStart, CoreSetup } from 'kibana/public';
import {
DataPublicPluginStart,
Expand Down Expand Up @@ -420,16 +411,6 @@ export const InnerVisualizationWrapper = ({
<EuiFlexItem>
<EuiIcon type="alert" size="xl" color="danger" />
</EuiFlexItem>
<EuiFlexItem>
<EuiTitle size="s">
<EuiTextColor color="danger">
<FormattedMessage
id="xpack.lens.editorFrame.configurationFailure"
defaultMessage="Invalid configuration"
/>
</EuiTextColor>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem className="eui-textBreakAll" data-test-subj="configuration-failure-error">
{localState.configurationValidationError[0].longMessage}
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,21 @@ const MovingAveragePopup = () => {
<p>
<FormattedMessage
id="xpack.lens.indexPattern.movingAverage.basicExplanation"
defaultMessage="Moving average slides a window across the data and displays the average value in the window."
defaultMessage="Moving average slides a window across the data and displays the average value. Moving average is supported only by date histograms."
/>
</p>

<p>
<FormattedMessage
id="xpack.lens.indexPattern.movingAverage.longerExplanation"
defaultMessage="To calculate the moving average, Lens uses the mean of the window and applies a skip policy for gaps.
For missing values, the bucket is skipped and the calculation is performed on the next value."
defaultMessage="To calculate the moving average, Lens uses the mean of the window and applies a skip policy for gaps. For missing values, the bucket is skipped, and the calculation is performed on the next value."
/>
</p>

<p>
<FormattedMessage
id="xpack.lens.indexPattern.movingAverage.tableExplanation"
defaultMessage="For example, given the data [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], we can calculate a simple moving average with a window size of 5 as follows:"
defaultMessage="For example, given the data [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], you can calculate a simple moving average with a window size of 5:"
/>
</p>

Expand All @@ -227,7 +226,7 @@ const MovingAveragePopup = () => {
<p>
<FormattedMessage
id="xpack.lens.indexPattern.movingAverage.windowInitialPartial"
defaultMessage="For the initial part of the series the window is partial, until it reaches the requested number of items. For instance with a window size of 5:"
defaultMessage="The window is partial until it reaches the requested number of items. For example, with a window size of 5:"
/>
</p>
<ul>
Expand All @@ -240,7 +239,7 @@ const MovingAveragePopup = () => {
<p>
<FormattedMessage
id="xpack.lens.indexPattern.movingAverage.limitations"
defaultMessage="Note the first moving average value start from the second item onward. The moving average is supported only for date histograms."
defaultMessage="The first moving average value starts at the second item."
/>
</p>
</HelpPopover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function checkForDateHistogram(layer: IndexPatternLayer, name: string) {
return [
i18n.translate('xpack.lens.indexPattern.calculations.dateHistogramErrorMessage', {
defaultMessage:
'{name} requires a date histogram to work. Choose a different function or add a date histogram.',
'{name} requires a date histogram to work. Add a date histogram or select a different function.',
values: {
name,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,14 @@ const AutoDateHistogramPopover = ({ data }: { data: DataPublicPluginStart }) =>
>
<p>
{i18n.translate('xpack.lens.indexPattern.dateHistogram.autoBasicExplanation', {
defaultMessage: 'The auto date histogram splits a date field into buckets by interval.',
defaultMessage: 'The auto date histogram splits a data field into buckets by interval.',
})}
</p>

<p>
<FormattedMessage
id="xpack.lens.indexPattern.dateHistogram.autoLongerExplanation"
defaultMessage="Lens automatically chooses an interval for you by dividing the specified time range by the
{targetBarSetting} advanced setting. The calculation tries to present “nice” time interval buckets. The maximum
number of bars is set by the {maxBarSetting} value."
defaultMessage="To choose the interval, Lens divides the specified time range by the {targetBarSetting} setting. Lens calculates the best interval for your data. For example 30m, 1h, and 12. The maximum number of bars is set by the {maxBarSetting} value."
values={{
maxBarSetting: <EuiCode>{UI_SETTINGS.HISTOGRAM_MAX_BARS}</EuiCode>,
targetBarSetting: <EuiCode>{UI_SETTINGS.HISTOGRAM_BAR_TARGET}</EuiCode>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ const GranularityHelpPopover = () => {
<p>
<FormattedMessage
id="xpack.lens.indexPattern.ranges.granularityPopoverExplanation"
defaultMessage='The size of the interval is chosen to be a "nice" value. It is possible for the chosen
interval to stay the same when changing the granularity slider if the "nice" interval is
the same. The minimum granularity is 1, and the maximum is
{setting}. To change the maximum granularity setting, go to Advanced settings.'
defaultMessage='The size of the interval is a "nice" value. When the granularity of the slider changes, the interval stays the same when the “nice” interval is the same. The minimum granularity is 1, and the maximum value is
{setting}. To change the maximum granularity, go to Advanced settings.'
values={{
setting: <EuiCode>{UI_SETTINGS.HISTOGRAM_MAX_BARS}</EuiCode>,
}}
Expand All @@ -68,7 +66,7 @@ const GranularityHelpPopover = () => {
<p>
{i18n.translate('xpack.lens.indexPattern.ranges.granularityPopoverAdvancedExplanation', {
defaultMessage:
'Intervals are incremented by 10, 5 or 2: for example an interval can be 100 or 0.2 .',
'Intervals are incremented by 10, 5 or 2. For example, an interval can be 100 or 0.2 .',
})}
</p>
</HelpPopover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ export const XyToolbar = memo(function XyToolbar(props: VisualizationToolbarProp
<EuiIconTip
color="subdued"
content={i18n.translate('xpack.lens.xyChart.missingValuesLabelHelpText', {
defaultMessage: `Gaps in the data are not shown by default, but can be represented as dotted lines with different modes.`,
defaultMessage: `By default, Lens hides the gaps in the data. To fill the gap, make a selection.`,
})}
iconProps={{
className: 'eui-alignTop',
Expand Down
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 @@ -11154,7 +11154,6 @@
"xpack.lens.editLayerSettingsChartType": "レイヤー設定を編集、{chartType}",
"xpack.lens.editorFrame.buildExpressionError": "グラフの準備中に予期しないエラーが発生しました",
"xpack.lens.editorFrame.colorIndicatorLabel": "このディメンションの色:{hex}",
"xpack.lens.editorFrame.configurationFailure": "無効な構成です",
"xpack.lens.editorFrame.configurationFailureMoreErrors": " +{errors} {errors, plural, other {エラー}}",
"xpack.lens.editorFrame.dataFailure": "データの読み込み中にエラーが発生しました。",
"xpack.lens.editorFrame.emptyWorkspace": "開始するにはここにフィールドをドロップしてください",
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 @@ -11182,7 +11182,6 @@
"xpack.lens.editLayerSettingsChartType": "编辑图层设置 {chartType}",
"xpack.lens.editorFrame.buildExpressionError": "准备图表时发生意外错误",
"xpack.lens.editorFrame.colorIndicatorLabel": "此维度的颜色:{hex}",
"xpack.lens.editorFrame.configurationFailure": "配置无效",
"xpack.lens.editorFrame.configurationFailureMoreErrors": " +{errors} 个{errors, plural, other {错误}}",
"xpack.lens.editorFrame.dataFailure": "加载数据时出错。",
"xpack.lens.editorFrame.emptyWorkspace": "将一些字段拖放到此处以开始",
Expand Down
6 changes: 3 additions & 3 deletions x-pack/test/functional/apps/lens/smokescreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,15 +571,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.lens.goToTimeRange();
await PageObjects.lens.switchToVisualization('lnsDatatable');
// Sort by number
await PageObjects.lens.changeTableSortingBy(2, 'asc');
await PageObjects.lens.changeTableSortingBy(2, 'ascending');
await PageObjects.header.waitUntilLoadingHasFinished();
expect(await PageObjects.lens.getDatatableCellText(0, 2)).to.eql('17,246');
// Now sort by IP
await PageObjects.lens.changeTableSortingBy(0, 'asc');
await PageObjects.lens.changeTableSortingBy(0, 'ascending');
await PageObjects.header.waitUntilLoadingHasFinished();
expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('78.83.247.30');
// Change the sorting
await PageObjects.lens.changeTableSortingBy(0, 'desc');
await PageObjects.lens.changeTableSortingBy(0, 'descending');
await PageObjects.header.waitUntilLoadingHasFinished();
expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('169.228.188.120');
// Remove the sorting
Expand Down
6 changes: 3 additions & 3 deletions x-pack/test/functional/apps/lens/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.lens.goToTimeRange();
await PageObjects.lens.switchToVisualization('lnsDatatable');
// Sort by number
await PageObjects.lens.changeTableSortingBy(2, 'asc');
await PageObjects.lens.changeTableSortingBy(2, 'ascending');
await PageObjects.header.waitUntilLoadingHasFinished();
expect(await PageObjects.lens.getDatatableCellText(0, 2)).to.eql('17,246');
// Now sort by IP
await PageObjects.lens.changeTableSortingBy(0, 'asc');
await PageObjects.lens.changeTableSortingBy(0, 'ascending');
await PageObjects.header.waitUntilLoadingHasFinished();
expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('78.83.247.30');
// Change the sorting
await PageObjects.lens.changeTableSortingBy(0, 'desc');
await PageObjects.lens.changeTableSortingBy(0, 'descending');
await PageObjects.header.waitUntilLoadingHasFinished();
expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('169.228.188.120');
// Remove the sorting
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/functional/page_objects/lens_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
);
},

async changeTableSortingBy(colIndex = 0, direction: 'none' | 'asc' | 'desc') {
async changeTableSortingBy(colIndex = 0, direction: 'none' | 'ascending' | 'descending') {
const el = await this.getDatatableHeader(colIndex);
await el.click();
let buttonEl;
Expand Down

0 comments on commit 5a5b8ad

Please sign in to comment.