-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.json
153 lines (153 loc) · 4.01 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
{
"name": "translate-variable",
"displayName": "Translate Variable",
"description": "Translate variable between en and zh-CN",
"author": "kerinlin",
"publisher": "kerinlin",
"version": "0.2.2",
"icon": "src/assets/logo.png",
"engines": {
"vscode": "^1.63.0"
},
"categories": [
"Other"
],
"keywords": [
"translate"
],
"repository": {
"type": "git",
"url": "https://github.com/Kerinlin/translate-variable"
},
"activationEvents": [
"onCommand:translateVariable.translateConfig",
"onCommand:translateVariable.toEN",
"onCommand:translateVariable.toCN",
"onStartupFinished"
],
"main": "./src/extension.js",
"contributes": {
"commands": [
{
"command": "translateVariable.translateConfig",
"title": "Config translate token"
},
{
"command": "translateVariable.toEN",
"title": "Translate to EN"
}
],
"keybindings": [
{
"key": "ctrl+t",
"mac": "cmd+t",
"when": "editorTextFocus",
"command": "translateVariable.toEN"
}
],
"configuration": {
"type": "object",
"title": "变量翻译设置",
"properties": {
"translateVariable.service": {
"type": "string",
"default": "lingva",
"enum": [
"baidu",
"youdao",
"google",
"lingva",
"bing",
"gpt"
],
"enumDescriptions": [
"百度翻译需要配置appid和key",
"有道翻译需要配置应用ID与应用秘钥",
"谷歌翻译无需配置,但是需要梯子",
"lingva,免费开源",
"bing,没有字符限制,爬DOM获取结果,不稳定",
"使用AI帮忙命名与翻译,需要配置TOKEN"
],
"description": "选择翻译服务"
},
"translateVariable.openaiToken": {
"type": "string",
"default": "",
"description": "openai API keys"
},
"translateVariable.baiduAppid": {
"type": "string",
"default": "",
"description": "百度翻译appid"
},
"translateVariable.baiduKey": {
"type": "string",
"default": "",
"description": "百度翻译key"
},
"translateVariable.youdaoID": {
"type": "string",
"default": "",
"description": "有道翻译应用ID"
},
"translateVariable.youdaoKey": {
"type": "string",
"default": "",
"description": "有道翻译应用秘钥"
},
"translateVariable.isCopy": {
"type": "boolean",
"default": "true",
"description": "是否复制翻译后的结果"
},
"translateVariable.renameMethodName": {
"type": "string",
"default": "hump",
"description": "变量命名方式",
"enum": [
"hump",
"underline",
"none"
],
"enumDescriptions": [
"驼峰命名",
"下划线命名",
"原字符"
]
},
"translateVariable.isReplace": {
"type": "boolean",
"default": "true",
"description": "是否使用翻译后的结果替换原文"
},
"translateVariable.isTransHover": {
"type": "boolean",
"default": "true",
"description": "是否开启划词翻译"
}
}
}
},
"scripts": {
"lint": "eslint .",
"pretest": "yarn run lint"
},
"devDependencies": {
"@types/glob": "^7.1.4",
"@types/mocha": "^9.0.0",
"@types/node": "14.x",
"@types/vscode": "^1.63.0",
"@vscode/test-electron": "^1.6.2",
"eslint": "^8.1.0",
"glob": "^7.1.7",
"mocha": "^9.1.3",
"typescript": "^4.4.4"
},
"dependencies": {
"@vitalets/google-translate-api": "^7.0.0",
"axios": "^0.24.0",
"cheerio": "^1.0.0-rc.12",
"md5": "^2.3.0",
"openai": "^3.2.1"
}
}