translation using NGettext.Wpf

This commit is contained in:
stax76
2023-12-08 06:23:17 +01:00
parent 8997a2eacb
commit 5dd3716012
73 changed files with 3001 additions and 17699 deletions

33
lang/create-mo-files.ps1 Normal file
View File

@@ -0,0 +1,33 @@
$PoFiles = Get-ChildItem $PSScriptRoot/po
$ExeFolder = "$PSScriptRoot/../src/MpvNet.Windows/bin/Debug"
function CreateFolder
{
param($path)
if (-not (Test-Path $path))
{
mkdir $path
}
if (-not (Test-Path $path))
{
throw
}
}
foreach ($it in $PoFiles)
{
$folder = "$ExeFolder/Locale/$($it.BaseName)/LC_MESSAGES"
CreateFolder $folder
$moPath = Resolve-Path $folder/mpvnet.mo
msgfmt --output-file=$moPath $it.FullName
if ($LASTEXITCODE -ne 0)
{
throw
}
$moPath
}