Skip to content

Commit e0632f2

Browse files
committed
fix filter label translation
1 parent 71594a8 commit e0632f2

2 files changed

Lines changed: 49 additions & 25 deletions

File tree

x-pack/legacy/plugins/siem/public/pages/detection_engine/create_rule/components/description_step/filter_label.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface Props {
1818

1919
export const FilterLabel = memo<Props>(({ filter, valueLabel }) => {
2020
const prefixText = filter.meta.negate
21-
? ` ${i18n.translate('data.filter.filterBar.negatedFilterPrefix', {
21+
? ` ${i18n.translate('xpack.siem.detectionEngine.createRule.filterLabel.negatedFilterPrefix', {
2222
defaultMessage: 'NOT ',
2323
})}`
2424
: '';

x-pack/legacy/plugins/siem/public/pages/detection_engine/create_rule/components/description_step/filter_operator.tsx

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,69 +16,93 @@ export interface Operator {
1616
}
1717

1818
export const isOperator = {
19-
message: i18n.translate('data.filter.filterEditor.isOperatorOptionLabel', {
20-
defaultMessage: 'is',
21-
}),
19+
message: i18n.translate(
20+
'xpack.siem.detectionEngine.createRule.filterLabel.isOperatorOptionLabel',
21+
{
22+
defaultMessage: 'is',
23+
}
24+
),
2225
type: esFilters.FILTERS.PHRASE,
2326
negate: false,
2427
};
2528

2629
export const isNotOperator = {
27-
message: i18n.translate('data.filter.filterEditor.isNotOperatorOptionLabel', {
28-
defaultMessage: 'is not',
29-
}),
30+
message: i18n.translate(
31+
'xpack.siem.detectionEngine.createRule.filterLabel.isNotOperatorOptionLabel',
32+
{
33+
defaultMessage: 'is not',
34+
}
35+
),
3036
type: esFilters.FILTERS.PHRASE,
3137
negate: true,
3238
};
3339

3440
export const isOneOfOperator = {
35-
message: i18n.translate('data.filter.filterEditor.isOneOfOperatorOptionLabel', {
36-
defaultMessage: 'is one of',
37-
}),
41+
message: i18n.translate(
42+
'xpack.siem.detectionEngine.createRule.filterLabel.isOneOfOperatorOptionLabel',
43+
{
44+
defaultMessage: 'is one of',
45+
}
46+
),
3847
type: esFilters.FILTERS.PHRASES,
3948
negate: false,
4049
fieldTypes: ['string', 'number', 'date', 'ip', 'geo_point', 'geo_shape'],
4150
};
4251

4352
export const isNotOneOfOperator = {
44-
message: i18n.translate('data.filter.filterEditor.isNotOneOfOperatorOptionLabel', {
45-
defaultMessage: 'is not one of',
46-
}),
53+
message: i18n.translate(
54+
'xpack.siem.detectionEngine.createRule.filterLabel.isNotOneOfOperatorOptionLabel',
55+
{
56+
defaultMessage: 'is not one of',
57+
}
58+
),
4759
type: esFilters.FILTERS.PHRASES,
4860
negate: true,
4961
fieldTypes: ['string', 'number', 'date', 'ip', 'geo_point', 'geo_shape'],
5062
};
5163

5264
export const isBetweenOperator = {
53-
message: i18n.translate('data.filter.filterEditor.isBetweenOperatorOptionLabel', {
54-
defaultMessage: 'is between',
55-
}),
65+
message: i18n.translate(
66+
'xpack.siem.detectionEngine.createRule.filterLabel.isBetweenOperatorOptionLabel',
67+
{
68+
defaultMessage: 'is between',
69+
}
70+
),
5671
type: esFilters.FILTERS.RANGE,
5772
negate: false,
5873
fieldTypes: ['number', 'date', 'ip'],
5974
};
6075

6176
export const isNotBetweenOperator = {
62-
message: i18n.translate('data.filter.filterEditor.isNotBetweenOperatorOptionLabel', {
63-
defaultMessage: 'is not between',
64-
}),
77+
message: i18n.translate(
78+
'xpack.siem.detectionEngine.createRule.filterLabel.isNotBetweenOperatorOptionLabel',
79+
{
80+
defaultMessage: 'is not between',
81+
}
82+
),
6583
type: esFilters.FILTERS.RANGE,
6684
negate: true,
6785
fieldTypes: ['number', 'date', 'ip'],
6886
};
6987

7088
export const existsOperator = {
71-
message: i18n.translate('data.filter.filterEditor.existsOperatorOptionLabel', {
72-
defaultMessage: 'exists',
73-
}),
89+
message: i18n.translate(
90+
'xpack.siem.detectionEngine.createRule.filterLabel.existsOperatorOptionLabel',
91+
{
92+
defaultMessage: 'exists',
93+
}
94+
),
7495
type: esFilters.FILTERS.EXISTS,
7596
negate: false,
7697
};
7798

7899
export const doesNotExistOperator = {
79-
message: i18n.translate('data.filter.filterEditor.doesNotExistOperatorOptionLabel', {
80-
defaultMessage: 'does not exist',
81-
}),
100+
message: i18n.translate(
101+
'xpack.siem.detectionEngine.createRule.filterLabel.doesNotExistOperatorOptionLabel',
102+
{
103+
defaultMessage: 'does not exist',
104+
}
105+
),
82106
type: esFilters.FILTERS.EXISTS,
83107
negate: true,
84108
};

0 commit comments

Comments
 (0)