{ "name": "vscode-translate-plugin", "displayName": "中英文变量名翻译", "description": "VSCode中英文变量名翻译插件,支持中英互译和变量命名规范化", "version": "0.0.1", "publisher": "tianjianyong", "engines": { "vscode": "^1.60.0" }, "categories": [ "Other" ], "activationEvents": [ "onCommand:translate.toEnglish", "onCommand:translate.toChinese" ], "main": "./out/extension.js", "contributes": { "commands": [ { "command": "translate.toEnglish", "title": "翻译为英文变量名" }, { "command": "translate.toChinese", "title": "翻译为中文" } ], "menus": { "editor/context": [ { "when": "editorHasSelection", "command": "translate.toEnglish", "group": "translation" }, { "when": "editorHasSelection", "command": "translate.toChinese", "group": "translation" } ] }, "configuration": { "title": "中英文变量名翻译", "properties": { "translate.namingConvention": { "type": "string", "default": "camelCase", "enum": [ "camelCase", "PascalCase", "snake_case" ], "description": "变量命名规范" }, "translate.translationService": { "type": "string", "default": "google", "enum": [ "google", "baidu" ], "description": "翻译服务提供商" }, "translate.baiduAppId": { "type": "string", "default": "", "description": "百度翻译API的AppID" }, "translate.baiduSecretKey": { "type": "string", "default": "", "description": "百度翻译API的密钥" } } }, "keybindings": [ { "command": "translate.toEnglish", "key": "ctrl+alt+e", "mac": "cmd+alt+e", "when": "editorHasSelection" }, { "command": "translate.toChinese", "key": "ctrl+alt+c", "mac": "cmd+alt+c", "when": "editorHasSelection" } ] }, "scripts": { "vscode:prepublish": "npm run compile", "compile": "tsc -p ./", "watch": "tsc -watch -p ./" }, "devDependencies": { "@types/node": "^20.10.5", "@types/node-fetch": "^2.6.12", "@types/vscode": "^1.85.0", "typescript": "^5.3.3" }, "dependencies": { "@types/axios": "^0.9.36", "@vitalets/google-translate-api": "^9.2.0", "axios": "^1.8.2", "crypto": "^1.0.1" } }