Skip to content

aussieboi/vue-i18n-ally

Β 
Β 

Repository files navigation

logo

Vue i18n Ally

🌍 Better Vue i18n experiences with VSCode

Visual Studio Marketplace Version Visual Studio Marketplace Downloads Visual Studio Marketplace Installs

⚑ Features

  • Inline annotation
  • i18n key autocomplete
  • Friendly UI for managing locales
  • One-click machine translation
  • Extract text from code
  • JSON and YAML supported
  • Multi-root workspace
  • Translating progress
  • Supporting both vue-i18n, vuex-i18n and vue-i18next

βš™ Installation

  1. Install vue-i18n package if you haven't yet. npm i vue-i18n or yarn add vue-i18n
  2. Install this extension
  3. locales path will be detected automatically. You can also configure it manually. There are two ways to do that:
    • Open Command Palette (Ctrl-Shift-P or βŒ˜β‡§P), type Vue i18n Ally: Manual configure locales path then press enter and follow the guide.
    • Modify the settings.json file of your VSCode, adding vue-i18n-ally.localesPath manually.

πŸ“‚ Directory structure

You can have locales directory structured like this

  locales         # you can specify the folder path in the settings
  β”œβ”€β”€ en.json
  β”œβ”€β”€ de-DE.json
  β”œβ”€β”€ zh-CN.yaml  # YAML is also supported
  β”œβ”€β”€ zh-TW.yaml
  β”œβ”€β”€ ...
  └── <contry-code>.json

or

  locales
  β”œβ”€β”€ en
  |   β”œβ”€β”€ common.json
  |   β”œβ”€β”€ buttons.json
  |   β”œβ”€β”€ ...
  |   └── <filenames>.json
  β”œβ”€β”€ de-DE
  |   β”œβ”€β”€ common.json
  |   β”œβ”€β”€ buttons.json
  |   └── ...
  └── <contry-code>
      β”œβ”€β”€ common.json
      β”œβ”€β”€ buttons.json
      └── ...

Currently we support json or yaml as your locales file type.

If you would like use different file formats or directory structures, it welcome to open an issue or pull request.

πŸ“… TODO

  • Machine translating
  • Locales Tree
  • Translating progress
  • Workspace support
  • Underscore for i18n keys?
  • YAML support
  • $tc, $d, $n, v-t support
  • Hide/Show specific locales
  • Screenshots
  • Language flags
  • Vue inlined locales support
  • Source language indicator
  • Analysis report
  • JSON/YAML file annonation & hint
  • Annoation config (on/off, maxlength)
  • Force enabled on non-vue-i18n project
  • i18n for the plugin itself
  • .js locales
  • tests

πŸ‘¨β€πŸ’» Credits

This extension is original forked from think2011/vscode-vue-i18n, it can't be existed without @think2011's great work.

License

MIT License Β© 2019 Anthony Fu

MIT License Β© 2018-2019 think2011

About

🌍 Better Vue i18n experiences with VSCode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 78.0%
  • JavaScript 10.4%
  • Vue 10.1%
  • CSS 1.5%