mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-14 23:02:41 +02:00
Updated the scripts
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user