Skip to content

Commit

Permalink
Test also that cldr-plurals doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati committed Oct 20, 2024
1 parent d253bf1 commit 78fb78b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -465,17 +465,23 @@ jobs:
$po = $pot | & .\files-unsigned\bin\msginit.exe --input=- --output-file=- --locale="$lang"
$rule = $po -match "Plural-Forms:"
if ($rule) {
throw "Without GETTEXTCLDRDIR there shouldn't be a Plural-Forms header in the .po file for the locale $lang."
throw "Without GETTEXTCLDRDIR there shouldn't be a Plural-Forms header in the .po file for the locale $lang, but we found it: $rule"
}
Write-Output -InputObject "As expected, without GETTEXTCLDRDIR there isn't a Plural-Forms header in the .po file for the locale $lang."
$env:GETTEXTCLDRDIR = "$PWD\files-unsigned\lib\gettext"
$po = $pot | & .\files-unsigned\bin\msginit.exe --input=- --output-file=- --locale="$lang"
$rule = $po -match "Plural-Forms:"
if ('${{ steps.vars.outputs.cldr-plural-works }}' -eq 'yes') {
$env:GETTEXTCLDRDIR = "$PWD\files-unsigned\lib\gettext"
$po = $pot | & .\files-unsigned\bin\msginit.exe --input=- --output-file=- --locale="$lang"
$rule = $po -match "Plural-Forms:"
if (-not($rule)) {
throw "With GETTEXTCLDRDIR there should be a Plural-Forms header in the .po file for the locale $lang, but there isn't."
}
Write-Output -InputObject "With GETTEXTCLDRDIR there is a Plural-Forms header ($rule) in the .po file for the locale $lang."
} else {
if ($rule) {
throw "Even with GETTEXTCLDRDIR there shouldn't be a Plural-Forms header in the .po file for the locale $lang, but we found it: $rule"
}
Write-Output -InputObject "As expected, even with GETTEXTCLDRDIR there isn't a Plural-Forms header in the .po file for the locale $lang."
}
-
name: Upload unsigned files
Expand Down

0 comments on commit 78fb78b

Please sign in to comment.