0.3.0 • Published 2 years ago
vocabhelper v0.3.0
Vocab Helper
Helper extension for the Vocab i18n framework.
WARNING: This is still a work in progress. Use with caution.
How to install
To install the extension, visit the extension page and click install.
Alternatively, search for Vocab helper
in the extensions tab of VSCode and install it from there.
If you have previously installed the addon via a .vsix
file from the releases page, please uninstall the addon
and re-install the version from the VSCode marketplace. The versions in the releases section of the github page are now out of date.
From now on all versions of the addon will be published to the vscode marketplace.
Features
- Copy a string directly into the nearest
translations.json
file, wrapping the string with thet
translation hook - Automatically create a
translations.json
and/or.vocab
folder if they don't already exist - Automatically import vocab if it's not already imported
- Open the nearest translations file relative to the current component
Commands
This extension contributes the following commands:
vocabHelper.extractTranslationString
(default hotkey Ctrl + Alt + T on Windows/Linux, Ctrl + Option + T on MacOS): extract the currently highlighted string into the nearesttranslations.json
file, creating the file if necessaryvocabHelper.openTranslationsFile
: open thetranslations.json
file for the current component
Configuration
vocabHelper.maxTranslationKeyLength
: Truncate translation keys longer than a specified maximum lengthvocabHelper.formatAfterReplace
: Format the current document after replacing the highlighted translation string
Release Notes
See CHANGELOG.md
Contributing
Running the extension locally
- Clone the repo
- Run
yarn
to install dependencies - Run the
Extension Tests
launch configuration to make sure everything is working - Run the
Run Extension
launch config to start a separate VSCode instance that's running the extension code from your local repo