From fefafd516520dbfc5848557524d81fa5838d5779 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Wed, 30 Sep 2020 11:38:25 +0200 Subject: [PATCH] Improve invalid field error message at search.aggs.param_types.field (#78587) --- src/plugins/data/common/search/aggs/param_types/field.ts | 5 +++-- x-pack/plugins/translations/translations/ja-JP.json | 1 - x-pack/plugins/translations/translations/zh-CN.json | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/data/common/search/aggs/param_types/field.ts b/src/plugins/data/common/search/aggs/param_types/field.ts index 492294bdf4e5f..a0bc71ac8e156 100644 --- a/src/plugins/data/common/search/aggs/param_types/field.ts +++ b/src/plugins/data/common/search/aggs/param_types/field.ts @@ -90,9 +90,10 @@ export class FieldParamType extends BaseParamType { 'data.search.aggs.paramTypes.field.invalidSavedFieldParameterErrorMessage', { defaultMessage: - 'Saved {fieldParameter} parameter is now invalid. Please select a new field.', + 'Saved field "{fieldParameter}" is invalid for use with the "{aggType}" aggregation. Please select a new field.', values: { - fieldParameter: '"field"', + fieldParameter: fieldName, + aggType: aggConfig?.type?.title, }, } ) diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 34b8d7d11e04d..697cb501dc1b0 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -1203,7 +1203,6 @@ "data.search.aggs.metrics.uniqueCountTitle": "ユニークカウント", "data.search.aggs.otherBucket.labelForMissingValuesLabel": "欠測値のラベル", "data.search.aggs.otherBucket.labelForOtherBucketLabel": "他のバケットのラベル", - "data.search.aggs.paramTypes.field.invalidSavedFieldParameterErrorMessage": "保存した {fieldParameter} パラメーターが無効になりました。新しいフィールドを選択してください。", "data.search.aggs.paramTypes.field.requiredFieldParameterErrorMessage": "{fieldParameter} は必須パラメーターです", "data.search.aggs.percentageOfLabel": "{label} の割合", "data.search.aggs.string.customLabel": "カスタムラベル", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 1f6bee41b747d..fc5b1f012ce9d 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -1204,7 +1204,6 @@ "data.search.aggs.metrics.uniqueCountTitle": "唯一计数", "data.search.aggs.otherBucket.labelForMissingValuesLabel": "缺失值的标签", "data.search.aggs.otherBucket.labelForOtherBucketLabel": "其他存储桶的标签", - "data.search.aggs.paramTypes.field.invalidSavedFieldParameterErrorMessage": "保存的 {fieldParameter} 参数现在无效。请选择新字段。", "data.search.aggs.paramTypes.field.requiredFieldParameterErrorMessage": "{fieldParameter} 是必需字段", "data.search.aggs.percentageOfLabel": "{label} 的百分比", "data.search.aggs.string.customLabel": "定制标签",