-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.json
236 lines (236 loc) · 9.89 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
{
"name": "vscode-samge-translate",
"displayName": "Vscode Samge Translate 翻译助手",
"description": "Quickly translate text right in your code 🚀 支持多种翻译命令(英译中、中译英、中文转多规则命名变量等),支持多种结果展示方式,支持百度、腾讯、阿里等翻译引擎。",
"version": "0.0.8",
"engines": {
"vscode": "^1.85.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "samge.translate.en2zh",
"title": "Samge Translate:英译中-en2zh"
},
{
"command": "samge.translate.en2zhReplace",
"title": "Samge Translate:英译中并替换-en2zhReplace"
},
{
"command": "samge.translate.zh2en",
"title": "Samge Translate:中译英-zh2en"
},
{
"command": "samge.translate.zh2enReplace",
"title": "Samge Translate:中译英并替换-zh2enReplace"
},
{
"command": "samge.translate.zh2var",
"title": "Samge Translate:中文转变量名-zh2var"
},
{
"command": "samge.translate.zh2varCamelCase",
"title": "Samge Translate:中文转变量名-zh2var-camelCase-驼峰(小) camelCaseUtil"
},
{
"command": "samge.translate.zh2varCapitalCase",
"title": "Samge Translate:中文转变量名-zh2var-capitalCase-分词(大) Capital Case"
},
{
"command": "samge.translate.zh2varConstantCase",
"title": "Samge Translate:中文转变量名-zh2var-constantCase-常量 CONSTANT_CASE"
},
{
"command": "samge.translate.zh2varDotCase",
"title": "Samge Translate:中文转变量名-zh2var-对象属性 dot case"
},
{
"command": "samge.translate.zh2varHeaderCase",
"title": "Samge Translate:中文转变量名-zh2var-中划线(大) Header-Case"
},
{
"command": "samge.translate.zh2varNoCase",
"title": "Samge Translate:中文转变量名-zh2var-分词(小) no case"
},
{
"command": "samge.translate.zh2varParamCase",
"title": "Samge Translate:中文转变量名-zh2var-中划线(小) param-case"
},
{
"command": "samge.translate.zh2varPascalCase",
"title": "Samge Translate:中文转变量名-zh2var-驼峰(大) PascalCase"
},
{
"command": "samge.translate.zh2varPathCase",
"title": "Samge Translate:中文转变量名-zh2var-文件路径 path/case"
},
{
"command": "samge.translate.zh2varSnakeCase",
"title": "Samge Translate:中文转变量名-zh2var-下划线 snake_case"
}
],
"keybindings": [
{
"command": "samge.translate.en2zh",
"key": "alt+x",
"mac": "alt+x"
},
{
"command": "samge.translate.en2zhReplace",
"key": "ctrl+shift+alt+x",
"mac": "ctrl+shift+alt+x"
},
{
"command": "samge.translate.zh2en",
"key": "alt+z",
"mac": "alt+z"
},
{
"command": "samge.translate.zh2enReplace",
"key": "ctrl+shift+alt+z",
"mac": "ctrl+shift+alt+z"
},
{
"command": "samge.translate.zh2var",
"key": "shift+alt+w",
"mac": "shift+alt+w"
}
],
"configuration": {
"title": "Vscode Samge Translate Configuration - 翻译配置",
"properties": {
"samge.translate.enable": {
"type": "boolean",
"default": true,
"description": "Enable - 是否启用插件,Default:true"
},
"samge.translate.enableHover": {
"type": "boolean",
"default": false,
"description": "Enable Hover - 是否在鼠标悬浮时自动翻译,Default:false"
},
"samge.translate.enableOutput": {
"type": "boolean",
"default": true,
"description": "Enable OUTPUT Result - 是否在OUTPUT窗口展示,Default:true"
},
"samge.translate.enableRightDisplay": {
"type": "boolean",
"default": true,
"description": "Enable Right Display - 是否在选中文本右侧展示翻译结果,Default:true"
},
"samge.translate.languageFrom": {
"type": "string",
"default": "en",
"enum": [
"en",
"zh"
],
"description": "Translate From - 翻译源语言,Default:en"
},
"samge.translate.languageTo": {
"type": "string",
"default": "zh",
"enum": [
"en",
"zh"
],
"description": "Translate To - 翻译目标语言,Default:zh"
},
"samge.translate.providerName": {
"type": "string",
"default": "baidu",
"enum": [
"baidu",
"alibaba",
"tencent",
"volcano",
"youdao",
"deepl"
],
"description": "Translate Provider - 翻译引擎提供者,Default:baidu\n【Note】after switching the translation engine, click on other blank spaces first before, VsCode will refresh the ui\n【注意】切换翻译引擎后,先点击其他空白处,VsCode才会刷新UI"
},
"samge.translate.providerAppId": {
"type": "string",
"description": "AppId - 翻译引擎的AppId"
},
"samge.translate.providerAppSecret": {
"type": "string",
"description": "AppSecret - 翻译引擎的AppSecret"
},
"samge.translate.limitSingleMaximum": {
"type": "integer",
"default": 1000,
"description": "Maximum Single Translation Character - 单次翻译最大字符限制,超过自动截断,Default:1000"
},
"samge.translate.shortZh2var.enable": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable short phrase quick translation - 是否开启:**短词快捷翻译**\n\n若开启此选项,可按快捷键将`光标左侧连续中文词组`转为指定格式的英文,Default:false"
},
"samge.translate.shortZh2var.enableLettersAndNumbers": {
"type": "boolean",
"default": true,
"markdownDescription": "Short phrase quick translation allow letters and numbers\n\n**短词快捷翻译** - 光标左侧词组提取是否允许连续字母/数字,Default:true\n\ntrue=`中文+字母+数字`连续词组\n\nfalse=仅`中文`连续词组"
},
"samge.translate.shortZh2var.limitSingleMaximum": {
"type": "integer",
"default": 20,
"markdownDescription": "Short Phrase Quick Translate Maximum Characters Per Translation\n\n**短词快捷翻译** - 单次翻译最大字符限制,超过则提示错误信息,Default:20\n\n(这里的字母跟数字不参与字符个数计算)"
}
}
}
},
"scripts": {
"vscode:prepublish": "yarn run package",
"compile": "webpack",
"watch": "webpack --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "yarn run compile-tests && yarn run compile && yarn run lint",
"lint": "eslint src --ext ts",
"test": "vscode-test"
},
"devDependencies": {
"@types/crypto-js": "^4.2.2",
"@types/md5": "^2.3.5",
"@types/mocha": "^10.0.6",
"@types/node": "18.x",
"@types/qs": "^6.9.11",
"@types/uuid": "^9.0.8",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@vscode/test-cli": "^0.0.4",
"@vscode/test-electron": "^2.3.8",
"eslint": "^8.56.0",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"@alicloud/alimt20181012": "1.0.3",
"@alicloud/darabonba-env": "^1.0.0",
"@alicloud/openapi-client": "^0.4.1",
"@alicloud/tea-typescript": "^1.7.1",
"axios": "^1.6.7",
"crypto-js": "^4.2.0",
"md5": "^2.3.0",
"qs": "^6.11.2"
},
"repository": {
"type": "git",
"url": "https://github.com/Samge0/vscode-samge-translate.git"
},
"publisher": "Samge",
"icon": "icon.png"
}