Skip to content

Commit

Permalink
[7.x] [i18n] move translations into NP plugin (#39177) (#39664)
Browse files Browse the repository at this point in the history
* new platform xpack plugin

* update env snapshot

* update all snapshots

* plugin service tests

* fix scripts/check_ts_projects.js

* update i18nrc

* run i18n_check
  • Loading branch information
Bamieh authored Jun 26, 2019
1 parent f0fcee6 commit f3742b8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
"exclude": ["src/legacy/ui/ui_render/ui_render_mixin.js"],
"translations": [
"x-pack/legacy/plugins/translations/translations/zh-CN.json",
"x-pack/legacy/plugins/translations/translations/ja-JP.json"
"x-pack/plugins/translations/translations/zh-CN.json",
"x-pack/plugins/translations/translations/ja-JP.json"
]
}
2 changes: 0 additions & 2 deletions x-pack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { rollup } from './legacy/plugins/rollup';
import { siem } from './legacy/plugins/siem';
import { remoteClusters } from './legacy/plugins/remote_clusters';
import { crossClusterReplication } from './legacy/plugins/cross_cluster_replication';
import { translations } from './legacy/plugins/translations';
import { upgradeAssistant } from './legacy/plugins/upgrade_assistant';
import { uptime } from './legacy/plugins/uptime';
import { ossTelemetry } from './legacy/plugins/oss_telemetry';
Expand Down Expand Up @@ -80,7 +79,6 @@ module.exports = function (kibana) {
siem(kibana),
remoteClusters(kibana),
crossClusterReplication(kibana),
translations(kibana),
upgradeAssistant(kibana),
uptime(kibana),
ossTelemetry(kibana),
Expand Down
8 changes: 8 additions & 0 deletions x-pack/plugins/translations/kibana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "translations",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["x-pack", "translations"],
"server": true,
"ui": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/

export function translations(kibana: any) {
return new kibana.Plugin({
id: 'translations',
class TranslationsPlugin {
public setup() {
return {};
}

init() {
// There is nothing to initialize.
},
});
public start() {
return {};
}
}

export const plugin = () => new TranslationsPlugin();
1 change: 1 addition & 0 deletions x-pack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"legacy/common/**/*",
"legacy/server/**/*",
"legacy/plugins/**/*",
"plugins/**/*",
"test_utils/**/*"
],
"exclude": [
Expand Down

0 comments on commit f3742b8

Please sign in to comment.