Skip to content

Commit 67bbdcb

Browse files
committed
TextExtractor: Added missing Escape call writing TRS file
1 parent a546de6 commit 67bbdcb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

AGSUnpacker.Lib/Utils/TextExtractor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using AGSUnpacker.Lib.Game;
77
using AGSUnpacker.Lib.Room;
88
using AGSUnpacker.Lib.Translation;
9+
using AGSUnpacker.Shared.Utils;
910

1011
namespace AGSUnpacker.Lib.Utils
1112
{
@@ -313,6 +314,7 @@ private static bool PushIntoLines(string line)
313314
return true;
314315
}
315316

317+
// FIXME(adm244): generate AGSTranslation and use its reading\writting methods
316318
public static void WriteTranslationFile(string filename, List<string> lines)
317319
{
318320
string filepath = Path.Combine(Environment.CurrentDirectory, filename);
@@ -322,7 +324,7 @@ public static void WriteTranslationFile(string filename, List<string> lines)
322324
{
323325
for (int i = 0; i < lines.Count; ++i)
324326
{
325-
writer.WriteLine(lines[i]);
327+
writer.WriteLine(AGSStringUtils.Escape(lines[i]));
326328
if (!lines[i].StartsWith("//"))
327329
{
328330
writer.WriteLine();

0 commit comments

Comments
 (0)