elastic / template-kibana-plugin

sao.js template for kibana plugins
Apache License 2.0
64 stars 34 forks source link

Does translation affect plugin itself? #21

Open pea3nut opened 6 years ago

pea3nut commented 6 years ago

Hello,

I add some translation file in ./index.js like that:

uiExports: {
      translations: [
        resolve(__dirname, './translations/en.json'),
        resolve(__dirname, './translations/zh.json'),
        resolve(__dirname, './translations/zh-TW.json')
      ],
}

I found that the key of UI-WELCOME_MESSAGE has affected the loading message.

But when I use orther key in index.html like this:

<h1>{{ 'msg' | translate }}</h1>

The en.json:

{
  "UI-WELCOME_MESSAGE": "LoadingKKKKKKKKK",
  "msg": "hello",
}

It shows me like this:


msg


The key of UI-WELCOME_MESSAGE is effective but msg is not, why?