Add Russian (ru-RU) GUI translation (#857)

Co-authored-by: Igor Galloway <346784590+galloway-igor@users.noreply.github.com>
Co-authored-by: wang13zhe <3516637747@qq.com>
This commit is contained in:
Jeffrey
2026-10-24 14:28:25 +02:00
committed by GitHub
co-authored by Igor Galloway wang13zhe
parent 0eec316edb
commit 87761a1621
6 changed files with 1728 additions and 0 deletions
+16
View File
@@ -153,6 +153,22 @@ function Get-PluralCategory {
'ja' {
return 'other'
}
# Russian CLDR rule for whole numbers: 'one' for 1, 21, 31... (not 11), 'few' for 2-4, 22-24...
# (not 12-14), 'many' for every other count (0, 5-20, 25-30...).
'ru' {
$absoluteCount = [Math]::Abs($Count)
$lastDigit = $absoluteCount % 10
$lastTwoDigits = $absoluteCount % 100
if ($lastDigit -eq 1 -and $lastTwoDigits -ne 11) {
return 'one'
}
if ($lastDigit -ge 2 -and $lastDigit -le 4 -and ($lastTwoDigits -lt 12 -or $lastTwoDigits -gt 14)) {
return 'few'
}
return 'many'
}
# English CLDR rule: singular only for exactly 1, plural otherwise. Also correct for Dutch/German.
default {
if ($Count -eq 1) {