-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set target and default language after canceling language prompt
- Loading branch information
1 parent
efdb8cd
commit 905bb81
Showing
3 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as vscode from 'vscode'; | ||
|
||
export function getDefaultTargetLanguage(config?: vscode.WorkspaceConfiguration): string | null { | ||
config = config ?? vscode.workspace.getConfiguration('deepl'); | ||
return config.get('defaultTargetLanguage', null); | ||
} | ||
|
||
export function getDefaultSourceLanguage(config?: vscode.WorkspaceConfiguration): string | null { | ||
config = config ?? vscode.workspace.getConfiguration('deepl'); | ||
return config.get('defaultSourceLanguage', null); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters