WebStorm Vue-i18n, anyway to get editor autocompletion support?

时间:2018-03-22 23:24:12

标签: intellij-idea webstorm vue-i18n

I'm localizing a webapp using vue-i18n. Is there anyway to get WebStorm to recognize strings in a function prefixed with $t as a dot notation path reference?

$t('messages.some.key')

in my en.js file which looks like:

exports defaults {
   messages: {
      some: {
        key: "Foo"
      }
   }
}

It would be nice if it provided me with autocomplete and also syntax highlighting if the key doesn't exist.

1 个答案:

答案 0 :(得分:0)

古老的问题,但仍然没有答案...对于一直在寻找并最终在这里(例如我)的人们,同时有一个插件:https://plugins.jetbrains.com/plugin/12981-i18n-supporthttps://github.com/nyavro/i18nPlugin

有关更多信息,请参见https://kazupon.github.io/vue-i18n/guide/tooling.html#i18nplugin-intellij-platform