From 5b24309fe314cb76c17bbb4937f9e2996d1ca8a0 Mon Sep 17 00:00:00 2001 From: Sebastian N Date: Tue, 15 Aug 2017 07:43:07 +0200 Subject: [PATCH] Fix localization error in SwaggerUtil Pluralization is only supported for the English language. --- PSSwagger/SwaggerUtils.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PSSwagger/SwaggerUtils.psm1 b/PSSwagger/SwaggerUtils.psm1 index e58af78..aa6d041 100644 --- a/PSSwagger/SwaggerUtils.psm1 +++ b/PSSwagger/SwaggerUtils.psm1 @@ -28,7 +28,7 @@ if(-not (Get-OperatingSystemInfo).IsCore) Add-Type -AssemblyName System.Data.Entity.Design } - $script:PluralizationService = [System.Data.Entity.Design.PluralizationServices.PluralizationService]::CreateService([System.Globalization.CultureInfo]::CurrentCulture) + $script:PluralizationService = [System.Data.Entity.Design.PluralizationServices.PluralizationService]::CreateService([System.Globalization.CultureInfo]::GetCultureInfo('en-US')) $PluralToSingularMapPath = Join-Path -Path $PSScriptRoot -ChildPath 'PluralToSingularMap.json' if(Test-Path -Path $PluralToSingularMapPath -PathType Leaf) @@ -1771,4 +1771,4 @@ function Get-PowerShellCodeGenSettings { } } } -} \ No newline at end of file +}