Skip to content

Commit

Permalink
Bump to 3.0.0 and add es translation (#25)
Browse files Browse the repository at this point in the history
Bumped with:
`yarn plugin-helpers version --sync legacy`

Translation file generated from root level OSD core with:
`./scripts/use_node scripts/i18n_extract.js --output-dir plugins/dashboards-i18n/translations/`

To test:
* Clone this repo into `OSD core/plugins`
* `yarn osd bootstrap`
* Start OpenSearch with `yarn opensearch snapshot`
* Start OpenSearch Dashboards with `yarn start --i18n.locale=es`

Appended to some string with `x` to verify working functionality.

Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla authored Jun 7, 2023
1 parent 5d6f62e commit 522d680
Show file tree
Hide file tree
Showing 6 changed files with 3,697 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"paths": {
"i18nDashboards": "."
},
"translations": []
"translations": ["translations/es.json"]
}
6 changes: 3 additions & 3 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"id": "i18nDashboards",
"version": "2.1.0.0",
"opensearchDashboardsVersion": "2.1.0",
"version": "3.0.0.0",
"opensearchDashboardsVersion": "3.0.0",
"server": true,
"ui": false,
"requiredPlugins": [],
"optionalPlugins": []
}
}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "i18n-dashboards",
"version": "2.1.0.0",
"version": "3.0.0.0",
"description": "plugin for opensearch-dashboards translation",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "node ../../scripts/eslint .",
"update-version": "node scripts/update_opensearch_dashboards_version.js"
"lint": "../../scripts/use_node ../../scripts/eslint .",
"update-version": "../../scripts/use_node scripts/update_opensearch_dashboards_version.js",
"plugin-helpers": "../../scripts/use_node ../../scripts/plugin_helpers"
},
"repository": {
"type": "git",
Expand All @@ -19,4 +20,4 @@
"url": "https://github.com/opensearch-project/dashboards-i18n/issues"
},
"homepage": "https://github.com/opensearch-project/dashboards-i18n#readme"
}
}
5 changes: 5 additions & 0 deletions scripts/update_opensearch_dashboards_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

const fs = require('fs');
const path = require('path');

Expand Down
3 changes: 2 additions & 1 deletion server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
import { I18nDashboardsPluginSetup, I18nDashboardsPluginStart } from './types';
import { defineRoutes } from './routes';

export class I18nDashboardsPlugin implements Plugin<I18nDashboardsPluginSetup, I18nDashboardsPluginStart> {
export class I18nDashboardsPlugin
implements Plugin<I18nDashboardsPluginSetup, I18nDashboardsPluginStart> {
private readonly logger: Logger;

constructor(initializerContext: PluginInitializerContext) {
Expand Down
Loading

0 comments on commit 522d680

Please sign in to comment.