From fa96c7d2b21e8d94c1d46d4f143069cdce6621df Mon Sep 17 00:00:00 2001 From: Jens Otto Hatlevold Date: Wed, 16 Jun 2021 12:27:10 +0200 Subject: [PATCH 1/3] Fix detection of norwegian language pack --- Modules/SharePointDsc/DscResource.Tests | 1 + .../MSFT_SPInstallLanguagePack.psm1 | 13 +++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) create mode 160000 Modules/SharePointDsc/DscResource.Tests diff --git a/Modules/SharePointDsc/DscResource.Tests b/Modules/SharePointDsc/DscResource.Tests new file mode 160000 index 000000000..bc9a07d80 --- /dev/null +++ b/Modules/SharePointDsc/DscResource.Tests @@ -0,0 +1 @@ +Subproject commit bc9a07d807c65bbc33d75cf36aa774a73345b809 diff --git a/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 b/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 index 1d6ca9416..a884033fd 100644 --- a/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 @@ -250,16 +250,13 @@ function Get-TargetResource { $languageEnglish = "Serbian (Latin)" } - # If VS Code shows a strange character in Bokmål, this is correct. - # PowerShell encodes files in Windows-1252 and VSCode uses UTF8. - # This characters is therefore stored in Windows-1252. - "Norwegian Bokm�l (Norway)" - { - $languageEnglish = "Norwegian" - } Default { - if ($cultureInfo.EnglishName -match "(\w*,*\s*\w*) \([^)]*\)") + if ($cultureInfo.LCID -eq 1044) + { + $languageEnglish = "Norwegian" + } + elseif ($cultureInfo.EnglishName -match "(\w*,*\s*\w*) \([^)]*\)") { $languageEnglish = $matches[1] if ($languageEnglish.contains(",")) From 6f5adfd50f8228fe07f4ba239304874cfb01eeb7 Mon Sep 17 00:00:00 2001 From: Jens Otto Hatlevold Date: Wed, 16 Jun 2021 12:29:10 +0200 Subject: [PATCH 2/3] Update change log --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbcb0579f..aa69e0945 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- SPInstallLanguagePack + - Fixed detection of Norwegian language pack + ## [4.7.0] - 2021-06-10 ### Added From 4c2d4a6da825812f76b6725766b0a987bad6d9fd Mon Sep 17 00:00:00 2001 From: Jens Otto Hatlevold Date: Thu, 17 Jun 2021 14:06:06 +0200 Subject: [PATCH 3/3] Remove folder --- Modules/SharePointDsc/DscResource.Tests | 1 - 1 file changed, 1 deletion(-) delete mode 160000 Modules/SharePointDsc/DscResource.Tests diff --git a/Modules/SharePointDsc/DscResource.Tests b/Modules/SharePointDsc/DscResource.Tests deleted file mode 160000 index bc9a07d80..000000000 --- a/Modules/SharePointDsc/DscResource.Tests +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bc9a07d807c65bbc33d75cf36aa774a73345b809