From ae37ab8e51eb38d7f18e1bab571120e6e07e99cf Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 13:14:24 -0700 Subject: [PATCH] [Follow-up] Fix extraction script (#4895) (#4998) * fix-script * fix additional script errors --------- (cherry picked from commit 4e1c370412622b1ed5f03577014efaf50e98bdda) Signed-off-by: Sirazh Gabdullin Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../components/doc_views/context/utils/use_query_actions.ts | 2 +- .../application/components/doc_views/single_doc_app.tsx | 2 +- .../application/view_components/utils/index_pattern_helper.ts | 4 ++-- .../vis_type_vega/public/expressions/line_vega_spec_fn.ts | 2 +- .../visualizations/public/embeddable/visualize_embeddable.ts | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/discover/public/application/components/doc_views/context/utils/use_query_actions.ts b/src/plugins/discover/public/application/components/doc_views/context/utils/use_query_actions.ts index 2b96707daf56..8d4276aaaf2f 100644 --- a/src/plugins/discover/public/application/components/doc_views/context/utils/use_query_actions.ts +++ b/src/plugins/discover/public/application/components/doc_views/context/utils/use_query_actions.ts @@ -131,7 +131,7 @@ export function useQueryActions(anchorId: string, indexPattern: IndexPattern) { })); } toastNotifications.addDanger({ - title: i18n.translate('discover.context.unableToLoadDocumentDescription', { + title: i18n.translate('discover.context.unableToLoadSurroundingDocumentDescription', { defaultMessage: 'Unable to fetch surrounding documents', }), text: 'fail', diff --git a/src/plugins/discover/public/application/components/doc_views/single_doc_app.tsx b/src/plugins/discover/public/application/components/doc_views/single_doc_app.tsx index 071e87586862..4fca5e130738 100644 --- a/src/plugins/discover/public/application/components/doc_views/single_doc_app.tsx +++ b/src/plugins/discover/public/application/components/doc_views/single_doc_app.tsx @@ -52,7 +52,7 @@ export function SingleDocApp() { ...getRootBreadcrumbs(), { text: i18n.translate('discover.single.breadcrumb', { - defaultMessage: `${index}#${docId}`, + defaultMessage: '{index}#{docId}', values: { index, docId, diff --git a/src/plugins/discover/public/application/view_components/utils/index_pattern_helper.ts b/src/plugins/discover/public/application/view_components/utils/index_pattern_helper.ts index d6285594367e..2db2b6111868 100644 --- a/src/plugins/discover/public/application/view_components/utils/index_pattern_helper.ts +++ b/src/plugins/discover/public/application/view_components/utils/index_pattern_helper.ts @@ -76,9 +76,9 @@ export function resolveIndexPattern( if (stateVal && !stateValFound) { const warningTitle = i18n.translate('discover.valueIsNotConfiguredIndexPatternIDWarningTitle', { - defaultMessage: '{stateVal} is not a configured index pattern ID', + defaultMessage: '{id} is not a configured index pattern ID', values: { - stateVal: `"${stateVal}"`, + id: `"${stateVal}"`, }, }); diff --git a/src/plugins/vis_type_vega/public/expressions/line_vega_spec_fn.ts b/src/plugins/vis_type_vega/public/expressions/line_vega_spec_fn.ts index 63ea59114052..f07a4daa5e34 100644 --- a/src/plugins/vis_type_vega/public/expressions/line_vega_spec_fn.ts +++ b/src/plugins/vis_type_vega/public/expressions/line_vega_spec_fn.ts @@ -47,7 +47,7 @@ export const createLineVegaSpecFn = ( name: 'line_vega_spec', type: 'string', inputTypes: ['opensearch_dashboards_datatable'], - help: i18n.translate('visTypeVega.function.help', { + help: i18n.translate('visTypeVega.function.helpSpec', { defaultMessage: 'Construct line vega spec', }), args: { diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts b/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts index 28c0048cdedc..605c88067211 100644 --- a/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts +++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts @@ -577,7 +577,8 @@ export class VisualizeEmbeddable const { toasts } = getNotifications(); toasts.addError(err, { title: i18n.translate('visualizations.renderVisTitle', { - defaultMessage: `Error loading data on the ${this.vis.title} chart`, + defaultMessage: 'Error loading data on the {visTitle} chart', + values: { visTitle: this.vis.title }, }), toastMessage: ' ', id: this.id,