Skip to content

Commit

Permalink
Fix \n in xx.lang file
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceChenQAQ committed Oct 18, 2022
1 parent eb51f72 commit ee57d10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MinecraftClient/Protocol/Message/ChatParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private static void InitRules()

StringBuilder stringBuilder = new();
foreach (KeyValuePair<string, Json.JSONData> entry in Json.ParseJson(translation_file).Properties)
stringBuilder.Append(entry.Key).Append('=').Append(entry.Value.StringValue).Append(Environment.NewLine);
stringBuilder.Append(entry.Key).Append('=').Append(entry.Value.StringValue.Replace("\n", "\\n").Replace("\r", String.Empty)).Append(Environment.NewLine);
File.WriteAllText(Language_File, stringBuilder.ToString());

ConsoleIO.WriteLineFormatted(Translations.Get("chat.done", Language_File));
Expand Down

0 comments on commit ee57d10

Please sign in to comment.