Skip to content

Commit ecefdb8

Browse files
committed
docs(vscode): i18n support of configurations and commands with zh-CN (#5330)
1 parent 85d51fd commit ecefdb8

File tree

3 files changed

+101
-49
lines changed

3 files changed

+101
-49
lines changed

extensions/vscode/package.json

Lines changed: 43 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,14 @@
3737
"contributes": {
3838
"jsonValidation": [
3939
{
40-
"fileMatch": "tsconfig.json",
41-
"url": "./dist/schemas/vue-tsconfig.schema.json"
42-
},
43-
{
44-
"fileMatch": "tsconfig-*.json",
45-
"url": "./dist/schemas/vue-tsconfig.schema.json"
46-
},
47-
{
48-
"fileMatch": "tsconfig.*.json",
49-
"url": "./dist/schemas/vue-tsconfig.schema.json"
50-
},
51-
{
52-
"fileMatch": "jsconfig.json",
53-
"url": "./dist/schemas/vue-tsconfig.schema.json"
54-
},
55-
{
56-
"fileMatch": "jsconfig-*.json",
57-
"url": "./dist/schemas/vue-tsconfig.schema.json"
58-
},
59-
{
60-
"fileMatch": "jsconfig.*.json",
40+
"fileMatch": [
41+
"tsconfig.json",
42+
"tsconfig.*.json",
43+
"tsconfig-*.json",
44+
"jsconfig.json",
45+
"jsconfig.*.json",
46+
"jsconfig-*.json"
47+
],
6148
"url": "./dist/schemas/vue-tsconfig.schema.json"
6249
}
6350
],
@@ -252,7 +239,7 @@
252239
"verbose"
253240
],
254241
"default": "off",
255-
"description": "Traces the communication between VS Code and the language server."
242+
"markdownDescription": "%configuration.trace.server%"
256243
},
257244
"vue.server.includeLanguages": {
258245
"type": "array",
@@ -261,17 +248,18 @@
261248
},
262249
"default": [
263250
"vue"
264-
]
251+
],
252+
"markdownDescription": "%configuration.server.includeLanguages%"
265253
},
266254
"vue.doctor.status": {
267255
"type": "boolean",
268256
"default": true,
269-
"description": "Show known problems in status bar."
257+
"markdownDescription": "%configuration.doctor.status%"
270258
},
271259
"vue.splitEditors.icon": {
272260
"type": "boolean",
273261
"default": false,
274-
"description": "Show split editor icon in title area of editor."
262+
"markdownDescription": "%configuration.splitEditors.icon%"
275263
},
276264
"vue.splitEditors.layout.left": {
277265
"type": "array",
@@ -282,7 +270,8 @@
282270
"script",
283271
"scriptSetup",
284272
"styles"
285-
]
273+
],
274+
"markdownDescription": "%configuration.splitEditors.layout.left%"
286275
},
287276
"vue.splitEditors.layout.right": {
288277
"type": "array",
@@ -292,22 +281,23 @@
292281
"default": [
293282
"template",
294283
"customBlocks"
295-
]
284+
],
285+
"markdownDescription": "%configuration.splitEditors.layout.right%"
296286
},
297287
"vue.codeActions.enabled": {
298288
"type": "boolean",
299289
"default": true,
300-
"description": "Enabled code actions."
290+
"markdownDescription": "%configuration.codeActions.enabled%"
301291
},
302292
"vue.codeActions.askNewComponentName": {
303293
"type": "boolean",
304294
"default": true,
305-
"description": "Ask for new component name when extract component."
295+
"markdownDescription": "%configuration.codeActions.askNewComponentName%"
306296
},
307297
"vue.codeLens.enabled": {
308298
"type": "boolean",
309299
"default": true,
310-
"description": "Enabled code lens."
300+
"markdownDescription": "%configuration.codeLens.enabled%"
311301
},
312302
"vue.complete.casing.tags": {
313303
"type": "string",
@@ -324,7 +314,7 @@
324314
"<PascalCase>"
325315
],
326316
"default": "autoPascal",
327-
"description": "Preferred tag name case."
317+
"markdownDescription": "%configuration.complete.casing.tags%"
328318
},
329319
"vue.complete.casing.props": {
330320
"type": "string",
@@ -341,59 +331,62 @@
341331
":camelCase=\"...\""
342332
],
343333
"default": "autoKebab",
344-
"description": "Preferred attr name case."
334+
"markdownDescription": "%configuration.complete.casing.props%"
345335
},
346336
"vue.complete.defineAssignment": {
347337
"type": "boolean",
348338
"default": true,
349-
"description": "Auto add `const props = ` before `defineProps` when selecting the completion item `props`. (also `emit` and `slots`)"
339+
"markdownDescription": "%configuration.complete.defineAssignment%"
350340
},
351341
"vue.autoInsert.dotValue": {
352342
"type": "boolean",
353343
"default": false,
354-
"description": "Auto-complete Ref value with `.value`."
344+
"markdownDescription": "%configuration.autoInsert.dotValue%"
355345
},
356346
"vue.autoInsert.bracketSpacing": {
357347
"type": "boolean",
358348
"default": true,
359-
"description": "Auto add space between double curly brackets: {{|}} -> {{ | }}"
349+
"markdownDescription": "%configuration.autoInsert.bracketSpacing%"
360350
},
361351
"vue.inlayHints.destructuredProps": {
362352
"type": "boolean",
363353
"default": false,
364-
"markdownDescription": "Show inlay hints for destructured props:\n\n```ts\nwatch(() => /* props. */foo, () => { ... });\n```"
354+
"markdownDescription": "%configuration.inlayHints.destructuredProps%"
365355
},
366356
"vue.inlayHints.missingProps": {
367357
"type": "boolean",
368358
"default": false,
369-
"markdownDescription": "Show inlay hints for missing required props:\n\n```html\n<Comp />\n<!-- ^ foo! -->\n```"
359+
"markdownDescription": "%configuration.inlayHints.missingProps%"
370360
},
371361
"vue.inlayHints.inlineHandlerLeading": {
372362
"type": "boolean",
373363
"default": false,
374-
"markdownDescription": "Show inlay hints for event argument in inline handlers:\n\n```html\n<Comp @foo=\"/* $event => */console.log($event)\" />\n```"
364+
"markdownDescription": "%configuration.inlayHints.inlineHandlerLeading%"
375365
},
376366
"vue.inlayHints.optionsWrapper": {
377367
"type": "boolean",
378368
"default": false,
379-
"markdownDescription": "Show inlay hints for component options wrapper for type support:\n\n```vue\n<script lang=\"ts\">\nexport default /* (await import('vue')).defineComponent( */{}/* ) */;\n</script>\n```"
369+
"markdownDescription": "%configuration.inlayHints.optionsWrapper%"
380370
},
381371
"vue.inlayHints.vBindShorthand": {
382372
"type": "boolean",
383373
"default": false,
384-
"markdownDescription": "Show inlay hints for v-bind shorthand:\n\n```html\n<Comp :foo />\n <!-- ^ =\"foo\" -->\n```"
374+
"markdownDescription": "%configuration.inlayHints.vBindShorthand%"
385375
},
386376
"vue.format.template.initialIndent": {
387377
"type": "boolean",
388-
"default": true
378+
"default": true,
379+
"markdownDescription": "%configuration.format.template.initialIndent%"
389380
},
390-
"vue.format.style.initialIndent": {
381+
"vue.format.script.initialIndent": {
391382
"type": "boolean",
392-
"default": false
383+
"default": false,
384+
"markdownDescription": "%configuration.format.script.initialIndent%"
393385
},
394-
"vue.format.script.initialIndent": {
386+
"vue.format.style.initialIndent": {
395387
"type": "boolean",
396-
"default": false
388+
"default": false,
389+
"markdownDescription": "%configuration.format.style.initialIndent%"
397390
},
398391
"vue.format.wrapAttributes": {
399392
"type": "string",
@@ -406,24 +399,25 @@
406399
"aligned-multiple",
407400
"preserve",
408401
"preserve-aligned"
409-
]
402+
],
403+
"markdownDescription": "%configuration.format.wrapAttributes%"
410404
}
411405
}
412406
},
413407
"commands": [
414408
{
415409
"command": "vue.action.restartServer",
416-
"title": "Restart Vue and TS servers",
410+
"title": "%command.action.restartServer%",
417411
"category": "Vue"
418412
},
419413
{
420414
"command": "vue.action.doctor",
421-
"title": "Doctor",
415+
"title": "%command.action.doctor%",
422416
"category": "Vue"
423417
},
424418
{
425419
"command": "vue.action.splitEditors",
426-
"title": "Split <script>, <template>, <style> Editors",
420+
"title": "%command.action.splitEditors%",
427421
"category": "Vue",
428422
"icon": "images/split-editors.png"
429423
}

extensions/vscode/package.nls.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"configuration.trace.server": "Traces the communication between VS Code and the language server.",
3+
"configuration.server.includeLanguages": "Configure the languages for which the extension should be activated.",
4+
"configuration.doctor.status": "Show known problems in status bar.",
5+
"configuration.splitEditors.icon": "Show split editor icon in title area of editor.",
6+
"configuration.splitEditors.layout.left": "Blocks in the left split editor.",
7+
"configuration.splitEditors.layout.right": "Blocks in the right split editor.",
8+
"configuration.codeActions.enabled": "Enable code actions.",
9+
"configuration.codeActions.askNewComponentName": "Ask for new component name when extract component.",
10+
11+
"configuration.codeLens.enabled": "Enable code lens.",
12+
"configuration.complete.casing.tags": "Preferred tag name case.",
13+
"configuration.complete.casing.props": "Preferred attr name case.",
14+
"configuration.complete.defineAssignment": "Auto add `const props = ` before `defineProps` when selecting the completion item `props`. (also `emit` and `slots`)",
15+
"configuration.autoInsert.dotValue": "Auto-complete Ref value with `.value`.",
16+
"configuration.autoInsert.bracketSpacing": "Auto add space between double curly brackets: `{{|}}` -> `{{ | }}`",
17+
"configuration.inlayHints.destructuredProps": "Show inlay hints for destructured props:\n\n```ts\nwatch(() => /* props. */foo, () => { ... });\n```",
18+
"configuration.inlayHints.missingProps": "Show inlay hints for missing required props:\n\n```html\n<Comp />\n<!-- ^ foo! -->\n```",
19+
"configuration.inlayHints.inlineHandlerLeading": "Show inlay hints for event argument in inline handlers:\n\n```html\n<Comp @foo=\"/* $event => */console.log($event)\" />\n```",
20+
"configuration.inlayHints.optionsWrapper": "Show inlay hints for component options wrapper for type support:\n\n```vue\n<script lang=\"ts\">\nexport default /* (await import('vue')).defineComponent( */{}/* ) */;\n</script>\n```",
21+
"configuration.inlayHints.vBindShorthand": "Show inlay hints for v-bind shorthand:\n\n```html\n<Comp :foo />\n <!-- ^ =\"foo\" -->\n```",
22+
"configuration.format.template.initialIndent": "Initial indent for `<template>` block.",
23+
"configuration.format.script.initialIndent": "Initial indent for `<script>` block.",
24+
"configuration.format.style.initialIndent": "Initial indent for `<style>` block.",
25+
"configuration.format.wrapAttributes": "Wrap attributes.",
26+
"command.action.restartServer": "Restart Vue and TS servers",
27+
"command.action.doctor": "Doctor",
28+
"command.action.splitEditors": "Split <script>, <template>, <style> Editors"
29+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"configuration.trace.server": "跟踪 VS Code 和 Vue 语言服务器之间的通信。",
3+
"configuration.server.includeLanguages": "配置扩展需要激活的语言类型。",
4+
"configuration.doctor.status": "在状态栏显示已知问题。",
5+
"configuration.splitEditors.icon": "在选项卡栏显示拆分编辑器图标",
6+
"configuration.splitEditors.layout.left": "位于左侧拆分编辑器的块。",
7+
"configuration.splitEditors.layout.right": "位于右侧拆分编辑器的块。",
8+
"configuration.codeActions.enabled": "启用代码操作。",
9+
"configuration.codeActions.askNewComponentName": "提取组件时询问新组件名称。",
10+
11+
"configuration.codeLens.enabled": "启用代码透镜。",
12+
"configuration.complete.casing.tags": "首选标签命名格式。",
13+
"configuration.complete.casing.props": "首选属性命名格式。",
14+
"configuration.complete.defineAssignment": "当选择补全项 `props` 时,自动在 `defineProps` 前添加 `const props = `(也包括 `emit` 和 `slots`)。",
15+
"configuration.autoInsert.dotValue": "当键入响应式变量时,自动补全 `.value`。",
16+
"configuration.autoInsert.bracketSpacing": "在双花括号之间自动添加空格: `{{|}}` -> `{{ | }}`",
17+
"configuration.inlayHints.destructuredProps": "显示解构 props 的嵌入提示:\n\n```ts\nwatch(() => /* props. */foo, () => { ... });\n```",
18+
"configuration.inlayHints.missingProps": "显示缺失的必要属性的嵌入提示:\n\n```html\n<Comp />\n<!-- ^ foo! -->\n```",
19+
"configuration.inlayHints.inlineHandlerLeading": "显示内联事件处理参数的嵌入提示:\n\n```html\n<Comp @foo=\"/* $event => */console.log($event)\" />\n```",
20+
"configuration.inlayHints.optionsWrapper": "显示默认导出的组件选项包装器的嵌入提示:\n\n```vue\n<script lang=\"ts\">\nexport default /* (await import('vue')).defineComponent( */{}/* ) */;\n</script>\n```",
21+
"configuration.inlayHints.vBindShorthand": "显示 v-bind 简写的嵌入提示:\n\n```html\n<Comp :foo />\n <!-- ^ =\"foo\" -->\n```",
22+
"configuration.format.template.initialIndent": "`<template>` 块的初始缩进。",
23+
"configuration.format.script.initialIndent": "`<script>` 块的初始缩进。",
24+
"configuration.format.style.initialIndent": "`<style>` 块的初始缩进。",
25+
"configuration.format.wrapAttributes": "对属性进行换行。",
26+
"command.action.restartServer": "重启 Vue 和 TS 服务器",
27+
"command.action.doctor": "项目诊断",
28+
"command.action.splitEditors": "拆分 <script>, <template>, <style> 编辑器"
29+
}

0 commit comments

Comments
 (0)