Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
EuiSwitch,
} from '@elastic/eui';
import { FieldFilter, Filter } from '@kbn/es-query';
import { i18n } from '@kbn/i18n';
import { FormattedMessage, InjectedIntl, injectI18n } from '@kbn/i18n/react';
import { get } from 'lodash';
import React, { Component } from 'react';
Expand Down Expand Up @@ -293,7 +294,11 @@ class FilterEditorUI extends Component<Props, State> {

private renderCustomEditor() {
return (
<EuiFormRow label="Value">
<EuiFormRow
label={i18n.translate('data.filter.filterEditor.queryDslLabel', {
defaultMessage: 'Elasticsearch Query DSL',
})}
>
<EuiCodeEditor
value={this.state.queryDsl}
onChange={this.onQueryDslChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import { EuiFilterButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { Filter } from '@kbn/es-query';
import { InjectedIntl, injectI18n } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import classNames from 'classnames';
import React, { Component } from 'react';
import ResizeObserver from 'resize-observer-polyfill';
Expand Down Expand Up @@ -107,10 +108,17 @@ class SearchBarUI extends Component<SearchBarProps, State> {
}

private getFilterTriggerButton() {
const filtersAppliedText = this.props.intl.formatMessage({
id: 'kibana_react.search.searchBar.filtersButtonFiltersAppliedTitle',
defaultMessage: 'filters applied.',
});
const filterCount = this.getFilterLength();
const filtersAppliedText = this.props.intl.formatMessage(
{
id: 'kibana_react.search.searchBar.filtersButtonFiltersAppliedTitle',
defaultMessage:
'{filterCount} {filterCount, plural, one {filter} other {filters}} applied.',
},
{
filterCount,
}
);
const clickToShowOrHideText = this.state.isFiltersVisible
? this.props.intl.formatMessage({
id: 'kibana_react.search.searchBar.filtersButtonClickToShowTitle',
Expand All @@ -121,7 +129,6 @@ class SearchBarUI extends Component<SearchBarProps, State> {
defaultMessage: 'Select to show',
});

const filterCount = this.getFilterLength();
return (
<EuiFilterButton
onClick={this.toggleFiltersVisible}
Expand All @@ -132,7 +139,10 @@ class SearchBarUI extends Component<SearchBarProps, State> {
aria-expanded={!!this.state.isFiltersVisible}
title={`${filterCount ? filtersAppliedText : ''} ${clickToShowOrHideText}`}
>
Filters
{i18n.translate('kibana_react.search.searchBar.filtersButtonLabel', {
defaultMessage: 'Filters',
description: 'The noun "filter" in plural.',
})}
</EuiFilterButton>
);
}
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,6 @@
"data.query.queryBar.syntaxOptionsTitle": "構文オプション",
"kibana_react.search.searchBar.filtersButtonClickToHideTitle": "選択して表示",
"kibana_react.search.searchBar.filtersButtonClickToShowTitle": "選択して非表示",
"kibana_react.search.searchBar.filtersButtonFiltersAppliedTitle": "フィルターが適用されました。",
"embeddableApi.actionPanel.title": "オプション",
"embeddableApi.actions.applyFilterActionTitle": "現在のビューにフィルターを適用",
"embeddableApi.addPanel.createNew": "新規 {factoryName} を作成",
Expand Down Expand Up @@ -10667,4 +10666,4 @@
"xpack.watcher.watchActions.logging.logTextIsRequiredValidationMessage": "ログテキストが必要です。",
"xpack.watcher.watcherDescription": "アラートの作成、管理、監視によりデータへの変更を検知します。"
}
}
}
3 changes: 1 addition & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,6 @@
"data.query.queryBar.syntaxOptionsTitle": "语法选项",
"kibana_react.search.searchBar.filtersButtonClickToHideTitle": "选择以显示",
"kibana_react.search.searchBar.filtersButtonClickToShowTitle": "选择以隐藏",
"kibana_react.search.searchBar.filtersButtonFiltersAppliedTitle": "个筛选已应用。",
"embeddableApi.actionPanel.title": "选项",
"embeddableApi.actions.applyFilterActionTitle": "将筛选应用于当前视图",
"embeddableApi.addPanel.createNew": "创建新的{factoryName}",
Expand Down Expand Up @@ -10666,4 +10665,4 @@
"xpack.watcher.watchActions.logging.logTextIsRequiredValidationMessage": "“日志文本”必填。",
"xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。"
}
}
}