Skip to content

Commit ea058e2

Browse files
committed
Port changes from 16.0-preview1
1 parent 702aa62 commit ea058e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Shared/RazorShared/RazorDiagnosticJsonConverter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System;
5+
using System.Globalization;
56
using Microsoft.AspNetCore.Razor.Language;
67
using Newtonsoft.Json;
78
using Newtonsoft.Json.Linq;
@@ -49,7 +50,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
4950
writer.WriteStartObject();
5051
WriteProperty(writer, nameof(RazorDiagnostic.Id), diagnostic.Id);
5152
WriteProperty(writer, nameof(RazorDiagnostic.Severity), (int)diagnostic.Severity);
52-
WriteProperty(writer, RazorDiagnosticMessageKey, diagnostic.GetMessage());
53+
WriteProperty(writer, RazorDiagnosticMessageKey, diagnostic.GetMessage(CultureInfo.CurrentCulture));
5354

5455
writer.WritePropertyName(nameof(RazorDiagnostic.Span));
5556
serializer.Serialize(writer, diagnostic.Span);

0 commit comments

Comments
 (0)