Ajout de la langue anglaise

Ajout d'un README.md avec le descriptif et les instructions
L'ancien README.md s'appelle désormais CHANGELOG.md
Activation du pavé numérique par défaut pour les installations sans assistance
Nouveau design pour la fenêtre de déploiement.
Ajout de paramètre pour pouvoir procéder à une installation totalement automatisée
Ajout de paramètre pour copier au choix sources, drivers ou les deux sur C:\DeployVenter avant leur usage par DISM.
This commit is contained in:
benoit committed 2026-10-18 04:14:17 +02:00
1 parent cb917c97ce
commit 2212e25d31
26 files changed
+2625 -830

No files matched your search

+55
View File
@@ -0,0 +1,55 @@
# DeployCenter - localize application text using the current WinPE language.
$script:DeployCenterLocale = 'fr-FR'
$script:DeployCenterText = @{}
function Initialize-DeployCenterLocalization {
[CmdletBinding()]
param([AllowNull()][string]$CultureName = [Globalization.CultureInfo]::CurrentUICulture.Name)
$culture = if ([string]::IsNullOrWhiteSpace($CultureName)) { 'fr-FR' } else { $CultureName }
$localeName = if ($culture.StartsWith('fr', [StringComparison]::OrdinalIgnoreCase)) { 'fr-FR' } else { 'en-US' }
$resourcePath = Join-Path $PSScriptRoot (Join-Path '..' (Join-Path 'Locales' ($localeName + '.psd1')))
$resourcePath = [IO.Path]::GetFullPath($resourcePath)
if (-not (Test-Path -LiteralPath $resourcePath -PathType Leaf)) {
throw "Localization resource not found: $resourcePath"
}
$resource = Import-PowerShellDataFile -LiteralPath $resourcePath
$script:DeployCenterLocale = $localeName
$script:DeployCenterText = $resource.Strings
return $localeName
}
function Get-DeployCenterText {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)][AllowEmptyString()][string]$Text,
[AllowEmptyCollection()][object[]]$FormatArguments = @()
)
$localized = $Text
if ($script:DeployCenterText.ContainsKey($Text)) {
$localized = [string]$script:DeployCenterText[$Text]
} else {
foreach ($key in @($script:DeployCenterText.Keys | Sort-Object { $_.Length } -Descending)) {
if ($Text.StartsWith([string]$key, [StringComparison]::Ordinal)) {
$localized = [string]$script:DeployCenterText[$key] + $Text.Substring(([string]$key).Length)
break
}
}
}
if ($FormatArguments.Count -gt 0) {
return [string]::Format([Globalization.CultureInfo]::CurrentCulture, $localized, $FormatArguments)
}
return $localized
}
function ConvertTo-DeployCenterLocalizedLogMessage {
[CmdletBinding()]
param([Parameter(Mandatory=$true)][AllowEmptyString()][string]$Message)
return Get-DeployCenterText -Text $Message
}
Export-ModuleMember -Function Initialize-DeployCenterLocalization, Get-DeployCenterText, ConvertTo-DeployCenterLocalizedLogMessage