Quick Start
Installation
Install from VSCode Marketplace (Recommended)
- Open VSCode
- Press
Ctrl+Shift+Xto open the Extensions panel - Search for "变量翻译助手"
- Click Install
Install from VSIX
- Download the
.vsixfile - In VSCode, press
Ctrl+Shift+P - Type "Extensions: Install from VSIX..."
- Select the downloaded
.vsixfile
Build from Source (Developers)
bash
# Clone the project
git clone https://github.com/AnsStory/hias-variable-translator.git
# Install dependencies
npm install --registry https://registry.npmmirror.com
# Compile
npm run compile
# Build
npm run buildBasic Usage
File Path Translation
- Right-click in the explorer to create a new file
- Enter a path with non-English characters, e.g.,
测试文件/test.js - Select a naming format
- File is automatically translated and created
Text Translation
- Select non-English text in the editor
- Press
Alt+Shift+T - Select a naming format
- Text is automatically replaced with English
Undo Translation
- Press
Alt+Shift+Z - Translated file is deleted
- Can undo within 1 minute
Shortcuts
| Shortcut | Function |
|---|---|
Alt+Shift+T | Translate selected text |
Alt+Shift+Z | Undo file translation |
Alt+Shift+D | Toggle file translation |
Alt+Shift+S | Switch translation service |