/textlint-plugin-vue-i18n

textlint plugin to extract texts from Vue i18n custom blocks

Primary LanguageTypeScriptMIT LicenseMIT

textlint-plugin-vue-i18n

npm version license

A textlint plugin to extract texts from vue-i18n custom blocks.

Install

npm i -D textlint-plugin-vue-i18n

Configuration

Add this plugin into the plugins field in the .textlintrc.

{
  "plugins": {
    "vue-i18n": {
      "locales": ["ja"],
      "resources": ["./locales/*.json"]
    }
  }
}

Options

  • locales (optional, string[]): List of locales. If you specify it, this plugin will retrieve texts only in the locales. Default: null (retrieve all locales)
  • resources (optional, string[]): List of glob patterns. If you specify it, this plugin will retrieve texts not only the i18n blocks but also specified JSON files. Default: [] (doesn't retrieve a resource)

License

MIT