Updated the scripts

This commit is contained in:
Markus Fleschutz
2021-01-02 10:08:59 +00:00
parent 40aad7fe73
commit 92b6c81620
29 changed files with 38 additions and 32 deletions

View File

@ -6,7 +6,9 @@
.NOTES Author: Markus Fleschutz / License: CC0
#>
param([string]$SourceFile, [string]$SourceLanguage, [string]$TargetLanguage)
param([string]$SourceFile = "", [string]$SourceLanguage = "", [string]$TargetLanguage = "")
$PathToRepo = "$PSScriptRoot/.."
try {
if ($SourceFile -eq "" ) {
@ -19,8 +21,6 @@ try {
$TargetLanguage = read-host "Enter language to translate to"
}
$PathToRepo=(get-item $MyInvocation.MyCommand.Path).directory.parent
Start-Process -FilePath "$PathToRepo/Data/trans" -ArgumentList "-i $SourceFile -s $SourceLanguage -t $TargetLanguage -e google -brief" -NoNewWindow -Wait
exit 0
} catch {