Feature/pt-BR-translation (#768)

Co-authored-by: 2ButAqUxVy <2ButAqUxVy@users.noreply.github.com>
Co-authored-by: YWZsaXRv <YWZsaXRv@users.noreply.github.com>
This commit is contained in:
2ButAqUxVy
2026-10-01 21:47:54 +02:00
committed by GitHub
co-authored by 2ButAqUxVy YWZsaXRv
parent 6feebba878
commit 68e2a7e385
4 changed files with 1149 additions and 0 deletions
+13
View File
@@ -105,6 +105,19 @@ function Get-PluralCategory {
$languagePrefix = ($LanguageCode -split '-')[0].ToLowerInvariant()
switch ($languagePrefix) {
# Portuguese CLDR rule: 'one' for 0 and 1, 'many' for positive multiples
# of 1,000,000, and 'other' for every remaining count.
'pt' {
if ($Count -le 1) {
return 'one'
}
if ($Count % 1000000 -eq 0) {
return 'many'
}
return 'other'
}
# English CLDR rule: singular only for exactly 1, plural otherwise. Also correct for Dutch/German.
default {
if ($Count -eq 1) {