mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* Add missing i18n call * Fix filter applied message * Add another missing translation
This commit is contained in:
parent
19255d0021
commit
93b6b727d4
4 changed files with 24 additions and 11 deletions
|
@ -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';
|
||||
|
@ -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}
|
||||
|
|
|
@ -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';
|
||||
|
@ -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',
|
||||
|
@ -121,7 +129,6 @@ class SearchBarUI extends Component<SearchBarProps, State> {
|
|||
defaultMessage: 'Select to show',
|
||||
});
|
||||
|
||||
const filterCount = this.getFilterLength();
|
||||
return (
|
||||
<EuiFilterButton
|
||||
onClick={this.toggleFiltersVisible}
|
||||
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -815,7 +815,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} を作成",
|
||||
|
@ -10704,4 +10703,4 @@
|
|||
"xpack.watcher.watchActions.logging.logTextIsRequiredValidationMessage": "ログテキストが必要です。",
|
||||
"xpack.watcher.watcherDescription": "アラートの作成、管理、監視によりデータへの変更を検知します。"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -816,7 +816,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}",
|
||||
|
@ -10704,4 +10703,4 @@
|
|||
"xpack.watcher.watchActions.logging.logTextIsRequiredValidationMessage": "“日志文本”必填。",
|
||||
"xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue