From b218619b2bd465ffe609258203194dd7a5b9510f Mon Sep 17 00:00:00 2001 From: stax76 Date: Mon, 15 Jul 2024 06:39:02 +0200 Subject: [PATCH] Try fixing auto/action/workflow build --- lang/create-mo-files.ps1 | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/lang/create-mo-files.ps1 b/lang/create-mo-files.ps1 index 36aff85..899d10d 100644 --- a/lang/create-mo-files.ps1 +++ b/lang/create-mo-files.ps1 @@ -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" @@ -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