Skip to content

Commit

Permalink
[i18n] fix generation scripts (#4252)
Browse files Browse the repository at this point in the history
* [i18n] fix generation scripts

Gave file permissions to the i18n scripts

Generated:
opensearch-project/dashboards-i18n#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:
#867

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

* update snapshot

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

---------

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
Signed-off-by: Qingyang(Abby) Hu <abigailhu2000@gmail.com>
Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com>
Co-authored-by: Qingyang(Abby) Hu <abigailhu2000@gmail.com>
(cherry picked from commit 92507a2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
github-actions[bot] committed Jul 28, 2023
1 parent 96d12ec commit c46fa92
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 16 deletions.
10 changes: 8 additions & 2 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
}
Empty file modified scripts/i18n_check.js
100644 → 100755
Empty file.
Empty file modified scripts/i18n_extract.js
100644 → 100755
Empty file.
Empty file modified scripts/i18n_integrate.js
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/plugins/dashboard/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export class DashboardPlugin
createSortText: 'Dashboard',
createLinkText: (
<FormattedMessage
id="opensearch-dashboards-react.tableListView.listing.createNewItemButtonLabel"
id="dashboard.tableListView.listing.createNewItemButtonLabel"
defaultMessage="{entityName}"
values={{ entityName: 'Dashboard' }}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/dev_tools/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})
);
Expand Down Expand Up @@ -173,10 +173,10 @@ function DevToolsWrapper({
{dataSourceEnabled ? (
<div className="devAppDataSourcePicker">
<EuiComboBox
aria-label={i18n.translate('devTool.devToolWrapper.DataSourceComboBoxAriaLabel', {
aria-label={i18n.translate('devTools.devToolWrapper.DataSourceComboBoxAriaLabel', {
defaultMessage: 'Select a Data Source',
})}
placeholder={i18n.translate('devTool.devToolWrapper.DataSourceComboBoxPlaceholder', {
placeholder={i18n.translate('devTools.devToolWrapper.DataSourceComboBoxPlaceholder', {
defaultMessage: 'Select a Data Source',
})}
singleSelection={{ asPlainText: true }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export const opensearchDashboards: ExpressionFunctionOpenSearchDashboards = {

inputTypes: ['opensearch_dashboards_context', 'null'],

help: i18n.translate('expressions.functions.kibana.help', {
defaultMessage: 'Gets opensearch dashboards global context',
help: i18n.translate('expressions.functions.opensearchDashboards.help', {
defaultMessage: 'Gets OpenSearch Dashboards global context',
}),

args: {},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const Overview: FC<Props> = ({ newsFetchResult, solutions, features, bran
<h2 id="osdOverviewMore__title">
<FormattedMessage
id="opensearchDashboardsOverview.more.title"
defaultMessage="Do more with Elastic"
defaultMessage="Do more with OpenSearch"
/>
</h2>
</EuiTitle>
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/telemetry/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
});
};

Expand Down
9 changes: 6 additions & 3 deletions src/plugins/visualizations/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
},
Expand Down

0 comments on commit c46fa92

Please sign in to comment.