From c46fa92ab7cdd504ecc490a9be3e39556f8ed1da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 28 Jul 2023 17:31:58 +0000 Subject: [PATCH] [i18n] fix generation scripts (#4252) * [i18n] fix generation scripts Gave file permissions to the i18n scripts Generated: https://github.com/opensearch-project/dashboards-i18n/pull/25 With: ``` ./scripts/use_node scripts/i18n_extract.js --output-dir plugins/dashboards-i18n/translations/ ``` Had to fix some issues generating the scripts for example incorrect namespacing. Issue: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/867 Signed-off-by: Kawika Avilla * update snapshot Signed-off-by: Kawika Avilla --------- Signed-off-by: Kawika Avilla Signed-off-by: Qingyang(Abby) Hu Co-authored-by: Ashwin P Chandran Co-authored-by: Qingyang(Abby) Hu (cherry picked from commit 92507a222390bc0eed962599902e2f4afca8b54d) Signed-off-by: github-actions[bot] # Conflicts: # CHANGELOG.md --- .i18nrc.json | 10 ++++++++-- scripts/i18n_check.js | 0 scripts/i18n_extract.js | 0 scripts/i18n_integrate.js | 0 src/plugins/dashboard/public/plugin.tsx | 2 +- .../data/common/search/aggs/buckets/date_range_fn.ts | 2 +- src/plugins/dev_tools/public/application.tsx | 6 +++--- .../specs/opensearch_dashboards.ts | 4 ++-- .../overview/__snapshots__/overview.test.tsx.snap | 4 ++-- .../public/components/overview/overview.tsx | 2 +- src/plugins/telemetry/common/constants.ts | 2 +- src/plugins/visualizations/server/plugin.ts | 9 ++++++--- 12 files changed, 25 insertions(+), 16 deletions(-) mode change 100644 => 100755 scripts/i18n_check.js mode change 100644 => 100755 scripts/i18n_extract.js mode change 100644 => 100755 scripts/i18n_integrate.js diff --git a/.i18nrc.json b/.i18nrc.json index 64ca6528aa5e..91d3b80b80a0 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -61,11 +61,17 @@ "visTypeXy": "src/plugins/vis_type_xy", "visualizations": "src/plugins/visualizations", "visualize": "src/plugins/visualize", - "apmOss": "src/plugins/apm_oss", "usageCollection": "src/plugins/usage_collection" }, "exclude": [ - "src/legacy/ui/ui_render/ui_render_mixin.js" + "src/legacy/ui/ui_render/ui_render_mixin.js", + "src/plugins/home/public/application/components/tutorial", + "src/plugins/home/server/tutorials", + "src/core/server/rendering/views/template.tsx", + "src/plugins/data/public/search/errors/timeout_error.tsx", + "src/plugins/home/public/application/components/welcome.tsx", + "src/plugins/vis_type_timeline/server/series_functions/graphite.js", + "src/plugins/vis_type_timeseries/public/application/components/aggs/serial_diff.js" ], "translations": [] } diff --git a/scripts/i18n_check.js b/scripts/i18n_check.js old mode 100644 new mode 100755 diff --git a/scripts/i18n_extract.js b/scripts/i18n_extract.js old mode 100644 new mode 100755 diff --git a/scripts/i18n_integrate.js b/scripts/i18n_integrate.js old mode 100644 new mode 100755 diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index 229c80e663c8..f2f29d1f7a7c 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -356,7 +356,7 @@ export class DashboardPlugin createSortText: 'Dashboard', createLinkText: ( diff --git a/src/plugins/data/common/search/aggs/buckets/date_range_fn.ts b/src/plugins/data/common/search/aggs/buckets/date_range_fn.ts index 4d0265e38729..0a52e095ace4 100644 --- a/src/plugins/data/common/search/aggs/buckets/date_range_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/date_range_fn.ts @@ -91,7 +91,7 @@ export const aggDateRange = (): FunctionDefinition => ({ json: { types: ['string'], help: i18n.translate('data.search.aggs.buckets.dateRange.json.help', { - defaultMessage: 'Advanced json to include when the agg is sent to Elasticsearch', + defaultMessage: 'Advanced json to include when the agg is sent to OpenSearch', }), }, customLabel: { diff --git a/src/plugins/dev_tools/public/application.tsx b/src/plugins/dev_tools/public/application.tsx index 7066c63d9798..8c1c936de646 100644 --- a/src/plugins/dev_tools/public/application.tsx +++ b/src/plugins/dev_tools/public/application.tsx @@ -116,7 +116,7 @@ function DevToolsWrapper({ }) .catch(() => { toasts.addDanger( - i18n.translate('devTool.devToolWrapper.fetchDataSourceError', { + i18n.translate('devTools.devToolWrapper.fetchDataSourceError', { defaultMessage: 'Unable to fetch existing data sources', }) ); @@ -173,10 +173,10 @@ function DevToolsWrapper({ {dataSourceEnabled ? (
@@ -611,7 +611,7 @@ exports[`Overview without features 1`] = ` id="osdOverviewMore__title" > diff --git a/src/plugins/opensearch_dashboards_overview/public/components/overview/overview.tsx b/src/plugins/opensearch_dashboards_overview/public/components/overview/overview.tsx index 8287f3edb397..3df491b1b422 100644 --- a/src/plugins/opensearch_dashboards_overview/public/components/overview/overview.tsx +++ b/src/plugins/opensearch_dashboards_overview/public/components/overview/overview.tsx @@ -222,7 +222,7 @@ export const Overview: FC = ({ newsFetchResult, solutions, features, bran

diff --git a/src/plugins/telemetry/common/constants.ts b/src/plugins/telemetry/common/constants.ts index 626f326fc16c..f12e38f91072 100644 --- a/src/plugins/telemetry/common/constants.ts +++ b/src/plugins/telemetry/common/constants.ts @@ -42,7 +42,7 @@ export const getConfigTelemetryDesc = () => { // Can't find where it's used but copying it over from the legacy code just in case... return i18n.translate('telemetry.telemetryConfigDescription', { defaultMessage: - 'Help us improve the OpenSearch Stack by providing usage statistics for basic features. We will not share this data outside of Elastic.', + 'Help us improve the OpenSearch Stack by providing usage statistics for basic features. We will not share this data outside of OpenSearch.', }); }; diff --git a/src/plugins/visualizations/server/plugin.ts b/src/plugins/visualizations/server/plugin.ts index 1be4eaa65050..3c1453fe750c 100644 --- a/src/plugins/visualizations/server/plugin.ts +++ b/src/plugins/visualizations/server/plugin.ts @@ -83,10 +83,13 @@ export class VisualizationsPlugin defaultMessage: 'Disable visualizations bucket aggregation types', }), value: [], - description: i18n.translate('visualizations.advancedSettings.visualizeDisableBucketAgg', { - defaultMessage: `A comma-separated list of bucket aggregations' names. e.g. significant_terms, terms. + description: i18n.translate( + 'visualizations.advancedSettings.visualizeDisableBucketAgg.description', + { + defaultMessage: `A comma-separated list of bucket aggregations' names. e.g. significant_terms, terms. Deactivates the specified bucket aggregations from visualizations.`, - }), + } + ), category: ['visualization'], schema: schema.arrayOf(schema.string()), },