Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 642
blak3r Avatar asked Mar 22 '18 23:03

blak3r


1 Answers

Old question but still unanswered... For those who have been looking for it and ended up here (like me), meanwhile there is a plugin: https://plugins.jetbrains.com/plugin/12981-i18n-support (https://github.com/nyavro/i18nPlugin)

See https://kazupon.github.io/vue-i18n/guide/tooling.html#i18nplugin-intellij-platform for more information how to configure the plugin.

like image 154
Josef Reichardt Avatar answered Jan 05 '23 02:01

Josef Reichardt