Add French (fr-FR) GUI translation (#841)

Co-authored-by: Jeffrey <9938813+Raphire@users.noreply.github.com>
This commit is contained in:
wang13zhe
2026-10-25 01:05:20 +02:00
committed by GitHub
co-authored by Jeffrey
parent 7e179f1001
commit 3596607bc4
7 changed files with 1711 additions and 3 deletions
+15 -2
View File
@@ -29,7 +29,7 @@ Describe 'Resolve-LanguageFolder' {
@{ Case = 'an exact match'; LanguageCode = 'en-US'; Expected = 'en-US' }
@{ Case = 'a second exact match'; LanguageCode = 'es-ES'; Expected = 'es-ES' }
@{ Case = 'a language-prefix match when no exact folder exists'; LanguageCode = 'es-AR'; Expected = 'es-ES' }
@{ Case = 'an unrelated locale to the en-US fallback'; LanguageCode = 'fr-FR'; Expected = 'en-US' }
@{ Case = 'an unrelated locale to the en-US fallback'; LanguageCode = 'zz-ZZ'; Expected = 'en-US' }
) {
Resolve-LanguageFolder -LanguageCode $LanguageCode | Should -Be $Expected
}
@@ -64,7 +64,7 @@ Describe 'Import-LanguageFile' {
# so there's no real fallback to warn about here, unlike the broken-folder case below.
Mock Write-Warning {}
$lang = Import-LanguageFile -LanguageCode 'fr-FR'
$lang = Import-LanguageFile -LanguageCode 'zz-ZZ'
$lang.LanguageCode | Should -Be 'en-US'
Should -Invoke Write-Warning -Times 0 -Exactly
@@ -148,6 +148,19 @@ Describe 'Get-PluralCategory' {
Get-PluralCategory -LanguageCode 'pt-BR' -Count $Count | Should -Be $Expected
}
It 'returns <Expected> for a French count of <Count>' -ForEach @(
@{ Count = 0; Expected = 'one' }
@{ Count = 1; Expected = 'one' }
@{ Count = 2; Expected = 'other' }
@{ Count = 100; Expected = 'other' }
# CLDR puts whole millions in 'many'; this rule keeps them on 'other' on purpose,
# because the French catalogs have no '_many' keys and the loader falls back to the
# bare key rather than to '_other' when a category is missing.
@{ Count = 1000000; Expected = 'other' }
) {
Get-PluralCategory -LanguageCode 'fr-FR' -Count $Count | Should -Be $Expected
}
It 'returns <Expected> for a Russian count of <Count>' -ForEach @(
@{ Count = 0; Expected = 'many' }
@{ Count = 1; Expected = 'one' }