TranslateCode/package.json

109 lines
2.6 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"name": "vscode-translate-plugin",
"displayName": "中英文变量名翻译",
"description": "VSCode中英文变量名翻译插件支持中英互译和变量命名规范化",
"version": "0.0.1",
"publisher": "tianjianyong",
"engines": {
"vscode": "^1.85.0"
},
"categories": [
"Other"
],
"activationEvents": [
"*"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "translate.toEnglish",
"title": "翻译为英文变量名"
},
{
"command": "translate.toChinese",
"title": "翻译为中文"
}
],
"menus": {
"editor/context": [
{
"when": "editorHasSelection",
"command": "translate.toEnglish",
"group": "1_modification@1"
},
{
"when": "editorHasSelection",
"command": "translate.toChinese",
"group": "1_modification@2"
}
]
},
"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"
}
}