|
|
|
@ -68,7 +68,7 @@ $WorkData = $(if (Test-Path $RecorDB) { |
|
|
|
Get-Content $RecorDB | ConvertFrom-Json |
|
|
|
Get-Content $RecorDB | ConvertFrom-Json |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
"" |
|
|
|
"" |
|
|
|
}) | Select-Object ID, WorkName, TargetName, DestinName, Season, Episode, Latinization, Standard |
|
|
|
}) | Select-Object ID, WorkName, TargetName, DestinName, Latinization, Standard, Season, Episode |
|
|
|
$RecorDB |
|
|
|
$RecorDB |
|
|
|
|
|
|
|
|
|
|
|
# 確認資料狀態,缺少則進行物件資料建立 |
|
|
|
# 確認資料狀態,缺少則進行物件資料建立 |
|
|
|
@ -92,7 +92,7 @@ $Latinization = { |
|
|
|
param($String) |
|
|
|
param($String) |
|
|
|
|
|
|
|
|
|
|
|
# 載入置換檔 |
|
|
|
# 載入置換檔 |
|
|
|
$C = if (Test-path $PSScriptRoot\C2E.csv) {Import-Csv -Encoding UTF8 $PSScriptRoot\C2E.csv} |
|
|
|
$C = if ($WorkData.Standard -and (Test-path $PSScriptRoot\C2E.csv)) {Import-Csv -Encoding UTF8 $PSScriptRoot\C2E.csv} |
|
|
|
|
|
|
|
|
|
|
|
if ($WorkData.Latinization.Length -eq 0) { |
|
|
|
if ($WorkData.Latinization.Length -eq 0) { |
|
|
|
$T = Read-Host "請輸入拉丁化作品名稱" |
|
|
|
$T = Read-Host "請輸入拉丁化作品名稱" |
|
|
|
@ -105,7 +105,7 @@ $Latinization = { |
|
|
|
$RuleString = $RuleString + $Matches[0] |
|
|
|
$RuleString = $RuleString + $Matches[0] |
|
|
|
$TString = $TString -replace $Matches[0], '-' |
|
|
|
$TString = $TString -replace $Matches[0], '-' |
|
|
|
} |
|
|
|
} |
|
|
|
return $String -replace $RuleString, $T |
|
|
|
return ($String -replace "$RuleString\s?", "$T ").Trim() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
$WorkData |
|
|
|
$WorkData |
|
|
|
|