Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yxw007 committed Dec 14, 2024
1 parent e8d7647 commit e551acb
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 39 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Changelog


## v0.2.12



### 💅 Refactors

- Plugin and terminal log are displayed separately to avoid reading terminal translation log

### ❤️ Contributors

- FreeCoderX <[email protected]>

## v0.2.11


Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ Download:[vscode-translate-next](https://marketplace.visualstudio.com/items?it

### ⌨️ Shortcut key

| Description | Shortcut key |
| ------------------------------------------------------------------- | --------------------- |
| The translation is selected from source language to Target language | Shift + Alt + T |
| Switch the target language | Ctrl + Alt + Shit + L |
| Switch the default translation engine | Alt + Shit + E |
| Viewing Plugin Output Logs | Alt + Shit + O |
| Cleaning the plugin output log | Alt + C |
| Translate the selected text in the terminal | Alt + ` |
| Description | Shortcut key |
| ------------------------------------------------------------------- | --------------------------------------------------------- |
| The translation is selected from source language to Target language | Shift + Alt + T |
| Switch the target language | Ctrl + Alt + Shit + L (Mac os: Command + Alt + Shift + L) |
| Switch the default translation engine | Alt + Shit + E |
| Viewing Plugin Output Logs | Ctrl + Alt + Shit + O (Mac os: Command + Alt + Shift + O) |
| Cleaning the plugin output log | Ctrl + Alt + C (Mac os: Command + Alt + C) |
| Translate the selected text in the terminal | Alt + ` |
| Clean the terminal translation log | Alt + C |
| Open the terminal translation panel | Alt + Shift + O |

Tip: If your editor environment has conflicting shortcuts, you can modify and adjust them yourself. If you forget the shortcut keys, you can use the status bar button provided in the bottom status bar to switch between the target language and the default translation engine, as shown in the following figure:

Expand Down
18 changes: 10 additions & 8 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@

### ⌨️ 快捷键

| 描述 | 快捷键 |
| ---------------- | --------------------- |
| 翻译选中文本 | Shift + Alt + T |
| 切换目标语言 | Ctrl + Alt + Shit + L |
| 切换默认翻译引擎 | Alt + Shit + E |
| 查看插件输出日志 | Alt + Shit + O |
| 清理插件输出日志 | Alt + C |
| 翻译终端选中文本 | Alt + ` |
| 描述 | 快捷键 |
| ---------------- | ---------------------------------------------------------- |
| 翻译选中文本 | Shift + Alt + T |
| 切换目标语言 | Ctrl + Alt + Shift + L (Mac os: Command + Alt + Shift + L) |
| 切换默认翻译引擎 | Alt + Shift + E |
| 查看插件输出日志 | Ctrl + Alt + Shift + O (Mac os: Command + Alt + Shift + O) |
| 清理插件输出日志 | Ctrl + Alt + C (Mac os: Command + Alt + C) |
| 翻译终端选中文本 | Alt + ` |
| 清理终端翻译日志 | Alt + C |
| 打开终端翻译面板 | Alt + Shift + O |

提示:如果你的编辑器环境,快捷键有冲突,可以自己修改调整。如果忘记快捷键,可以使用底部状态栏提供的状态栏按钮,进行目标语言和默认翻译引擎切换,如下图所示:

Expand Down
66 changes: 43 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vscode-translate-next",
"version": "0.2.11",
"version": "0.2.12",
"displayName": "vscode-translate-next",
"publisher": "yxw007",
"author": {
Expand Down Expand Up @@ -114,36 +114,36 @@
"viewsContainers": {
"activitybar": [
{
"id": "translateLogs",
"id": "translateTerminalLogs",
"title": "vscode-translate-next",
"icon": "icon.png"
}
]
},
"views": {
"translateLogs": [
"translateTerminalLogs": [
{
"type": "webview",
"id": "logView",
"id": "translateTerminalLogView",
"name": "logs"
}
]
},
"menus": {
"view/title": [
{
"command": "extension.sortLogsAsc",
"when": "view == logView",
"command": "extension.sortTerminalTranslateLogsAsc",
"when": "view == translateTerminalLogView",
"group": "navigation"
},
{
"command": "extension.sortLogsDesc",
"when": "view == logView",
"command": "extension.sortTerminalTranslateLogsDesc",
"when": "view == translateTerminalLogView",
"group": "navigation"
},
{
"command": "extension.clearLogs",
"when": "view == logView",
"command": "extension.clearTerminalTranslateLogs",
"when": "view == translateTerminalLogView",
"group": "navigation"
}
]
Expand All @@ -170,17 +170,17 @@
"title": "Set default LLM"
},
{
"command": "extension.sortLogsAsc",
"command": "extension.sortTerminalTranslateLogsAsc",
"title": "Sort Logs Asc",
"icon": "$(arrow-up)"
},
{
"command": "extension.sortLogsDesc",
"command": "extension.sortTerminalTranslateLogsDesc",
"title": "Sort Logs Desc",
"icon": "$(arrow-down)"
},
{
"command": "extension.clearLogs",
"command": "extension.clearTerminalTranslateLogs",
"title": "Clear Logs",
"icon": "$(trash)"
}
Expand Down Expand Up @@ -459,37 +459,57 @@
"command": "extension.translateText",
"key": "alt+shift+t",
"mac": "alt+shift+t",
"when": "editorTextFocus"
"when": "editorTextFocus",
"description": "Translate selections"
},
{
"command": "extension.setTargetLanguage",
"key": "ctrl+alt+shift+l",
"mac": "cmd+alt+shift+l",
"when": "editorTextFocus"
"when": "editorTextFocus",
"description": "Set target language"
},
{
"command": "extension.setDefaultEngine",
"key": "alt+shift+e",
"mac": "alt+shift+e",
"when": "editorTextFocus"
"when": "editorTextFocus",
"description": "Set default translation engine"
},
{
"command": "extension.openOutputPanel",
"key": "alt+shift+o",
"mac": "alt+shift+o",
"when": "editorTextFocus || terminalFocus"
"key": "ctrl+alt+shift+o",
"mac": "command+alt+shift+o",
"when": "editorTextFocus || terminalFocus",
"description": "open output logs panel"
},
{
"command": "extension.clearOutputPanel",
"key": "alt+c",
"mac": "alt+c",
"when": "editorTextFocus"
"key": "ctrl+alt+c",
"mac": "command+alt+c",
"when": "editorTextFocus",
"description": "clear output logs panel"
},
{
"command": "extension.openTerminalTranslateView",
"key": "alt+shift+o",
"mac": "alt+shift+o",
"when": "editorTextFocus || terminalFocus",
"description": "open terminal translate logs view"
},
{
"command": "extension.translateTerminalText",
"key": "alt+`",
"mac": "alt+`",
"when": "terminalFocus"
"when": "terminalFocus",
"description": "Translate terminal selections text"
},
{
"command": "extension.clearTerminalTranslateLogs",
"key": "alt+c",
"mac": "alt+c",
"when": "editorTextFocus || terminalFocus",
"description": "clear terminal translate logs view"
}
],
"icons": {
Expand Down

0 comments on commit e551acb

Please sign in to comment.