Skip to content

docs(vscode): i18n support of configurations and commands with zh-CN #5330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 43 additions & 49 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,14 @@
"contributes": {
"jsonValidation": [
{
"fileMatch": "tsconfig.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
},
{
"fileMatch": "tsconfig-*.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
},
{
"fileMatch": "tsconfig.*.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
},
{
"fileMatch": "jsconfig.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
},
{
"fileMatch": "jsconfig-*.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
},
{
"fileMatch": "jsconfig.*.json",
"fileMatch": [
"tsconfig.json",
"tsconfig.*.json",
"tsconfig-*.json",
"jsconfig.json",
"jsconfig.*.json",
"jsconfig-*.json"
],
"url": "./dist/schemas/vue-tsconfig.schema.json"
}
],
Expand Down Expand Up @@ -252,7 +239,7 @@
"verbose"
],
"default": "off",
"description": "Traces the communication between VS Code and the language server."
"markdownDescription": "%configuration.trace.server%"
},
"vue.server.includeLanguages": {
"type": "array",
Expand All @@ -261,17 +248,18 @@
},
"default": [
"vue"
]
],
"markdownDescription": "%configuration.server.includeLanguages%"
},
"vue.doctor.status": {
"type": "boolean",
"default": true,
"description": "Show known problems in status bar."
"markdownDescription": "%configuration.doctor.status%"
},
"vue.splitEditors.icon": {
"type": "boolean",
"default": false,
"description": "Show split editor icon in title area of editor."
"markdownDescription": "%configuration.splitEditors.icon%"
},
"vue.splitEditors.layout.left": {
"type": "array",
Expand All @@ -282,7 +270,8 @@
"script",
"scriptSetup",
"styles"
]
],
"markdownDescription": "%configuration.splitEditors.layout.left%"
},
"vue.splitEditors.layout.right": {
"type": "array",
Expand All @@ -292,22 +281,23 @@
"default": [
"template",
"customBlocks"
]
],
"markdownDescription": "%configuration.splitEditors.layout.right%"
},
"vue.codeActions.enabled": {
"type": "boolean",
"default": true,
"description": "Enabled code actions."
"markdownDescription": "%configuration.codeActions.enabled%"
},
"vue.codeActions.askNewComponentName": {
"type": "boolean",
"default": true,
"description": "Ask for new component name when extract component."
"markdownDescription": "%configuration.codeActions.askNewComponentName%"
},
"vue.codeLens.enabled": {
"type": "boolean",
"default": true,
"description": "Enabled code lens."
"markdownDescription": "%configuration.codeLens.enabled%"
},
"vue.complete.casing.tags": {
"type": "string",
Expand All @@ -324,7 +314,7 @@
"<PascalCase>"
],
"default": "autoPascal",
"description": "Preferred tag name case."
"markdownDescription": "%configuration.complete.casing.tags%"
},
"vue.complete.casing.props": {
"type": "string",
Expand All @@ -341,59 +331,62 @@
":camelCase=\"...\""
],
"default": "autoKebab",
"description": "Preferred attr name case."
"markdownDescription": "%configuration.complete.casing.props%"
},
"vue.complete.defineAssignment": {
"type": "boolean",
"default": true,
"description": "Auto add `const props = ` before `defineProps` when selecting the completion item `props`. (also `emit` and `slots`)"
"markdownDescription": "%configuration.complete.defineAssignment%"
},
"vue.autoInsert.dotValue": {
"type": "boolean",
"default": false,
"description": "Auto-complete Ref value with `.value`."
"markdownDescription": "%configuration.autoInsert.dotValue%"
},
"vue.autoInsert.bracketSpacing": {
"type": "boolean",
"default": true,
"description": "Auto add space between double curly brackets: {{|}} -> {{ | }}"
"markdownDescription": "%configuration.autoInsert.bracketSpacing%"
},
"vue.inlayHints.destructuredProps": {
"type": "boolean",
"default": false,
"markdownDescription": "Show inlay hints for destructured props:\n\n```ts\nwatch(() => /* props. */foo, () => { ... });\n```"
"markdownDescription": "%configuration.inlayHints.destructuredProps%"
},
"vue.inlayHints.missingProps": {
"type": "boolean",
"default": false,
"markdownDescription": "Show inlay hints for missing required props:\n\n```html\n<Comp />\n<!-- ^ foo! -->\n```"
"markdownDescription": "%configuration.inlayHints.missingProps%"
},
"vue.inlayHints.inlineHandlerLeading": {
"type": "boolean",
"default": false,
"markdownDescription": "Show inlay hints for event argument in inline handlers:\n\n```html\n<Comp @foo=\"/* $event => */console.log($event)\" />\n```"
"markdownDescription": "%configuration.inlayHints.inlineHandlerLeading%"
},
"vue.inlayHints.optionsWrapper": {
"type": "boolean",
"default": false,
"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```"
"markdownDescription": "%configuration.inlayHints.optionsWrapper%"
},
"vue.inlayHints.vBindShorthand": {
"type": "boolean",
"default": false,
"markdownDescription": "Show inlay hints for v-bind shorthand:\n\n```html\n<Comp :foo />\n <!-- ^ =\"foo\" -->\n```"
"markdownDescription": "%configuration.inlayHints.vBindShorthand%"
},
"vue.format.template.initialIndent": {
"type": "boolean",
"default": true
"default": true,
"markdownDescription": "%configuration.format.template.initialIndent%"
},
"vue.format.style.initialIndent": {
"vue.format.script.initialIndent": {
"type": "boolean",
"default": false
"default": false,
"markdownDescription": "%configuration.format.script.initialIndent%"
},
"vue.format.script.initialIndent": {
"vue.format.style.initialIndent": {
"type": "boolean",
"default": false
"default": false,
"markdownDescription": "%configuration.format.style.initialIndent%"
},
"vue.format.wrapAttributes": {
"type": "string",
Expand All @@ -406,24 +399,25 @@
"aligned-multiple",
"preserve",
"preserve-aligned"
]
],
"markdownDescription": "%configuration.format.wrapAttributes%"
}
}
},
"commands": [
{
"command": "vue.action.restartServer",
"title": "Restart Vue and TS servers",
"title": "%command.action.restartServer%",
"category": "Vue"
},
{
"command": "vue.action.doctor",
"title": "Doctor",
"title": "%command.action.doctor%",
"category": "Vue"
},
{
"command": "vue.action.splitEditors",
"title": "Split <script>, <template>, <style> Editors",
"title": "%command.action.splitEditors%",
"category": "Vue",
"icon": "images/split-editors.png"
}
Expand Down
29 changes: 29 additions & 0 deletions extensions/vscode/package.nls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"configuration.trace.server": "Traces the communication between VS Code and the language server.",
"configuration.includeLanguages": "Configure the languages for which the extension should be activated.",
"configuration.doctor.status": "Show known problems in status bar.",
"configuration.splitEditors.icon": "Show split editor icon in title area of editor.",
"configuration.splitEditors.layout.left": "Blocks in the left split editor.",
"configuration.splitEditors.layout.right": "Blocks in the right split editor.",
"configuration.codeActions.enabled": "Enable code actions.",
"configuration.codeActions.askNewComponentName": "Ask for new component name when extract component.",

"configuration.codeLens.enabled": "Enable code lens.",
"configuration.complete.casing.tags": "Preferred tag name case.",
"configuration.complete.casing.props": "Preferred attr name case.",
"configuration.complete.defineAssignment": "Auto add `const props = ` before `defineProps` when selecting the completion item `props`. (also `emit` and `slots`)",
"configuration.autoInsert.dotValue": "Auto-complete Ref value with `.value`.",
"configuration.autoInsert.bracketSpacing": "Auto add space between double curly brackets: `{{|}}` -> `{{ | }}`",
"configuration.inlayHints.destructuredProps": "Show inlay hints for destructured props:\n\n```ts\nwatch(() => /* props. */foo, () => { ... });\n```",
"configuration.inlayHints.missingProps": "Show inlay hints for missing required props:\n\n```html\n<Comp />\n<!-- ^ foo! -->\n```",
"configuration.inlayHints.inlineHandlerLeading": "Show inlay hints for event argument in inline handlers:\n\n```html\n<Comp @foo=\"/* $event => */console.log($event)\" />\n```",
"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```",
"configuration.inlayHints.vBindShorthand": "Show inlay hints for v-bind shorthand:\n\n```html\n<Comp :foo />\n <!-- ^ =\"foo\" -->\n```",
"configuration.format.template.initialIndent": "Initial indent for `<template>` block.",
"configuration.format.script.initialIndent": "Initial indent for `<script>` block.",
"configuration.format.style.initialIndent": "Initial indent for `<style>` block.",
"configuration.format.wrapAttributes": "Wrap attributes.",
"command.action.restartServer": "Restart Vue and TS servers",
"command.action.doctor": "Doctor",
"command.action.splitEditors": "Split <script>, <template>, <style> Editors"
}
29 changes: 29 additions & 0 deletions extensions/vscode/package.nls.zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"configuration.trace.server": "跟踪 VS Code 和 Vue 语言服务器之间的通信。",
"configuration.includeLanguages": "配置扩展需要激活的语言类型。",
"configuration.doctor.status": "在状态栏显示已知问题。",
"configuration.splitEditors.icon": "在选项卡栏显示拆分编辑器图标",
"configuration.splitEditors.layout.left": "位于左侧拆分编辑器的块。",
"configuration.splitEditors.layout.right": "位于右侧拆分编辑器的块。",
"configuration.codeActions.enabled": "启用代码操作。",
"configuration.codeActions.askNewComponentName": "提取组件时询问新组件名称。",

"configuration.codeLens.enabled": "启用代码透镜。",
"configuration.complete.casing.tags": "首选标签命名格式。",
"configuration.complete.casing.props": "首选属性命名格式。",
"configuration.complete.defineAssignment": "当选择补全项 `props` 时,自动在 `defineProps` 前添加 `const props = `(也包括 `emit` 和 `slots`)。",
"configuration.autoInsert.dotValue": "当键入响应式变量时,自动补全 `.value`。",
"configuration.autoInsert.bracketSpacing": "在双花括号之间自动添加空格: `{{|}}` -> `{{ | }}`",
"configuration.inlayHints.destructuredProps": "显示解构 props 的嵌入提示:\n\n```ts\nwatch(() => /* props. */foo, () => { ... });\n```",
"configuration.inlayHints.missingProps": "显示缺失的必要属性的嵌入提示:\n\n```html\n<Comp />\n<!-- ^ foo! -->\n```",
"configuration.inlayHints.inlineHandlerLeading": "显示内联事件处理参数的嵌入提示:\n\n```html\n<Comp @foo=\"/* $event => */console.log($event)\" />\n```",
"configuration.inlayHints.optionsWrapper": "显示默认导出的组件选项包装器的嵌入提示:\n\n```vue\n<script lang=\"ts\">\nexport default /* (await import('vue')).defineComponent( */{}/* ) */;\n</script>\n```",
"configuration.inlayHints.vBindShorthand": "显示 v-bind 简写的嵌入提示:\n\n```html\n<Comp :foo />\n <!-- ^ =\"foo\" -->\n```",
"configuration.format.template.initialIndent": "`<template>` 块的初始缩进。",
"configuration.format.script.initialIndent": "`<script>` 块的初始缩进。",
"configuration.format.style.initialIndent": "`<style>` 块的初始缩进。",
"configuration.format.wrapAttributes": "对属性进行换行。",
"command.action.restartServer": "重启 Vue 和 TS 服务器",
"command.action.doctor": "项目诊断",
"command.action.splitEditors": "拆分 <script>, <template>, <style> 编辑器"
}