Skip to content

Commit

Permalink
Try fixing auto/action/workflow build
Browse files Browse the repository at this point in the history
  • Loading branch information
stax76 committed Jul 15, 2024
1 parent ae80076 commit b218619
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions lang/create-mo-files.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@ $ErrorActionPreference = 'Stop'
$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"
Expand All @@ -29,6 +14,12 @@ foreach ($it in $PoFiles)
}

$moPath = "$folder/mpvnet.mo"

if (-not (Test-Path $moPath))
{
New-Item -ItemType File -Path $moPath | Out-Null
}

msgfmt --output-file=$moPath $it.FullName
if ($LastExitCode) { throw $LastExitCode }
$moPath
Expand Down

0 comments on commit b218619

Please sign in to comment.