From 92568e977d7863a90c416c38824841e206c50415 Mon Sep 17 00:00:00 2001 From: romanitho <96626929+Romanitho@users.noreply.github.com> Date: Tue, 11 Oct 2022 10:41:35 +0200 Subject: [PATCH] Minor change on notif function --- Winget-AutoUpdate/functions/Get-NotifLocale.ps1 | 6 ++++-- Winget-AutoUpdate/winget-upgrade.ps1 | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 b/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 index 568f8e9..24b75e0 100644 --- a/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 +++ b/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 @@ -7,7 +7,7 @@ Function Get-NotifLocale { #Test if OS locale notif file exists $TestOSLocalPath = "$WorkingDir\locale\$($OSLocale.Name).xml" - + #Set OS Local if file exists if (Test-Path $TestOSLocalPath) { $LocaleDisplayName = $OSLocale.DisplayName @@ -20,7 +20,9 @@ Function Get-NotifLocale { } #Get locale XML file content - Write-Log "Notification Level: $($WAUConfig.WAU_NotificationLevel). Notification Language: $LocaleDisplayName" "Cyan" [xml]$Script:NotifLocale = Get-Content $LocaleFile -Encoding UTF8 -ErrorAction SilentlyContinue + #Rerturn langague display name + Return $LocaleDisplayName + } \ No newline at end of file diff --git a/Winget-AutoUpdate/winget-upgrade.ps1 b/Winget-AutoUpdate/winget-upgrade.ps1 index 24430c1..624e2aa 100644 --- a/Winget-AutoUpdate/winget-upgrade.ps1 +++ b/Winget-AutoUpdate/winget-upgrade.ps1 @@ -37,7 +37,8 @@ if ($IsSystem) { } #Get Notif Locale function -Get-NotifLocale +$LocaleDisplayName = Get-NotifLocale +Write-Log "Notification Level: $($WAUConfig.WAU_NotificationLevel). Notification Language: $LocaleDisplayName" "Cyan" #Check network connectivity if (Test-Network) {