Skip to content

Commit

Permalink
perf: better config zh desc
Browse files Browse the repository at this point in the history
  • Loading branch information
oeyoews committed Oct 3, 2024
1 parent e0bb680 commit ca33707
Show file tree
Hide file tree
Showing 40 changed files with 118 additions and 114 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"registry": "https://registry.npmjs.org"
},
"license": "MIT",
"version": "2.3.1",
"version": "2.3.2",
"packageManager": "[email protected]",
"scripts": {
"update:config": " pnpm ts-node scripts/generateConfig.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/lang-tiddlywiki/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lang-tiddlywiki",
"version": "2.3.1",
"version": "2.3.2",
"description": "",
"scripts": {
"build": "cm-buildhelper src/tiddlywiki.ts"
Expand Down
98 changes: 51 additions & 47 deletions src/tiddlywiki-codemirror-6/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ function defineConfig<T extends Object, K extends keyof T>(
export const tiddlers = defineConfig({
useSound: {
caption: {
zh: '使用声音',
zh: '开启音效',
en: 'Use Sound'
},
text: 'no',
description: {
zh: '由插件 [[oeyoews/neotw-play-sound|https://neotw.vercel.app/#%24%3A%2Fplugins%2Foeyoews%2Fneotw-play-sound]] 提供声音支持',
zh: '由插件 [[oeyoews/neotw-play-sound|https://neotw.vercel.app/#%24%3A%2Fplugins%2Foeyoews%2Fneotw-play-sound]] 提供声音支持, 默认关闭',
en: 'Use Sound'
}
},
Expand All @@ -78,35 +78,24 @@ export const tiddlers = defineConfig({
en: 'Max Lines'
}
},
foldByIndent: {
caption: {
zh: '按缩进折叠',
en: 'Fold By Indent'
},
category: 'fold'
},
foldGutter: {
caption: {
zh: '折叠',
zh: '折叠按钮图标',
en: 'Fold Gutter'
},
icon: '📂',
category: 'fold',
description: {
zh: '为代码启用折叠。',
zh: '在编辑器行号右侧显示折叠按钮图标',
en: 'Enable folding gutter for code.'
}
},
removeOutline: {
text: 'yes',
foldByIndent: {
caption: {
en: 'remove editor outline',
zh: '移除编辑器边框'
zh: '按缩进折叠',
en: 'Fold By Indent'
},
description: {
en: 'remove editor outline',
zh: '移除编辑器边框(配置待修复, 更改配置无效, 默认是移除)'
}
category: 'fold'
},
// disableCM6: {
// caption: {
Expand All @@ -121,7 +110,7 @@ export const tiddlers = defineConfig({
},
text: 'yes',
description: {
zh: '自动换行',
zh: '自动换行, 建议开启',
en: 'Line Wrapping'
}
},
Expand Down Expand Up @@ -155,7 +144,11 @@ export const tiddlers = defineConfig({
en: 'Insert Mode Auto Firstly'
},
category: 'vim',
text: 'no'
text: 'no',
description: {
zh: 'VIM模式下新建tiddler自动进入插入模式',
en: 'Insert Mode Auto Firstly'
}
},
// matchText: {
// caption: {
Expand Down Expand Up @@ -194,7 +187,7 @@ export const tiddlers = defineConfig({
text: 'yes',
icon: '🚀',
description: {
zh: '关闭后,可以 `CTRL+SPACE` 手动触发',
zh: '关闭后,可以 <kbd>CTRL+SPACE</kbd> 手动触发',
en: 'Enable activation on typing for enhanced functionality.'
}
},
Expand Down Expand Up @@ -223,12 +216,12 @@ export const tiddlers = defineConfig({
},
snippetPreview: {
caption: {
zh: '代码片段预览',
zh: '/ 预览文本',
en: 'Snippet Preview'
},
icon: '📝',
description: {
zh: '启用代码片段的预览。',
zh: '启用 `/` 代码片段的预览。',
en: 'Enable preview for code snippets.'
}
},
Expand Down Expand Up @@ -326,13 +319,13 @@ export const tiddlers = defineConfig({
// },
onedark: {
caption: {
zh: '启用 One Dark 主题',
zh: '黑暗模式下启用编辑器黑暗样式',
en: 'Enable One Dark Theme'
},
text: 'yes',
icon: '🌒',
description: {
zh: '启用 One Dark 主题。',
zh: '黑暗模式下启用编辑器黑暗样式',
en: 'Enable the One Dark theme.'
}
},
Expand All @@ -355,7 +348,7 @@ export const tiddlers = defineConfig({
},
icon: '🖱️',
description: {
zh: '可以在编辑区域内看到一个可以点击的图标',
zh: '可以在编辑区域内看到一个可以点击的图标 <kbd>CTRL+click</kbd>',
en: 'Enable clickability.'
}
},
Expand Down Expand Up @@ -416,7 +409,7 @@ export const tiddlers = defineConfig({
text: '/',
icon: '🔍',
description: {
zh: '显示代码片段(注意不要设置和其他的触发符号相同导致冲突, 配置生效需要重启tiddlywiki)',
zh: '显示代码片段(注意不要设置和其他的触发符号相同导致冲突, 配置生效需要__重启__tiddlywiki)',
en: 'Set the delimiter for certain operations.'
}
},
Expand Down Expand Up @@ -488,6 +481,18 @@ export const tiddlers = defineConfig({
en: 'Indent with tab instead of spaces.'
}
},
tabSize: {
caption: {
zh: '制表符大小',
en: 'Tab Size'
},
text: 2,
icon: '🔍',
description: {
zh: '设置制表符的大小。',
en: 'Set the size of tabs.'
}
},
bracketMatching: {
caption: {
zh: '括号匹配',
Expand Down Expand Up @@ -534,20 +539,20 @@ export const tiddlers = defineConfig({
text: 1,
icon: '📏',
description: {
zh: '设置自动补全最小长度。1为立刻触发',
zh: '设置自动补全最小长度。1为立刻触发, 一般不建议修改',
en: 'Set the minimum length for input.'
}
},
selectOnOpen: {
caption: {
zh: '自动选择补全项',
zh: '自动选中当前补全项',
en: 'Select on Open'
},
text: 'yes',
category: 'completion',
icon: '🔄',
description: {
zh: '自动选择补全项',
zh: '自动选中当前补全项进行补全',
en: 'Automatically select on open.'
}
},
Expand Down Expand Up @@ -612,28 +617,16 @@ export const tiddlers = defineConfig({
en: 'Highlight the active line for better visibility.'
}
},
tabSize: {
caption: {
zh: '制表符大小',
en: 'Tab Size'
},
text: 2,
icon: '🔍',
description: {
zh: '设置制表符的大小。',
en: 'Set the size of tabs.'
}
},
enableTWMode: {
caption: {
zh: 'tw 语法高亮(实验性)',
en: 'tw systax highlight (experimental)'
zh: 'wikitext 语法高亮(实验性)',
en: 'wikitext systax highlight (experimental)'
},
text: 'yes',
icon: '',
description: {
zh: 'tw 语法高亮(实验性)',
en: 'tw systax highlight (experimental)'
zh: 'wikitext 语法高亮(实验性)',
en: 'wikitexttw systax highlight (experimental)'
}
},
todobox: {
Expand Down Expand Up @@ -662,6 +655,17 @@ export const tiddlers = defineConfig({
zh: '启用从右到左的文本方向(中文不建议开启)',
en: 'Enable Right-to-Left text direction.'
}
},
removeOutline: {
text: 'yes',
caption: {
en: 'remove editor outline',
zh: '移除编辑器边框'
},
description: {
en: 'remove editor outline',
zh: '移除编辑器边框(配置待修复, 更改配置无效, 默认是移除)'
}
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/tiddlywiki-codemirror-6/plugin.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "$:/plugins/oeyoews/tiddlywiki-codemirror-6",
"name": "CodeMirror6",
"description": "CodeMirror 6 editor",
"version": "2.3.1",
"version": "2.3.2",
"core-version": ">=5.3.4",
"list": "readme usage"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ caption-zh: {{$:/language/codemirror6/zh/activateOnTyping/caption}}
description: {{$:/language/codemirror6/activateOnTyping/description}}
description-zh: {{$:/language/codemirror6/zh/activateOnTyping/description}}
settings-template: $:/plugins/oeyoews/tiddlywiki-codemirror-6/ui/templates/settings/input-switch
id: 10
id: 9
settings-group: general

yes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ caption-zh: {{$:/language/codemirror6/zh/checkbox/caption}}
description: {{$:/language/codemirror6/checkbox/description}}
description-zh: {{$:/language/codemirror6/zh/checkbox/description}}
settings-template: $:/plugins/oeyoews/tiddlywiki-codemirror-6/ui/templates/settings/input-switch
id: 45
id: 44
settings-group: general

no
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ caption-zh: {{$:/language/codemirror6/zh/clickable-icon/caption}}
description: {{$:/language/codemirror6/clickable-icon/description}}
description-zh: {{$:/language/codemirror6/zh/clickable-icon/description}}
settings-template: $:/plugins/oeyoews/tiddlywiki-codemirror-6/ui/templates/settings/input
id: 21
id: 20
settings-group: general

🐟
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ caption-zh: {{$:/language/codemirror6/zh/clickable/caption}}
description: {{$:/language/codemirror6/clickable/description}}
description-zh: {{$:/language/codemirror6/zh/clickable/description}}
settings-template: $:/plugins/oeyoews/tiddlywiki-codemirror-6/ui/templates/settings/input-switch
id: 22
id: 21
settings-group: general

no
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ caption-zh: {{$:/language/codemirror6/zh/closeBrackets/caption}}
description: {{$:/language/codemirror6/closeBrackets/description}}
description-zh: {{$:/language/codemirror6/zh/closeBrackets/description}}
settings-template: $:/plugins/oeyoews/tiddlywiki-codemirror-6/ui/templates/settings/input-switch
id: 30
id: 29
settings-group: general

yes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ caption-zh: {{$:/language/codemirror6/zh/closeOnBlur/caption}}
description: {{$:/language/codemirror6/closeOnBlur/description}}
description-zh: {{$:/language/codemirror6/zh/closeOnBlur/description}}
settings-template: $:/plugins/oeyoews/tiddlywiki-codemirror-6/ui/templates/settings/input-switch
id: 19
id: 18
settings-group: general

yes
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ useSound/caption: 📝 Use Sound
useSound/description: Use Sound
lines/caption: 📝 Lines
lines/description: Max Lines
foldByIndent/caption: 📝 Fold By Indent
foldByIndent/description: Fold By Indent
foldGutter/caption: 📂 Fold Gutter
foldGutter/description: Enable folding gutter for code.
removeOutline/caption: 📝 Remove editor outline
removeOutline/description: remove editor outline
foldByIndent/caption: 📝 Fold By Indent
foldByIndent/description: Fold By Indent
lineWrapping/caption: 📝 Line Wrapping
lineWrapping/description: Line Wrapping
vimmode/caption: 🎮 Vim Mode
Expand Down Expand Up @@ -62,6 +60,8 @@ closeBrackets/caption: 🔄 Close Brackets
closeBrackets/description: Automatically close brackets.
indentWithTab/caption: 🔄 Indent with Tab
indentWithTab/description: Indent with tab instead of spaces.
tabSize/caption: 🔍 Tab Size
tabSize/description: Set the size of tabs.
bracketMatching/caption: 🔄 Bracket Matching
bracketMatching/description: Enable matching of brackets.
autocompleteIcons/caption: 🎨 Autocomplete Icons
Expand All @@ -82,13 +82,13 @@ lineNumbers/caption: 🔢 Line Numbers
lineNumbers/description: Show line numbers for better code navigation.
highlightActiveLine/caption: 🔍 Highlight Active Line
highlightActiveLine/description: Highlight the active line for better visibility.
tabSize/caption: 🔍 Tab Size
tabSize/description: Set the size of tabs.
enableTWMode/caption: Tw systax highlight (experimental)
enableTWMode/description: tw systax highlight (experimental)
enableTWMode/caption: Wikitext systax highlight (experimental)
enableTWMode/description: wikitexttw systax highlight (experimental)
todobox/caption: 📝 Task checkbox
todobox/description: Task checkbox
checkbox/caption: 📝 Checkbox
checkbox/description: Checkbox
rtl/caption: ↔️ RTL
rtl/description: Enable Right-to-Left text direction.
removeOutline/caption: 📝 Remove editor outline
removeOutline/description: remove editor outline
Loading

0 comments on commit ca33707

Please sign in to comment.