-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rename due to plugin naming convention * I18n is a self maintained repo and won't have a lot of updates except translation files. Currently, OpenSearch Dashboards requests all plugins to match its version. Therefore, we add a script to update version in opensearch_dashboards.json automatically. Issue Resolve opensearch-project/opensearch-plugins#174 Signed-off-by: Anan Zhuang <[email protected]>
- Loading branch information
Showing
13 changed files
with
70 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"prefix": "i18nPlugin", | ||
"prefix": "i18nDashboards", | ||
"paths": { | ||
"i18nPlugin": "." | ||
"i18nDashboards": "." | ||
}, | ||
"translations": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"id": "i18nPlugin", | ||
"id": "i18nDashboards", | ||
"version": "2.1.0.0", | ||
"opensearchDashboardsVersion": "2.1.0", | ||
"server": true, | ||
"ui": false, | ||
"requiredPlugins": [], | ||
"optionalPlugins": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
{ | ||
"name": "i18n-plugin", | ||
"name": "i18n-dashboards", | ||
"version": "2.1.0.0", | ||
"description": "plugin for opensearch-dashboards translation", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"lint": "node ../../scripts/eslint ." | ||
"lint": "node ../../scripts/eslint .", | ||
"update-version": "node scripts/update_opensearch_dashboards_version.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/opensearch-project/i18n-plugin.git" | ||
"url": "git+https://github.com/opensearch-project/dashboards-i18n.git" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/opensearch-project/i18n-plugin/issues" | ||
"url": "https://github.com/opensearch-project/dashboards-i18n/issues" | ||
}, | ||
"homepage": "https://github.com/opensearch-project/i18n-plugin#readme" | ||
} | ||
"homepage": "https://github.com/opensearch-project/dashboards-i18n#readme" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const packageJson = require('../../../package.json'); | ||
console.log(packageJson.version); | ||
const opensearchDashboardsJsonPath = path.join(__dirname, '..', 'opensearch_dashboards.json'); | ||
|
||
// Read the existing opensearch_dashboards.json file | ||
const opensearchDashboardsJson = JSON.parse(fs.readFileSync(opensearchDashboardsJsonPath, 'utf8')); | ||
|
||
// Update the opensearchDashboardsVersion value | ||
opensearchDashboardsJson.opensearchDashboardsVersion = packageJson.version; | ||
|
||
// Write the updated JSON back to the file | ||
fs.writeFileSync(opensearchDashboardsJsonPath, JSON.stringify(opensearchDashboardsJson, null, 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters