-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
335 lines (335 loc) · 10.8 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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
{
"name": "json-i18n-key",
"displayName": "Json I18n Key",
"description": "A Visual Studio Code extension to help you manage translation keys in JSON files.",
"author": "Hamada Sayed",
"publisher": "hsayed",
"version": "0.4.0",
"engines": {
"vscode": "^1.93.0"
},
"categories": [
"Programming Languages"
],
"icon": "icon.png",
"activationEvents": [
"onStartupFinished"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "json-i18n-key.findKey",
"title": "Find Translation Key in i18n JSON files",
"category": "Json I18n Key"
},
{
"command": "json-i18n-key.addKey",
"title": "Add Translation Key",
"category": "Json I18n Key"
},
{
"command": "json-i18n-key.checkExistKey",
"title": "Check Exist Translation Key",
"category": "Json I18n Key"
},
{
"command": "json-i18n-key.renameKey",
"title": "Rename Translation Key",
"category": "Json I18n Key"
},
{
"command": "json-i18n-key.removeKey",
"title": "Remove Translation Key",
"category": "Json I18n Key"
},
{
"command": "json-i18n-key.updateKey",
"title": "Update Translation Key",
"category": "Json I18n Key"
},
{
"command": "json-i18n-key.searchKey",
"title": "Search Translation Key",
"category": "Json I18n Key"
},
{
"command": "json-i18n-key.cleanupUnusedKeys",
"title": "Cleanup Unused Translation Keys",
"category": "Json I18n Key"
},
{
"command": "json-i18n-key.copyKey",
"title": "Copy Translation Key",
"category": "Json I18n Key"
}
],
"configuration": {
"type": "object",
"title": "Json I18n Key",
"properties": {
"json-i18n-key.translationFiles": {
"scope": "resource",
"type": "array",
"description": "Define the paths to translation files for multiple languages.",
"default": [
{
"lang": "en",
"filePath": "",
"isDefault": true
},
{
"lang": "ar",
"filePath": "",
"isDefault": false
}
],
"items": {
"type": "object",
"properties": {
"lang": {
"type": "string",
"description": "Language code, e.g., 'en', 'ar', 'fr'."
},
"filePath": {
"type": "string",
"description": "Path to the translation file for the specified language."
},
"isDefault": {
"type": "boolean",
"description": "Whether this is the default translation file."
}
},
"required": [
"lang",
"filePath",
"isDefault"
]
}
},
"json-i18n-key.typeOfGetKey": {
"type": "string",
"description": "Type of getting the translation key.",
"default": "Selection",
"enum": [
"Selection",
"Clipboard",
"Manual"
],
"enumDescriptions": [
"Get the translation key from the selected text.",
"Get the translation key from the clipboard.",
"Manually enter the translation key."
]
},
"json-i18n-key.enableCopilotTranslation": {
"type": "boolean",
"description": "Enable Copilot AI Translation.",
"default": true
},
"json-i18n-key.preserveFormating": {
"type": "boolean",
"description": "Preserve formatting when saving.",
"default": false
},
"json-i18n-key.overrideKeyIfExistsWhenAdding": {
"type": "boolean",
"description": "Override the key if it already exists when adding a new key.",
"default": false
},
"json-i18n-key.overrideKeyIfExistsWhenUpdating": {
"type": "boolean",
"description": "Override the key if it already exists when updating key.",
"default": true
},
"json-i18n-key.keyFormat": {
"type": "string",
"description": "Format of the json keys.",
"default": "None",
"enum": [
"None",
"PascalCase",
"camelCase",
"snake_case",
"kebab-case"
],
"enumDescriptions": [
"None of the following formats.",
"Use PascalCase (e.g., MyJsonKey).",
"Use camelCase (e.g., myJsonKey).",
"Use snake_case (e.g., my_json_key).",
"Use kebab-case (e.g., my-json-key)."
]
},
"json-i18n-key.autoDetectTranslations": {
"type": "boolean",
"default": true,
"description": "Enable auto-detection of i18n translation files within the project."
},
"json-i18n-key.suggestExistingKeys": {
"type": "boolean",
"description": "Suggest existing keys for reuse when adding new ones.",
"default": false
},
"json-i18n-key.suggestSimilarKeysIfTheSameExist": {
"type": "boolean",
"description": "Suggest similar keys if the same key exists when adding new ones.",
"default": false
},
"json-i18n-key.scanFilePatterns": {
"type": "array",
"description": "File patterns to scan for translation key usage",
"default": [
"**/*.{ts,js,tsx,jsx,vue,html}"
],
"items": {
"type": "string"
}
},
"json-i18n-key.excludePatterns": {
"type": "array",
"description": "Patterns to exclude from scanning",
"default": [
"**/node_modules/**",
"**/dist/**"
],
"items": {
"type": "string"
}
},
"json-i18n-key.updateReferencesOnRename": {
"type": "boolean",
"default": true,
"description": "Automatically update key references in code when renaming translation keys"
}
}
},
"capabilities": {
"codeActionProvider": {
"languages": [
"typescript",
"javascript",
"html"
],
"actions": [
"quickfix"
]
}
},
"keybindings": [
{
"command": "json-i18n-key.findKey",
"key": "ctrl+shift+k",
"mac": "cmd+shift+k",
"when": "editorTextFocus"
},
{
"command": "json-i18n-key.addKey",
"key": "ctrl+shift+a",
"mac": "cmd+shift+a",
"when": "editorTextFocus"
},
{
"command": "json-i18n-key.checkExistKey",
"key": "ctrl+shift+t",
"mac": "cmd+shift+t",
"when": "editorTextFocus"
},
{
"command": "json-i18n-key.renameKey",
"key": "ctrl+shift+r",
"mac": "cmd+shift+r",
"when": "editorTextFocus"
}
]
},
"bugs": {
"url": "https://github.com/hsayed21/json-i18n-key/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/hsayed21/json-i18n-key.git"
},
"keywords": [
"json",
"i18n",
"key",
"translation",
"internationalization",
"localization"
],
"scripts": {
"vscode:prepublish": "npm 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": "npm run compile-tests && npm run compile && npm run lint",
"lint": "eslint src",
"test": "vscode-test",
"clean:vsix": "powershell -Command \"Remove-Item *.vsix -Force -ErrorAction SilentlyContinue\"",
"release": "npm run clean:vsix && release-it --ci --config .config\\\\.release-it.js\\ && vsce package && release-it --ci --no-npm --no-increment --github.release --github.update --github.assets='*${version}.vsix' --github.releaseNotes=\"npx auto-changelog --commit-limit false --template \\\".config\\\\template.hbs\\\" --handlebars-setup \\\".config\\\\setup.js\\\" --stdout\" --no-github.draft --no-git.tag --no-git.commit --no-git.push",
"minor": "npm run clean:vsix && release-it --config .config\\\\.release-it.js\\ -i minor && vsce package && release-it --no-npm --no-increment --no-git --github.release --github.update --github.assets='*${version}.vsix' --github.releaseNotes=\"npx auto-changelog --commit-limit false --template \\\".config\\\\template.hbs\\\" --handlebars-setup \\\".config\\\\setup.js\\\" --stdout\" --no-github.draft --no-git.tag --no-git.commit --no-git.push",
"major": "npm run clean:vsix && release-it --config .config\\\\.release-it.js\\ -i major && vsce package && release-it --no-npm --no-increment --no-git --github.release --github.update --github.assets='*${version}.vsix' --github.releaseNotes=\"npx auto-changelog --commit-limit false --template \\\".config\\\\template.hbs\\\" --handlebars-setup \\\".config\\\\setup.js\\\" --stdout\" --no-github.draft --no-git.tag --no-git.commit --no-git.push",
"prepare": "husky install"
},
"devDependencies": {
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@release-it/conventional-changelog": "^9.0.3",
"@types/mocha": "^10.0.7",
"@types/node": "20.x",
"@types/vscode": "^1.93.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
"auto-changelog": "^2.5.0",
"eslint": "^9.9.1",
"husky": "^8.0.0",
"release-it": "^17.10.0",
"ts-loader": "^9.5.1",
"typescript": "^5.5.4",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"jsonpath-plus": "^10.3.0"
},
"release-it": {
"git": {
"commitMessage": "chore: release v${version}",
"requireCleanWorkingDir": false,
"changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs"
},
"hooks": {
"after:npm:bump": "npx auto-changelog -p"
},
"github": {
"release": true,
"releaseName": "v${version}"
},
"npm": {
"publish": false
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": {
"name": "conventionalcommits",
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{}
]
}
}
}
}
}