From 758245e0215eb11b92e4c49cebcd0256a901236c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Uhrbach?= Date: Fri, 8 Mar 2024 20:28:45 +0100 Subject: [PATCH] Renamed command "Translate from ... to ..." to "Translate to ... from ..." --- CHANGELOG.md | 2 +- README.md | 4 ++-- package.json | 10 +++++----- src/commands.ts | 2 +- src/constants.ts | 2 +- src/extension.ts | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13a31aa..f1e6858 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### 1.1.0 -- Removed the command "Translate from ... to ... below original text" +- Removed the command "Translate to ... from ... below original text" - Added new configuration `deepl.configuration` to specify whether the selected text should be replaced with the translation result or inserted into a new line below/above - Added the command "Deepl: Translate and paste from clipboard" which allows to translate the clipboard content and paste it. - Show warning message if translation result equals the original text with actions to resolve this conflict. diff --git a/README.md b/README.md index 577bb42..e1b8b16 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The following commands are available to translate texts: |---|---|--- |DeepL: Translate|alt+t|Translates the selected text into the last used target language |DeepL: Translate to ...|alt+shift+t|Asks for the target language and translates the selected text into the target language -|DeepL: Translate from ... to ...|alt+ctrl+shift+t|Asks for source and target language and translates the selected text from the source language into the target language +|DeepL: Translate to ... from ...|alt+ctrl+shift+t|Asks for source and target language and translates the selected text from the source language into the target language |DeepL: Translate and paste from clipboard|ctrl+shift+v|Translates the clipboard content and paste it |DeepL: Duplicate and translate|ctrl+shift+d|Duplicates and translates the selected text @@ -74,7 +74,7 @@ Dont use this extension if you dont agree with their privacy policy! ### 1.1.0 -- Removed the command "Translate from ... to ... below original text" +- Removed the command "Translate to ... from ... below original text" - Added new configuration `deepl.configuration` to specify whether the selected text should be replaced with the translation result or inserted into a new line below/above - Added the command "Deepl: Translate and paste from clipboard" which allows to translate the clipboard content and paste it. - Show warning message if translation result equals the original text with actions to resolve this conflict. diff --git a/package.json b/package.json index 42b423e..814d304 100644 --- a/package.json +++ b/package.json @@ -198,9 +198,9 @@ "shortTitle": "Translate to ..." }, { - "command": "deepl.translateFromTo", - "title": "DeepL: Translate from ... to ...", - "shortTitle": "Translate from ..." + "command": "deepl.translateToFrom", + "title": "DeepL: Translate to ... from ...", + "shortTitle": "Translate to ... from ..." }, { "command": "deepl.configure", @@ -232,7 +232,7 @@ }, { "when": "editorHasSelection && !isInDiffEditor", - "command": "deepl.translateFromTo", + "command": "deepl.translateToFrom", "group": "deepl@3" } ] @@ -249,7 +249,7 @@ "key": "shift+alt+t" }, { - "command": "deepl.translateFromTo", + "command": "deepl.translateToFrom", "when": "editorHasSelection && !isInDiffEditor", "key": "ctrl+shift+alt+t", "mac": "cmd+shift+alt+t" diff --git a/src/commands.ts b/src/commands.ts index ff60358..561f841 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -134,7 +134,7 @@ export const translateTo = createTranslateSelectionsCommand({ forceTargetLanguagePrompt: true, forceSourceLanguagePrompt: false }); -export const translateFromTo = createTranslateSelectionsCommand({ +export const translateToFrom = createTranslateSelectionsCommand({ forceTargetLanguagePrompt: true, forceSourceLanguagePrompt: true }); diff --git a/src/constants.ts b/src/constants.ts index 7b4ca90..164fb0f 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -20,7 +20,7 @@ export const EXTENSION_IDENTIFIER = 'soerenuhrbach.vscode-deepl'; export const COMMAND_CONFIGURE = 'deepl.configure'; export const COMMAND_TRANSLATE = 'deepl.translate'; export const COMMAND_TRANSLATE_TO = 'deepl.translateTo'; -export const COMMAND_TRANSLATE_FROM_TO = 'deepl.translateFromTo'; +export const COMMAND_TRANSLATE_FROM_TO = 'deepl.translateToFrom'; export const COMMAND_TRANSLATE_AND_PASTE_FROM_CLIPBOARD = 'deepl.translateAndPasteFromClipboard'; export const COMMAND_DUPLICATE_AND_TRANSLATE = 'deepl.duplicateAndTranslate'; export const COMMAND_SET_TARGET_LANGAUGE = 'deepl.setTargetLanguage'; \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index bca04b6..de0ba2e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,7 +1,7 @@ import * as vscode from 'vscode'; import { setup } from './state'; import { createStatusBarItem } from './status-bar'; -import { configureSettings, translate, translateFromTo, translateTo, translateAndPasteFromClipboard, setTargetLangauge, duplicateAndTranslate } from './commands'; +import { configureSettings, translate, translateToFrom, translateTo, translateAndPasteFromClipboard, setTargetLangauge, duplicateAndTranslate } from './commands'; import { COMMAND_CONFIGURE, COMMAND_TRANSLATE, COMMAND_TRANSLATE_FROM_TO, COMMAND_TRANSLATE_TO, COMMAND_TRANSLATE_AND_PASTE_FROM_CLIPBOARD, COMMAND_SET_TARGET_LANGAUGE, COMMAND_DUPLICATE_AND_TRANSLATE } from './constants'; export async function activate(context: vscode.ExtensionContext) { @@ -11,7 +11,7 @@ export async function activate(context: vscode.ExtensionContext) { context.subscriptions.push(vscode.commands.registerCommand(COMMAND_CONFIGURE, configureSettings)); context.subscriptions.push(vscode.commands.registerCommand(COMMAND_TRANSLATE, translate)); context.subscriptions.push(vscode.commands.registerCommand(COMMAND_TRANSLATE_TO, translateTo)); - context.subscriptions.push(vscode.commands.registerCommand(COMMAND_TRANSLATE_FROM_TO, translateFromTo)); + context.subscriptions.push(vscode.commands.registerCommand(COMMAND_TRANSLATE_FROM_TO, translateToFrom)); context.subscriptions.push(vscode.commands.registerCommand(COMMAND_TRANSLATE_AND_PASTE_FROM_CLIPBOARD, translateAndPasteFromClipboard)); context.subscriptions.push(vscode.commands.registerCommand(COMMAND_SET_TARGET_LANGAUGE , setTargetLangauge)); context.subscriptions.push(vscode.commands.registerCommand(COMMAND_DUPLICATE_AND_TRANSLATE , duplicateAndTranslate));